FACT++  1.0
void DrsCalibrate::GetSampleStats ( float *  ptr,
float  scale 
) const
inline

Definition at line 831 of file DrsCalib.h.

References fNumChannels, and fNumEntries.

832  {
833  const size_t sz = fNumSamples*fNumChannels;
834 
835  if (fNumEntries==0)
836  {
837  memset(ptr, 0, sizeof(float)*sz*2);
838  return;
839  }
840 
841  std::vector<int64_t>::const_iterator it = fSum.begin();
842  std::vector<int64_t>::const_iterator i2 = fSum2.begin();
843 
844  while (it!=fSum.end())
845  {
846  *ptr = scale*double(*it)/fNumEntries;
847  *(ptr+sz) = scale*sqrt(double(*i2*fNumEntries - *it * *it))/fNumEntries;
848 
849  ptr++;
850  it++;
851  i2++;
852  }
853  }
std::vector< int64_t > fSum
Definition: DrsCalib.h:23
std::vector< int64_t > fSum2
Definition: DrsCalib.h:24
size_t fNumSamples
Definition: DrsCalib.h:20
size_t fNumChannels
Definition: DrsCalib.h:21
int64_t fNumEntries
Definition: DrsCalib.h:18