843 const EVENT *
event = evt.
fEvent;
847 const array<uint16_t,2> roi = {{
event->Roi,
event->RoiTM }};
855 const FAD::EventHeader *beg =
reinterpret_cast<const FAD::EventHeader*
>(evt.
FADhead);
856 const FAD::EventHeader *
end =
reinterpret_cast<const FAD::EventHeader*
>(evt.
FADhead)+40;
861 array<uint32_t,40> clk;
862 array<int16_t,160> tmp;
864 for (
int i=0;
i<40;
i++)
867 for (
int i=0;
i<160;
i++)
873 for (
const FAD::EventHeader *ptr=beg; ptr!=
end; ptr++)
876 if (ptr->fStartDelimiter==0)
883 clk[ptr->Id()] = ptr->fFreqRefClock;
884 for (
int i=0;
i<4;
i++)
885 tmp[ptr->Id()*4+
i] = ptr->fTempDrs[
i];
887 if (beg->fStatus != ptr->fStatus)
889 fMsg.
Error(
"Inconsistency in FAD status detected.... closing run.");
893 if (beg->fRunNumber != ptr->fRunNumber)
895 fMsg.
Error(
"Inconsistent run number detected.... closing run.");
907 if (beg->fEventCounter != ptr->fEventCounter)
909 fMsg.
Error(
"Inconsistent FAD event number detected.... closing run.");
913 if (beg->fTriggerCounter != ptr->fTriggerCounter)
915 fMsg.
Error(
"Inconsistent FTM trigger number detected.... closing run.");
920 if (beg->fAdcClockPhaseShift != ptr->fAdcClockPhaseShift)
922 fMsg.
Error(
"Inconsistent phase shift detected.... closing run.");
927 if (memcmp(beg->fDac, ptr->fDac,
sizeof(beg->fDac)))
929 fMsg.
Error(
"Inconsistent DAC values detected.... closing run.");
933 if (beg->fTriggerType != ptr->fTriggerType)
935 fMsg.
Error(
"Inconsistent trigger type detected.... closing run.");
949 static Time oldt(boost::date_time::neg_infin);
950 if (tm>oldt+boost::posix_time::seconds(1))
Queue< tuple< Time, char, array< uint32_t, 8 > > > fQueueTrigger
Adds some functionality to boost::posix_time::ptime for our needs.
Queue< pair< Time, array< uint16_t, 2 > > > fQueueRoi
int Error(const std::string &str)
std::shared_ptr< RUN_CTRL2 > runCtrl
array< uint16_t, 2 > fVecRoi
Queue< tuple< Time, array< uint32_t, 40 >, array< int16_t, 160 > > > fQueueTempRefClk