1 #ifndef FACT_EventBuilder 2 #define FACT_EventBuilder 8 #include <forward_list> 78 std::shared_ptr<DrsCalibration>
calib;
83 triggerCounter.fill(0);
95 #define MAX_HEAD_MEM (NBOARDS * sizeof(PEVNT_HEADER)) 96 #define MAX_TOT_MEM (sizeof(EVENT) + (NPIX+NTMARK)*1024*2 + MAX_HEAD_MEM) 100 extern uint64_t
inuse;
105 extern std::mutex
mtx;
107 extern std::forward_list<void*>
memory;
110 extern void free(
void *mem);
146 std::fill(board, board+
NBOARDS, -1);
155 EVT_CTRL2(
int req,
const std::shared_ptr<RUN_CTRL2> &
run) : nBoard(0), FADhead(0), header(0), closeRequest(req), runCtrl(run)
158 std::fill(board, board+
NBOARDS, -1);
179 bool valid()
const {
return header; }
191 fEvent =
reinterpret_cast<EVENT*
>(FADhead+
NBOARDS);
193 memset(FADhead, 0, (
NPIX+
NTMARK)*2*nRoi+
NBOARDS*
sizeof(PEVNT_HEADER)+
sizeof(EVENT));
196 std::fill(fEvent->StartPix, fEvent->StartPix+
NPIX, -1);
197 std::fill(fEvent->StartTM, fEvent->StartTM +
NTMARK, -1);
200 fEvent->RoiTM = nRoiTM;
201 fEvent->EventNum =
evNum;
202 fEvent->TriggerNum = trgNum;
203 fEvent->TriggerType = trgTyp;
uint gi_NumConnect[NBOARDS]
std::forward_list< void * > memory
EVT_CTRL2(int req, const std::shared_ptr< RUN_CTRL2 > &run)
FACT_SOCK g_port[NBOARDS]
std::shared_ptr< RUN_CTRL2 > runCtrl
std::array< uint32_t, 8 > triggerCounter
std::list< std::array< int16_t, 1440 > > prevStart
std::array< uint32_t, 8 > triggerCounter
std::shared_ptr< DrsCalibration > calib
PEVNT_HEADER FADhead[NBOARDS]