FACT++  1.0
bool EventBuilderWrapper::runWrite ( const EVT_CTRL2 e)
inline

Definition at line 624 of file EventBuilderWrapper.h.

References EVT_CTRL2::evNum, EVT_CTRL2::trgNum, and EVT_CTRL2::triggerCounter.

Referenced by runWrite().

625  {
626  /*
627  const size_t size = sizeof(EVENT)+1440*(evt.Roi+evt.RoiTM)*2;
628  vector evt(e.fEvent, e.fEvent+size);
629 
630  const EVENT &evt = *reinterpret_cast<EVENT*>(evt.data());
631 
632  int16_t *val = evt.Adc_Data;
633  const int16_t *off = e.runCtrl->zcalib.data();
634  for (const int16_t *start=evt.StartPix; start<evt.StartPix+1440; val+=1024, off+=1024, start++)
635  {
636  if (*start<0)
637  continue;
638 
639  for (size_t i=0; i<roi; i++)
640  val[i] -= offset[(*start+i)%1024];
641  }*/
642 
643  if (!fFile->WriteEvt(e))
644  return false;
645 
646  //const EVENT &evt = *e.fEvent;
647 
648  fNumEvts[kCurrent]++;
649  fNumEvts[kEventId] = e.evNum;//evt.EventNum;
650  fNumEvts[kTriggerId] = e.trgNum;//evt.TriggerNum;
651  fNumEvts[kTotal]++;
652 
653  static Time oldt(boost::date_time::neg_infin);
654  Time newt;
655  if (newt>oldt+boost::posix_time::seconds(1))
656  {
657  fQueueEvents.emplace(newt, fNumEvts);
658  fQueueTrigger.emplace(newt, 'w', e.triggerCounter);
659  oldt = newt;
660  }
661 
662  return true;
663  }
Queue< tuple< Time, char, array< uint32_t, 8 > > > fQueueTrigger
uint32_t evNum
Definition: EventBuilder.h:116
Adds some functionality to boost::posix_time::ptime for our needs.
Definition: Time.h:30
Queue< pair< Time, array< uint32_t, 4 > > > fQueueEvents
uint32_t trgNum
Definition: EventBuilder.h:118
shared_ptr< DataProcessorImp > fFile
array< uint32_t, 4 > fNumEvts
std::array< uint32_t, 8 > triggerCounter
Definition: EventBuilder.h:137

+ Here is the caller graph for this function: