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>
35 #include <sys/types.h>
36 #include <sys/socket.h>
37 #include <netinet/in.h>
38 #include <netinet/tcp.h>
39 #include <arpa/inet.h>
40 #include <sys/resource.h>
42 #include <TDirectory.h>
53 static const int intNaN = std::numeric_limits<int>::quiet_NaN();
76 virtual void event()
override;
84 m_on_2d0, m_on_2d1, m_on_2d2, m_on_2d3,
85 m_on_3d0, m_on_3d1, m_on_3d2, m_on_3d3,
86 m_on_nn0, m_on_nn1, m_on_nn2, m_on_nn3,
87 m_on_sl0, m_on_sl1, m_on_sl2, m_on_sl3,
88 m_on_sl4, m_on_sl5, m_on_sl6, m_on_sl8,
89 m_on_gdl, m_on_etf, m_on_grl, m_on_top
102 printf(
"-%3s---%8s---%8s---%8s---%8s---%8s---%8s---%8s---%8s---%8s---%8s---%8s---%8s--\n",
103 "---",
"--------",
"--------",
"--------",
"--------",
"--------",
"--------",
"--------",
104 "--------",
"--------",
"--------",
"--------",
"--------");
105 printf(
" %3s | %-8s | %-8s | %-8s | %-8s | %-8s | %-8s | %-8s | %-8s | %-8s | %-8s | %-8s | %-8s |\n",
121 printf(
"-%3s---%8s---%8s---%8s---%8s---%8s---%8s---%8s---%8s---%8s---%8s---%8s---%8s--\n",
122 "---",
"--------",
"--------",
"--------",
"--------",
"--------",
"--------",
"--------",
123 "--------",
"--------",
"--------",
"--------",
"--------");
126 printf(
" %3s | %8d | %8d | %8d | %8d | %8d | %8d | %8d | %8d | %8d | %8d | %8d | %8d |\n",
143 printf(
"-%3s---%8s---%8s---%8s---%8s---%8s---%8s---%8s---%8s---%8s---%8s---%8s---%8s--\n",
144 "---",
"--------",
"--------",
"--------",
"--------",
"--------",
"--------",
"--------",
145 "--------",
"--------",
"--------",
"--------",
"--------");
146 printf(
"%-10s: %-s\n"
158 "a)dataOk",
"Data event that has no problem (except cc check)",
159 "b)hdrOk",
"Header event that has no problem",
160 "c)ccOk",
"Data event that has good cc cycle",
161 "d)hdrTag",
"Header event that has bad event number in header",
162 "e)hdrL1",
"Header event that has bad L1 timing in header",
163 "f)hdrScl",
"Header event that should not be header event",
164 "g)dataTag",
"Data event that has bad event number in data (can be dummy buffer)",
165 "h)dataL1",
"Data event that has bad L1 timing in header",
166 "i)bbbb",
"Data event from dummy buffer",
167 "j)#wd",
"Data event that does not have expected #word",
168 "k)ddsft",
"Data event that does not have expected dddd in clock cycle (can be dummy buffer)",
169 "l)ccodr",
"Data event that has bad cc cycle");
180 "2D0",
"2D1",
"2D2",
"2D3",
181 "3D0",
"3D1",
"3D2",
"3D3",
182 "NN0",
"NN1",
"NN2",
"NN3",
183 "SL0",
"SL1",
"SL2",
"SL3",
184 "SL4",
"SL5",
"SL6",
"SL8",
185 "GDL",
"ETF",
"GRL",
"TOP"
222 bool m_print_clkcyc_err;
225 int m_hdr_nwd_sl0 =
intNaN;
226 int m_hdr_nwd_sl1 =
intNaN;
227 int m_hdr_nwd_sl2 =
intNaN;
228 int m_hdr_nwd_sl3 =
intNaN;
229 int m_hdr_nwd_sl4 =
intNaN;
230 int m_hdr_nwd_sl5 =
intNaN;
231 int m_hdr_nwd_sl6 =
intNaN;
233 int m_hdr_nwd_sl8 =
intNaN;
234 int m_hdr_nwd_2d0 =
intNaN;
235 int m_hdr_nwd_2d1 =
intNaN;
236 int m_hdr_nwd_2d2 =
intNaN;
237 int m_hdr_nwd_2d3 =
intNaN;
238 int m_hdr_nwd_3d0 =
intNaN;
239 int m_hdr_nwd_3d1 =
intNaN;
240 int m_hdr_nwd_3d2 =
intNaN;
241 int m_hdr_nwd_3d3 =
intNaN;
242 int m_hdr_nwd_nn0 =
intNaN;
243 int m_hdr_nwd_nn1 =
intNaN;
244 int m_hdr_nwd_nn2 =
intNaN;
245 int m_hdr_nwd_nn3 =
intNaN;
246 int m_hdr_nwd_gdl =
intNaN;
247 int m_hdr_nwd_etf =
intNaN;
248 int m_hdr_nwd_grl =
intNaN;
249 int m_hdr_nwd_top =
intNaN;
251 unsigned m_cpr_sl0 =
intNaN;
252 unsigned m_cpr_sl1 =
intNaN;
253 unsigned m_cpr_sl2 =
intNaN;
254 unsigned m_cpr_sl3 =
intNaN;
255 unsigned m_cpr_sl4 =
intNaN;
256 unsigned m_cpr_sl5 =
intNaN;
257 unsigned m_cpr_sl6 =
intNaN;
259 unsigned m_cpr_sl8 =
intNaN;
260 unsigned m_cpr_2d0 =
intNaN;
261 unsigned m_cpr_2d1 =
intNaN;
262 unsigned m_cpr_2d2 =
intNaN;
263 unsigned m_cpr_2d3 =
intNaN;
264 unsigned m_cpr_3d0 =
intNaN;
265 unsigned m_cpr_3d1 =
intNaN;
266 unsigned m_cpr_3d2 =
intNaN;
267 unsigned m_cpr_3d3 =
intNaN;
268 unsigned m_cpr_nn0 =
intNaN;
269 unsigned m_cpr_nn1 =
intNaN;
270 unsigned m_cpr_nn2 =
intNaN;
271 unsigned m_cpr_nn3 =
intNaN;
272 unsigned m_cpr_gdl =
intNaN;
273 unsigned m_cpr_etf =
intNaN;
275 unsigned m_cpr_top =
intNaN;
326 unsigned m_fmid_gdl =
intNaN;
348 bool m_on_sl0 =
false;
349 bool m_on_sl1 =
false;
350 bool m_on_sl2 =
false;
351 bool m_on_sl3 =
false;
352 bool m_on_sl4 =
false;
353 bool m_on_sl5 =
false;
354 bool m_on_sl6 =
false;
355 bool m_on_sl7 =
false;
356 bool m_on_sl8 =
false;
357 bool m_on_2d0 =
false;
358 bool m_on_2d1 =
false;
359 bool m_on_2d2 =
false;
360 bool m_on_2d3 =
false;
361 bool m_on_3d0 =
false;
362 bool m_on_3d1 =
false;
363 bool m_on_3d2 =
false;
364 bool m_on_3d3 =
false;
365 bool m_on_nn0 =
false;
366 bool m_on_nn1 =
false;
367 bool m_on_nn2 =
false;
368 bool m_on_nn3 =
false;
369 bool m_on_gdl =
false;
370 bool m_on_etf =
false;
371 bool m_on_grl =
false;
372 bool m_on_top =
false;
391 int m_nclk_cdctrg =
intNaN;
411 int cntr_good_odr[50] = {};
412 int cntr_bad_odr[50] = {};
413 int cntr_bad_ddd[50] = {};
414 int cntr_bad_nwd[50] = {};
416 int cntr_nw3[50] = {};
417 int cntr_nw3_badvet[50] = {};
418 int cntr_nw3_badtrg[50] = {};
419 int cntr_nw3_badrvc[50] = {};
421 int cntr_nwn[50] = {};
422 int cntr_nwn_badvet[50] = {};
423 int cntr_nwn_badtrg[50] = {};
424 int cntr_nwn_badrvc[50] = {};
426 int cntr_nwn_badbbb[50] = {};
427 int cntr_nwn_badddd[50] = {};
429 int cntr_nwe_badnwd[50] = {};
435 std::vector<std::vector<int>> BitMap;
436 int LeafBitMap[320] = {};
437 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.