8#ifndef TRGRAWDATAModule_h
9#define TRGRAWDATAModule_h
17#include <rawdata/dataobjects/RawTRG.h>
19#include <framework/pcore/EvtMessage.h>
21#include <framework/datastore/StoreArray.h>
23#include <framework/core/HistoModule.h>
24#include <framework/dataobjects/EventMetaData.h>
25#include <framework/datastore/StoreObjPtr.h>
26#include <framework/database/DBObjPtr.h>
27#include <mdst/dbobjects/TRGGDLDBBadrun.h>
28#include <trg/gdl/dbobjects/TRGGDLDBUnpacker.h>
30#include <rawdata/dataobjects/RawDataBlock.h>
31#include <rawdata/dataobjects/RawFTSW.h>
32#include <rawdata/dataobjects/RawTLU.h>
33#include <rawdata/dataobjects/RawCOPPER.h>
36#include <sys/socket.h>
37#include <netinet/in.h>
38#include <netinet/tcp.h>
40#include <sys/resource.h>
42#include <TDirectory.h>
53 static const int intNaN = std::numeric_limits<int>::quiet_NaN();
70 virtual void event()
override;
78 m_on_2d0, m_on_2d1, m_on_2d2, m_on_2d3,
79 m_on_3d0, m_on_3d1, m_on_3d2, m_on_3d3,
80 m_on_nn0, m_on_nn1, m_on_nn2, m_on_nn3,
81 m_on_sl0, m_on_sl1, m_on_sl2, m_on_sl3,
82 m_on_sl4, m_on_sl5, m_on_sl6, m_on_sl8,
83 m_on_gdl, m_on_etf, m_on_grl, m_on_top
96 printf(
"-%3s---%8s---%8s---%8s---%8s---%8s---%8s---%8s---%8s---%8s---%8s---%8s---%8s--\n",
97 "---",
"--------",
"--------",
"--------",
"--------",
"--------",
"--------",
"--------",
98 "--------",
"--------",
"--------",
"--------",
"--------");
99 printf(
" %3s | %-8s | %-8s | %-8s | %-8s | %-8s | %-8s | %-8s | %-8s | %-8s | %-8s | %-8s | %-8s |\n",
115 printf(
"-%3s---%8s---%8s---%8s---%8s---%8s---%8s---%8s---%8s---%8s---%8s---%8s---%8s--\n",
116 "---",
"--------",
"--------",
"--------",
"--------",
"--------",
"--------",
"--------",
117 "--------",
"--------",
"--------",
"--------",
"--------");
120 printf(
" %3s | %8d | %8d | %8d | %8d | %8d | %8d | %8d | %8d | %8d | %8d | %8d | %8d |\n",
137 printf(
"-%3s---%8s---%8s---%8s---%8s---%8s---%8s---%8s---%8s---%8s---%8s---%8s---%8s--\n",
138 "---",
"--------",
"--------",
"--------",
"--------",
"--------",
"--------",
"--------",
139 "--------",
"--------",
"--------",
"--------",
"--------");
140 printf(
"%-10s: %-s\n"
152 "a)dataOk",
"Data event that has no problem (except cc check)",
153 "b)hdrOk",
"Header event that has no problem",
154 "c)ccOk",
"Data event that has good cc cycle",
155 "d)hdrTag",
"Header event that has bad event number in header",
156 "e)hdrL1",
"Header event that has bad L1 timing in header",
157 "f)hdrScl",
"Header event that should not be header event",
158 "g)dataTag",
"Data event that has bad event number in data (can be dummy buffer)",
159 "h)dataL1",
"Data event that has bad L1 timing in header",
160 "i)bbbb",
"Data event from dummy buffer",
161 "j)#wd",
"Data event that does not have expected #word",
162 "k)ddsft",
"Data event that does not have expected dddd in clock cycle (can be dummy buffer)",
163 "l)ccodr",
"Data event that has bad cc cycle");
174 "2D0",
"2D1",
"2D2",
"2D3",
175 "3D0",
"3D1",
"3D2",
"3D3",
176 "NN0",
"NN1",
"NN2",
"NN3",
177 "SL0",
"SL1",
"SL2",
"SL3",
178 "SL4",
"SL5",
"SL6",
"SL8",
179 "GDL",
"ETF",
"GRL",
"TOP"
216 bool m_print_clkcyc_err;
219 int m_hdr_nwd_sl0 =
intNaN;
220 int m_hdr_nwd_sl1 =
intNaN;
221 int m_hdr_nwd_sl2 =
intNaN;
222 int m_hdr_nwd_sl3 =
intNaN;
223 int m_hdr_nwd_sl4 =
intNaN;
224 int m_hdr_nwd_sl5 =
intNaN;
225 int m_hdr_nwd_sl6 =
intNaN;
227 int m_hdr_nwd_sl8 =
intNaN;
228 int m_hdr_nwd_2d0 =
intNaN;
229 int m_hdr_nwd_2d1 =
intNaN;
230 int m_hdr_nwd_2d2 =
intNaN;
231 int m_hdr_nwd_2d3 =
intNaN;
232 int m_hdr_nwd_3d0 =
intNaN;
233 int m_hdr_nwd_3d1 =
intNaN;
234 int m_hdr_nwd_3d2 =
intNaN;
235 int m_hdr_nwd_3d3 =
intNaN;
236 int m_hdr_nwd_nn0 =
intNaN;
237 int m_hdr_nwd_nn1 =
intNaN;
238 int m_hdr_nwd_nn2 =
intNaN;
239 int m_hdr_nwd_nn3 =
intNaN;
240 int m_hdr_nwd_gdl =
intNaN;
241 int m_hdr_nwd_etf =
intNaN;
242 int m_hdr_nwd_grl =
intNaN;
243 int m_hdr_nwd_top =
intNaN;
245 unsigned m_cpr_sl0 =
intNaN;
246 unsigned m_cpr_sl1 =
intNaN;
247 unsigned m_cpr_sl2 =
intNaN;
248 unsigned m_cpr_sl3 =
intNaN;
249 unsigned m_cpr_sl4 =
intNaN;
250 unsigned m_cpr_sl5 =
intNaN;
251 unsigned m_cpr_sl6 =
intNaN;
253 unsigned m_cpr_sl8 =
intNaN;
254 unsigned m_cpr_2d0 =
intNaN;
255 unsigned m_cpr_2d1 =
intNaN;
256 unsigned m_cpr_2d2 =
intNaN;
257 unsigned m_cpr_2d3 =
intNaN;
258 unsigned m_cpr_3d0 =
intNaN;
259 unsigned m_cpr_3d1 =
intNaN;
260 unsigned m_cpr_3d2 =
intNaN;
261 unsigned m_cpr_3d3 =
intNaN;
262 unsigned m_cpr_nn0 =
intNaN;
263 unsigned m_cpr_nn1 =
intNaN;
264 unsigned m_cpr_nn2 =
intNaN;
265 unsigned m_cpr_nn3 =
intNaN;
266 unsigned m_cpr_gdl =
intNaN;
267 unsigned m_cpr_etf =
intNaN;
269 unsigned m_cpr_top =
intNaN;
320 unsigned m_fmid_gdl =
intNaN;
342 bool m_on_sl0 =
false;
343 bool m_on_sl1 =
false;
344 bool m_on_sl2 =
false;
345 bool m_on_sl3 =
false;
346 bool m_on_sl4 =
false;
347 bool m_on_sl5 =
false;
348 bool m_on_sl6 =
false;
349 bool m_on_sl7 =
false;
350 bool m_on_sl8 =
false;
351 bool m_on_2d0 =
false;
352 bool m_on_2d1 =
false;
353 bool m_on_2d2 =
false;
354 bool m_on_2d3 =
false;
355 bool m_on_3d0 =
false;
356 bool m_on_3d1 =
false;
357 bool m_on_3d2 =
false;
358 bool m_on_3d3 =
false;
359 bool m_on_nn0 =
false;
360 bool m_on_nn1 =
false;
361 bool m_on_nn2 =
false;
362 bool m_on_nn3 =
false;
363 bool m_on_gdl =
false;
364 bool m_on_etf =
false;
365 bool m_on_grl =
false;
366 bool m_on_top =
false;
385 int m_nclk_cdctrg =
intNaN;
405 int cntr_good_odr[50] = {};
406 int cntr_bad_odr[50] = {};
407 int cntr_bad_ddd[50] = {};
408 int cntr_bad_nwd[50] = {};
410 int cntr_nw3[50] = {};
411 int cntr_nw3_badvet[50] = {};
412 int cntr_nw3_badtrg[50] = {};
413 int cntr_nw3_badrvc[50] = {};
415 int cntr_nwn[50] = {};
416 int cntr_nwn_badvet[50] = {};
417 int cntr_nwn_badtrg[50] = {};
418 int cntr_nwn_badrvc[50] = {};
420 int cntr_nwn_badbbb[50] = {};
421 int cntr_nwn_badddd[50] = {};
423 int cntr_nwe_badnwd[50] = {};
429 std::vector<std::vector<int>> BitMap;
430 int LeafBitMap[320] = {};
431 char LeafNames[320][100] = {};
Class for accessing objects in the database.
HistoModule.h is supposed to be used instead of Module.h for the modules with histogram definitions t...
Type-safe access to single objects in the data store.
virtual void endRun() override
End Run.
static const unsigned int c_nModules
number of modules
virtual void terminate() override
terminate
virtual void initialize() override
initialize
virtual void event() override
Event.
TRGRAWDATAModule()
Costructor.
virtual void beginRun() override
begin Run
StoreObjPtr< EventMetaData > m_eventMetaDataPtr
Event Meta Data.
virtual ~TRGRAWDATAModule()
Destrunctor.
virtual void defineHisto() override
Define Histogram.
static const int intNaN
constant for integer NaN
Abstract base class for different kinds of events.