588 return shared_ptr<EVT_CTRL2>();
593 const shared_ptr<EVT_CTRL2> &evt = *it;
599 if (rd.
H.runnumber != evt->runNum)
604 if (rd.
H.fad_evt_counter > evt->evNum)
607 if (rd.
H.fad_evt_counter != evt->evNum)
612 if (evt->nRoi != nRoi[0] || evt->nRoiTM != nRoi[8])
615 evt->nRoi, evt->nRoiTM, nRoi[0], nRoi[8]);
616 return shared_ptr<EVT_CTRL2>();
622 if ((rd.
time.tv_sec==evt->time.tv_sec && rd.
time.tv_usec<evt->time.tv_usec) ||
623 rd.
time.tv_sec<evt->time.tv_sec)
633 actrun->roi0,
actrun->roi8, nRoi[0], nRoi[8], rd.
H.runnumber, rd.
H.fad_evt_counter);
634 return shared_ptr<EVT_CTRL2>();
641 evt->runNum = rd.
H.runnumber;
642 evt->evNum = rd.
H.fad_evt_counter;
644 evt->trgNum = rd.
H.trigger_id;
645 evt->trgTyp = rd.
H.trigger_type;
648 evt->nRoiTM = nRoi[8];
652 const bool newrun =
actrun->runId != rd.
H.runnumber;
660 rd.
H.runnumber, rd.
H.fad_evt_counter, nRoi[0], nRoi[8],
actrun->runId);
663 actrun = make_shared<RUN_CTRL2>();
665 const time_t &tsec = evt->time.tv_sec;
668 actrun->closeTime = tsec + 3600 * 24;
669 actrun->runId = rd.
H.runnumber;
683 actrun->lastTime = evt->time.tv_sec;
691 const bool cond2 =
actrun->lastTime <
actrun->closeTime;
692 if (!cond1 || !cond2)
void gotNewRun(RUN_CTRL2 &run)
void factPrintf(int severity, const char *fmt,...)
list< shared_ptr< EVT_CTRL2 > > evtCtrl
shared_ptr< RUN_CTRL2 > actrun
An info telling something which can be interesting to know.
Error, something unexpected happened, but can still be handled by the program.
bool checkRoiConsistency(const READ_STRUCT &rd, uint16_t roi[])