FACT++  1.0
bool DataCalib::WriteEvt ( const EVT_CTRL2 evt)
virtual

Implements DataProcessorImp.

Definition at line 182 of file DataCalib.cc.

References fData, EVT_CTRL2::fEvent, and DataWriteFits2::WriteEvt().

183 {
184  // FIXME: SET StartPix to 0 if StartPix is -1
185 
186  const EVENT &e = *evt.fEvent;
187 
188  if (fData.fStep==0)
189  {
190  AddRel(e.Adc_Data, e.StartPix);
191  }
192  if (fData.fStep==1)
193  {
194  AddRel(e.Adc_Data, e.StartPix, fData.fOffset.data(), fData.fNumOffset);
195  }
196  if (fData.fStep==2)
197  {
198  AddAbs(e.Adc_Data, e.StartPix, fData.fOffset.data(), fData.fNumOffset);
199  }
200 
201  return DataWriteFits2::WriteEvt(evt);
202 }
std::vector< int32_t > fOffset
Definition: DrsCalib.h:1309
EVENT * fEvent
Definition: EventBuilder.h:132
bool WriteEvt(const EVT_CTRL2 &e)
void AddRel(const int16_t *val, const int16_t *start)
Definition: DrsCalib.h:52
static DrsCalibration fData
Definition: DataCalib.h:13
uint32_t fStep
Definition: DrsCalib.h:1317
void AddAbs(const int16_t *val, const int16_t *start, const int32_t *offset, const int64_t scale)
Definition: DrsCalib.h:218
int64_t fNumOffset
Definition: DrsCalib.h:1313

+ Here is the call graph for this function: