FACT++  1.0
bool DrsCalibration::Apply ( float *  vec,
const int16_t *  val,
const int16_t *  start,
uint32_t  roi 
)
inline

Definition at line 1608 of file DrsCalib.h.

References DrsCalibrate::ApplyCh(), and DrsCalibrate::Step::pos.

Referenced by DataCalib::Apply(), and RawDataViewer::ApplyCalibration().

1609  {
1610  if (roi!=fRoi)
1611  {
1612  for (size_t ch=0; ch<1440; ch++)
1613  {
1614  const size_t pos = ch*roi;
1615  const size_t drs = ch*1024;
1616 
1617  DrsCalibrate::ApplyCh(vec+pos, val+pos, start[ch], roi,
1618  fOffset.data()+drs, fNumOffset,
1619  fGain.data() +drs, fNumGain);
1620  }
1621 
1622  return false;
1623  }
1624 
1625  for (size_t ch=0; ch<1440; ch++)
1626  {
1627  const size_t pos = ch*fRoi;
1628  const size_t drs = ch*1024;
1629 
1630  DrsCalibrate::ApplyCh(vec+pos, val+pos, start[ch], roi,
1631  fOffset.data()+drs, fNumOffset,
1632  fGain.data() +drs, fNumGain,
1633  fTrgOff.data()+pos, fNumTrgOff);
1634  }
1635 
1636  for (size_t ch=0; ch<fNumTm; ch++)
1637  {
1638  const size_t pos = (ch+1440)*fRoi;
1639  const size_t drs = (ch*9+8)*1024;
1640 
1641  DrsCalibrate::ApplyCh(vec+pos, val+pos, start[ch], roi,
1642  fOffset.data()+drs, fNumOffset,
1643  fGain.data() +drs, fNumGain,
1644  fTrgOff.data()+pos, fNumTrgOff);
1645  }
1646 
1647  return true;
1648  }
int start(int initState)
Definition: feeserver.c:1740
std::vector< int32_t > fOffset
Definition: DrsCalib.h:1309
int64_t fNumGain
Definition: DrsCalib.h:1314
int64_t fNumTrgOff
Definition: DrsCalib.h:1315
uint16_t fRoi
Definition: DrsCalib.h:1318
uint16_t fNumTm
Definition: DrsCalib.h:1319
std::vector< int64_t > fGain
Definition: DrsCalib.h:1310
std::vector< int64_t > fTrgOff
Definition: DrsCalib.h:1311
static void ApplyCh(float *vec, const int16_t *val, int16_t start, uint32_t roi, const int32_t *offset, const int64_t scaleabs, const int64_t *gain, const int64_t scalegain)
Definition: DrsCalib.h:294
int64_t fNumOffset
Definition: DrsCalib.h:1313

+ Here is the call graph for this function:

+ Here is the caller graph for this function: