9#include <trg/gdl/modules/trggdlUnpacker/trggdlUnpackerModule.h>
10#include <trg/trg/modules/trgrawdata/trgrawdataModule.h>
12#include <rawdata/modules/PrintDataTemplate.h>
13#include <framework/datastore/StoreObjPtr.h>
14#include <framework/datastore/StoreArray.h>
15#include <framework/dbobjects/RunInfo.h>
16#include <framework/datastore/DataStore.h>
21#include <TPostScript.h>
40 "Recording event by event timing distribution histogram or not",
42 addParam(
"mydebug", m_mydebug,
"debug flag", 0);
43 addParam(
"cc_check", m_cc_check,
"cc mode",
true);
44 addParam(
"print_cc", m_print_cc,
"Print Disordered clocks",
true);
45 addParam(
"print_clkcyc_err", m_print_clkcyc_err,
"Print Errs of Disordered clocks",
false);
46 addParam(
"print_dbmap", m_print_dbmap,
"Print Database Bit Map",
false);
48 addParam(
"hdr_nwd_2d0", m_hdr_nwd_2d0,
"Number of word for 2D0 Header", 3);
49 addParam(
"hdr_nwd_2d1", m_hdr_nwd_2d1,
"Number of word for 2D1 Header", 3);
50 addParam(
"hdr_nwd_2d2", m_hdr_nwd_2d2,
"Number of word for 2D2 Header", 3);
51 addParam(
"hdr_nwd_2d3", m_hdr_nwd_2d3,
"Number of word for 2D3 Header", 3);
52 addParam(
"hdr_nwd_3d0", m_hdr_nwd_3d0,
"Number of word for 3D0 Header", 3);
53 addParam(
"hdr_nwd_3d1", m_hdr_nwd_3d1,
"Number of word for 3D1 Header", 3);
54 addParam(
"hdr_nwd_3d2", m_hdr_nwd_3d2,
"Number of word for 3D2 Header", 3);
55 addParam(
"hdr_nwd_3d3", m_hdr_nwd_3d3,
"Number of word for 3D3 Header", 3);
56 addParam(
"hdr_nwd_nn0", m_hdr_nwd_nn0,
"Number of word for NN0 Header", 3);
57 addParam(
"hdr_nwd_nn1", m_hdr_nwd_nn1,
"Number of word for NN1 Header", 3);
58 addParam(
"hdr_nwd_nn2", m_hdr_nwd_nn2,
"Number of word for NN2 Header", 3);
59 addParam(
"hdr_nwd_nn3", m_hdr_nwd_nn3,
"Number of word for NN3 Header", 3);
60 addParam(
"hdr_nwd_sl0", m_hdr_nwd_sl0,
"Number of word for TSF0 Header", 3);
61 addParam(
"hdr_nwd_sl1", m_hdr_nwd_sl1,
"Number of word for TSF1 Header", 3);
62 addParam(
"hdr_nwd_sl2", m_hdr_nwd_sl2,
"Number of word for TSF2 Header", 3);
63 addParam(
"hdr_nwd_sl3", m_hdr_nwd_sl3,
"Number of word for TSF3 Header", 3);
64 addParam(
"hdr_nwd_sl4", m_hdr_nwd_sl4,
"Number of word for TSF4 Header", 3);
65 addParam(
"hdr_nwd_sl5", m_hdr_nwd_sl5,
"Number of word for TSF5 Header", 3);
66 addParam(
"hdr_nwd_sl6", m_hdr_nwd_sl6,
"Number of word for TSF6 Header", 3);
67 addParam(
"hdr_nwd_sl8", m_hdr_nwd_sl8,
"Number of word for TSF8 Header", 3);
68 addParam(
"hdr_nwd_etf", m_hdr_nwd_etf,
"Number of word for ETF Header", 3);
69 addParam(
"hdr_nwd_grl", m_hdr_nwd_grl,
"Number of word for GRL Header", 3);
70 addParam(
"hdr_nwd_top", m_hdr_nwd_top,
"Number of word for TOP Header", 3);
71 addParam(
"hdr_nwd_gdl", m_hdr_nwd_gdl,
"Number of word for GDL Header", 6);
73 addParam(
"cpr_2d0", m_cpr_2d0,
"Copper number of 2D0", 0x11000001U);
74 addParam(
"cpr_2d1", m_cpr_2d1,
"Copper number of 2D1", 0x11000001U);
75 addParam(
"cpr_2d2", m_cpr_2d2,
"Copper number of 2D2", 0x11000002U);
76 addParam(
"cpr_2d3", m_cpr_2d3,
"Copper number of 2D3", 0x11000002U);
77 addParam(
"cpr_3d0", m_cpr_3d0,
"Copper number of 3D0", 0x11000003U);
78 addParam(
"cpr_3d1", m_cpr_3d1,
"Copper number of 3D1", 0x11000003U);
79 addParam(
"cpr_3d2", m_cpr_3d2,
"Copper number of 3D2", 0x11000004U);
80 addParam(
"cpr_3d3", m_cpr_3d3,
"Copper number of 3D3", 0x11000004U);
81 addParam(
"cpr_nn0", m_cpr_nn0,
"Copper number of NN0", 0x11000005U);
82 addParam(
"cpr_nn1", m_cpr_nn1,
"Copper number of NN1", 0x11000005U);
83 addParam(
"cpr_nn2", m_cpr_nn2,
"Copper number of NN2", 0x11000006U);
84 addParam(
"cpr_nn3", m_cpr_nn3,
"Copper number of NN3", 0x11000006U);
85 addParam(
"cpr_sl0", m_cpr_sl0,
"Copper number of SL0", 0x11000007U);
86 addParam(
"cpr_sl1", m_cpr_sl1,
"Copper number of SL1", 0x11000009U);
87 addParam(
"cpr_sl2", m_cpr_sl2,
"Copper number of SL2", 0x11000008U);
88 addParam(
"cpr_sl3", m_cpr_sl3,
"Copper number of SL3", 0x11000008U);
89 addParam(
"cpr_sl4", m_cpr_sl4,
"Copper number of SL4", 0x11000007U);
90 addParam(
"cpr_sl5", m_cpr_sl5,
"Copper number of SL5", 0x11000009U);
91 addParam(
"cpr_sl6", m_cpr_sl6,
"Copper number of SL6", 0x1100000aU);
92 addParam(
"cpr_sl7", m_cpr_sl7,
"Copper number of SL7", 0x1100000a);
93 addParam(
"cpr_sl8", m_cpr_sl8,
"Copper number of SL8", 0x1100000aU);
94 addParam(
"cpr_gdl", m_cpr_gdl,
"Copper number of GDL", 0x15000001U);
95 addParam(
"cpr_etf", m_cpr_etf,
"Copper number of ETF", 0x15000001U);
96 addParam(
"cpr_grl", m_cpr_grl,
"Copper number of GRL", 0x15000002);
97 addParam(
"cpr_top", m_cpr_top,
"Copper number of TOP", 0x12000001U);
99 addParam(
"on_2d0", m_on_2d0,
"ON/OFF of 2D0",
true);
100 addParam(
"on_2d1", m_on_2d1,
"ON/OFF of 2D1",
true);
101 addParam(
"on_2d2", m_on_2d2,
"ON/OFF of 2D2",
true);
102 addParam(
"on_2d3", m_on_2d3,
"ON/OFF of 2D3",
true);
103 addParam(
"on_3d0", m_on_3d0,
"ON/OFF of 3D0",
true);
104 addParam(
"on_3d1", m_on_3d1,
"ON/OFF of 3D1",
true);
105 addParam(
"on_3d2", m_on_3d2,
"ON/OFF of 3D2",
true);
106 addParam(
"on_3d3", m_on_3d3,
"ON/OFF of 3D3",
true);
107 addParam(
"on_nn0", m_on_nn0,
"ON/OFF of NN0",
true);
108 addParam(
"on_nn1", m_on_nn1,
"ON/OFF of NN1",
true);
109 addParam(
"on_nn2", m_on_nn2,
"ON/OFF of NN2",
true);
110 addParam(
"on_nn3", m_on_nn3,
"ON/OFF of NN3",
true);
111 addParam(
"on_sl0", m_on_sl0,
"ON/OFF of SL0",
true);
112 addParam(
"on_sl1", m_on_sl1,
"ON/OFF of SL1",
true);
113 addParam(
"on_sl2", m_on_sl2,
"ON/OFF of SL2",
true);
114 addParam(
"on_sl3", m_on_sl3,
"ON/OFF of SL3",
true);
115 addParam(
"on_sl4", m_on_sl4,
"ON/OFF of SL4",
true);
116 addParam(
"on_sl5", m_on_sl5,
"ON/OFF of SL5",
true);
117 addParam(
"on_sl6", m_on_sl6,
"ON/OFF of SL6",
true);
118 addParam(
"on_sl7", m_on_sl7,
"ON/OFF of SL7",
true);
119 addParam(
"on_sl8", m_on_sl8,
"ON/OFF of SL8",
true);
120 addParam(
"on_gdl", m_on_gdl,
"ON/OFF of GDL",
true);
121 addParam(
"on_etf", m_on_etf,
"ON/OFF of ETF",
true);
122 addParam(
"on_grl", m_on_grl,
"ON/OFF of GRL",
true);
123 addParam(
"on_top", m_on_top,
"ON/OFF of TOP",
true);
125 addParam(
"nwd_2ds", m_nwd_2ds,
"N word of 2Ds", 3939);
126 addParam(
"nwd_3ds", m_nwd_3ds,
"N word of 3Ds", 3939);
127 addParam(
"nwd_nns", m_nwd_nns,
"N word of NNs", 0xc03);
128 addParam(
"nwd_sl0", m_nwd_sl0,
"N word of SL0", 0xc03);
129 addParam(
"nwd_sl1", m_nwd_sl1,
"N word of SL1", 0x1803);
130 addParam(
"nwd_sl2", m_nwd_sl2,
"N word of SL2", 0x1803);
131 addParam(
"nwd_sl3", m_nwd_sl3,
"N word of SL3", 0x1803);
132 addParam(
"nwd_sl4", m_nwd_sl4,
"N word of SL4", 0xc03);
133 addParam(
"nwd_sl5", m_nwd_sl5,
"N word of SL5", 0x1803);
134 addParam(
"nwd_sl6", m_nwd_sl6,
"N word of SL6", 0xc03);
135 addParam(
"nwd_sl7", m_nwd_sl7,
"N word of SL7", 0x603);
136 addParam(
"nwd_sl8", m_nwd_sl8,
"N word of SL8", 0x603);
137 addParam(
"nwd_gdl", m_nwd_gdl,
"N word of GDL", 646);
138 addParam(
"nwd_etf", m_nwd_etf,
"N word of ETF", 1539);
139 addParam(
"nwd_grl", m_nwd_grl,
"N word of GRL", 0xc03);
140 addParam(
"nwd_top", m_nwd_top,
"N word of TOP", 0x303);
142 addParam(
"nclk_2ds", m_nclk_2ds,
"N clk of 2Ds", 48);
143 addParam(
"nclk_3ds", m_nclk_3ds,
"N clk of 3Ds", 48);
144 addParam(
"nclk_nns", m_nclk_nns,
"N clk of NNs", 48);
145 addParam(
"nclk_sl0", m_nclk_sl0,
"N clk of SL0", 48);
146 addParam(
"nclk_sl1", m_nclk_sl1,
"N clk of SL1", 48);
147 addParam(
"nclk_sl2", m_nclk_sl2,
"N clk of SL2", 48);
148 addParam(
"nclk_sl3", m_nclk_sl3,
"N clk of SL3", 48);
149 addParam(
"nclk_sl4", m_nclk_sl4,
"N clk of SL4", 48);
150 addParam(
"nclk_sl5", m_nclk_sl5,
"N clk of SL5", 48);
151 addParam(
"nclk_sl6", m_nclk_sl6,
"N clk of SL6", 48);
152 addParam(
"nclk_sl7", m_nclk_sl7,
"N clk of SL7", 48);
153 addParam(
"nclk_sl8", m_nclk_sl8,
"N clk of SL8", 48);
154 addParam(
"nclk_gdl", m_nclk_gdl,
"N clk of GDL", 32);
155 addParam(
"nclk_etf", m_nclk_etf,
"N clk of ETF", 48);
156 addParam(
"nclk_grl", m_nclk_grl,
"N clk of GRL", 48);
157 addParam(
"nclk_top", m_nclk_top,
"N clk of TOP", 24);
159 addParam(
"nclk_cdctrg", m_nclk_cdctrg,
"N clock of CDCTRG", 48);
161 addParam(
"scale_2ds", m_scale_2ds,
"Scale factor of 2Ds", 256);
162 addParam(
"scale_3ds", m_scale_3ds,
"Scale factor of 3Ds", 256);
163 addParam(
"scale_nns", m_scale_nns,
"Scale factor of NNs", 256);
164 addParam(
"scale_sl0", m_scale_sl0,
"Scale factor of SL0", 256);
165 addParam(
"scale_sl1", m_scale_sl1,
"Scale factor of SL1", 256);
166 addParam(
"scale_sl2", m_scale_sl2,
"Scale factor of SL2", 256);
167 addParam(
"scale_sl3", m_scale_sl3,
"Scale factor of SL3", 256);
168 addParam(
"scale_sl4", m_scale_sl4,
"Scale factor of SL4", 256);
169 addParam(
"scale_sl5", m_scale_sl5,
"Scale factor of SL5", 256);
170 addParam(
"scale_sl6", m_scale_sl6,
"Scale factor of SL6", 256);
171 addParam(
"scale_sl7", m_scale_sl7,
"Scale factor of SL7", 256);
172 addParam(
"scale_sl8", m_scale_sl8,
"Scale factor of SL8", 256);
173 addParam(
"scale_gdl", m_scale_gdl,
"Scale factor of GDL", 1);
174 addParam(
"scale_etf", m_scale_etf,
"Scale factor of ETF", 512);
175 addParam(
"scale_grl", m_scale_grl,
"Scale factor of GRL", 1);
176 addParam(
"scale_top", m_scale_top,
"Scale factor of TOP", 32);
178 addParam(
"fmid_2d0", m_fmid_2d0,
"Firmware ID of 2D0", 0x32442020);
179 addParam(
"fmid_2d1", m_fmid_2d1,
"Firmware ID of 2D1", 0x32442020);
180 addParam(
"fmid_2d2", m_fmid_2d2,
"Firmware ID of 2D2", 0x32442020);
181 addParam(
"fmid_2d3", m_fmid_2d3,
"Firmware ID of 2D3", 0x32442020);
182 addParam(
"fmid_3d0", m_fmid_3d0,
"Firmware ID of 3D0", 0x33440001);
183 addParam(
"fmid_3d1", m_fmid_3d1,
"Firmware ID of 3D1", 0x33440001);
184 addParam(
"fmid_3d2", m_fmid_3d2,
"Firmware ID of 3D2", 0x33440001);
185 addParam(
"fmid_3d3", m_fmid_3d3,
"Firmware ID of 3D3", 0x33440001);
186 addParam(
"fmid_nn0", m_fmid_nn0,
"Firmware ID of NN0", 0x4e4e5402);
187 addParam(
"fmid_nn1", m_fmid_nn1,
"Firmware ID of NN1", 0x4e4e5402);
188 addParam(
"fmid_nn2", m_fmid_nn2,
"Firmware ID of NN2", 0x4e4e5402);
189 addParam(
"fmid_nn3", m_fmid_nn3,
"Firmware ID of NN3", 0x4e4e5402);
190 addParam(
"fmid_sl0", m_fmid_sl0,
"Firmware ID of SL0", 0x54534630);
191 addParam(
"fmid_sl1", m_fmid_sl1,
"Firmware ID of SL1", 0x54534631);
192 addParam(
"fmid_sl2", m_fmid_sl2,
"Firmware ID of SL2", 0x54534632);
193 addParam(
"fmid_sl3", m_fmid_sl3,
"Firmware ID of SL3", 0x54534633);
194 addParam(
"fmid_sl4", m_fmid_sl4,
"Firmware ID of SL4", 0x54534634);
195 addParam(
"fmid_sl5", m_fmid_sl5,
"Firmware ID of SL5", 0x54534635);
196 addParam(
"fmid_sl6", m_fmid_sl6,
"Firmware ID of SL6", 0x54534636);
197 addParam(
"fmid_sl7", m_fmid_sl7,
"Firmware ID of SL7", 0x54534637);
198 addParam(
"fmid_sl8", m_fmid_sl8,
"Firmware ID of SL8", 0x54534d38);
199 addParam(
"fmid_gdl", m_fmid_gdl,
"Firmware ID of GDL", 0x47444c20U);
200 addParam(
"fmid_etf", m_fmid_etf,
"Firmware ID of ETF", 0x45544620);
201 addParam(
"fmid_grl", m_fmid_grl,
"Firmware ID of GRL", 0x47824c20);
202 addParam(
"fmid_top", m_fmid_top,
"Firmware ID of TOP", 0);
208 B2INFO(
"trgrawdata: initialize() started.");
210 B2INFO(
"no database of gdl unpacker");
217 const int n_leafs = m_unpacker->getnLeafs();
218 const int n_leafsExtra = m_unpacker->getnLeafsExtra();
221 int aBitMap[320][2] = {{0}};
222 int aBitMap_extra[100][3] = {{ -1}};
223 for (
int i = 0; i < n_leafsExtra; i++) {
224 aBitMap_extra[i][0] = m_unpacker->getBitMap_extra(i, 0);
225 aBitMap_extra[i][1] = m_unpacker->getBitMap_extra(i, 1);
226 aBitMap_extra[i][2] = m_unpacker->getBitMap_extra(i, 2);
229 for (
int i = 0; i < 200; i++) {
230 LeafBitMap[i] = m_unpacker->getLeafMap(i);
231 std::cout <<
"LeafBitMap[" << i <<
"] = " << m_unpacker->getLeafMap(i) << std::endl;
232 strcpy(LeafNames[i], m_unpacker->getLeafnames(i));
233 std::cout <<
"LeafNames[" << i <<
"] = " << m_unpacker->getLeafnames(i) << std::endl;
235 for (
int i = 0; i < n_leafs; i++) {
236 aBitMap[i][0] = m_unpacker->getBitMap(i, 0);
237 aBitMap[i][1] = m_unpacker->getBitMap(i, 1);
239 for (
int i = 0; i < 200; i++) {
240 int bin = m_unpacker->getLeafMap(i) + 1;
241 if (0 < bin && bin <= n_leafs) {
242 std::cout <<
"leaf(" << i
244 <<
"), LeafNames[leaf](" << LeafNames[i]
245 <<
"), BitMap[bin-1][0](" << aBitMap[bin - 1][0]
246 <<
"), BitMap[bin-1][1](" << aBitMap[bin - 1][1]
251 for (
int i = 0; i < 200; i++) {
252 int bin = m_unpacker->getLeafMap(i) + 1;
253 int j = bin - n_leafs - 1;
254 if (n_leafs < bin && bin <= n_leafs + n_leafsExtra) {
255 std::cout <<
"i(" << i
257 <<
"), LeafNames[leaf](" << LeafNames[i]
258 <<
"), BitMap_extra[j][0](buf[" << aBitMap_extra[j][0]
259 <<
"]), BitMap_extra[j][1](downto " << aBitMap_extra[j][1]
260 <<
"), BitMap_extra[j][2](" << aBitMap_extra[j][2]
261 <<
" bit length)" << std::endl;
266 for (
int i = 0; i < 50; i++) {
272 cntr_nw3_badvet[i] = 0;
273 cntr_nw3_badtrg[i] = 0;
274 cntr_nw3_badrvc[i] = 0;
277 cntr_nwn_badvet[i] = 0;
278 cntr_nwn_badtrg[i] = 0;
279 cntr_nwn_badrvc[i] = 0;
281 cntr_nwn_badbbb[i] = 0;
282 cntr_nwn_badddd[i] = 0;
284 cntr_nwe_badnwd[i] = 0;
293 B2INFO(
"trgrawdata: event() started.");
297 int _exp = bevt->getExperiment();
298 int _run = bevt->getRun();
299 unsigned _eve = bevt->getEvent();
301 std::cout <<
"**************_eve(" << _eve
303 <<
"), m_nclk_cdctrg(" << m_nclk_cdctrg
304 <<
"), _exp(" << _exp
305 <<
"), _run(" << _run
306 <<
"), _eve(" << _eve
307 <<
"), _Form(" << Form(
"he%010d", (
int)_eve)
310 TH2D* h_0 =
new TH2D(Form(
"he%010d", (
int)_eve),
311 Form(
"e%02dr%04d ev %08d", _exp, _run, (
int)_eve),
313 m_nclk_cdctrg, 0, m_nclk_cdctrg);
316 h_0->GetXaxis()->SetBinLabel(4 * i + 1, Form(
"%s hdevt", moduleNames[i]));
317 h_0->GetXaxis()->SetBinLabel(4 * i + 2, Form(
"%s dtevt", moduleNames[i]));
318 h_0->GetXaxis()->SetBinLabel(4 * i + 3, Form(
"%s L1rvc", moduleNames[i]));
319 h_0->GetXaxis()->SetBinLabel(4 * i + 4, Form(
"%s cc", moduleNames[i]));
325 unsigned gdlrvc12 = -1;
326 for (
int i = 0; i < raw_trgarray.
getEntries(); i++) {
327 for (
int j = 0; j < raw_trgarray[i]->GetNumEntries(); j++) {
328 int cprid = (int)raw_trgarray[i]->GetNodeID(j);
329 unsigned eve20 = (_eve & 0xfffff);
330 for (
int hslb = 0; hslb < 2; hslb++) {
331 int nword = raw_trgarray[i]->GetDetectorNwords(j, hslb);
332 int* buf = raw_trgarray[i]->GetDetectorBuffer(j, hslb);
333 if (0x15000001 == cprid && hslb == 0) {
336 printf(
"aa:GDL start: 0x%x%c exp(%d), run(%d), eve(%u), eve(0x%x), nword(%d)\n",
337 cprid,
'a' + hslb, _exp, _run, _eve, _eve, nword);
341 if (nword > 0) buf0 = (unsigned)buf[0];
343 if (nword > 1) buf1 = (unsigned)buf[1];
345 if (nword > 2) buf2 = (unsigned)buf[2];
350 cntr_nwe_badnwd[e_gdl]++;
351 printf(
"ab:GDL(0x%x%c) exp(%d), run(%d), eve(%u), eve(0x%x), nword(%d), ",
352 cprid,
'a' + hslb, _exp, _run, _eve, _eve, nword);
353 printf(
"buf0(0x%x), buf1(0x%x), buf2(0x%x)\n", buf0, buf1, buf2);
358 printf(
"ad:GDL(0x%x%c) exp(%d), run(%d), eve(%u), eve(0x%x), nword(%d)\n",
359 cprid,
'a' + hslb, _exp, _run, _eve, _eve, nword);
360 cntr_nwe_badnwd[e_gdl]++;
362 unsigned buf5 = (unsigned)buf[m_hdr_nwd_gdl - 1];
364 unsigned buf6 = (unsigned)buf[626];
365 unsigned buf7 = (unsigned)buf[627];
366 unsigned lastdd = (buf6 >> 24) & 0xff;
367 unsigned last_rvc = (buf6 >> 4) & 0xfff;
368 unsigned cnttrg_data_15to12 = buf6 & (0xf);
369 unsigned cnttrg_data_12 = (buf7 >> 20) & (0xfff);
370 gdlrvc12 = (buf5 & 0xfff);
371 unsigned gdlhdrcnttrg20 = (buf5 >> 12) & 0xfffff;
378 unsigned cnttrg_data_16 = (cnttrg_data_15to12 << 12) + cnttrg_data_12;
379 unsigned eve16 = (_eve & 0xffff);
381 h_0->SetBinContent(4 * (
int)e_gdl + 1, m_nclk_gdl, gdlhdrcnttrg20);
382 h_0->SetBinContent(4 * (
int)e_gdl + 2, m_nclk_gdl, cnttrg_data_16);
383 h_0->SetBinContent(4 * (
int)e_gdl + 3, m_nclk_gdl, gdlrvc12);
385 if (nword != m_nwd_gdl || buf0 != m_fmid_gdl || lastdd != 0xdd ||
386 gdlhdrcnttrg20 != eve20 ||
387 !(eve16 == cnttrg_data_16 + 1 || (eve16 == 0 && cnttrg_data_16 == 0xffff))
391 diag |= (nword != m_nwd_gdl) ? 1 : 0;
392 diag |= (buf0 != m_fmid_gdl) ? 2 : 0;
393 diag |= (lastdd != 0xdd) ? 4 : 0;
394 diag |= (gdlhdrcnttrg20 != eve20) ? 8 : 0;
395 diag |= !(eve16 == cnttrg_data_16 + 1 || (eve16 == 0 && cnttrg_data_16 == 0xffff)) ? 16 : 0;
396 printf(
"ae:GDL(0x%x%c) exp(%d), run(%d), evedaq(%u=0x%x), gdlhdrcnttrg20(%u,0x%x), "
397 "cnttrg_data16(%u=0x%x), l1rvc(%u)-lastrvc(%u)=%u, nword(%d), diag(%u)\n",
398 cprid,
'a' + hslb, _exp, _run, _eve, _eve, gdlhdrcnttrg20, gdlhdrcnttrg20,
399 cnttrg_data_16, cnttrg_data_16, gdlrvc12, last_rvc, gdlrvc12 - last_rvc, nword, diag);
401 cntr_nwn_badtrg[e_gdl]++;
412 for (
int i = 0; i < raw_trgarray.
getEntries(); i++) {
413 for (
int j = 0; j < raw_trgarray[i]->GetNumEntries(); j++) {
414 unsigned cprid = raw_trgarray[i]->GetNodeID(j);
416 unsigned eve20 = (_eve & 0xfffff);
417 for (
int hslb = 0; hslb < 2; hslb++) {
420 unsigned _scale = -1;
422 unsigned _hdr_nwd = 3;
423 if (m_cpr_2d0 == cprid && hslb == 0 && m_on_2d0) {
424 e_mdl = e_2d0; _nwd = m_nwd_2ds; _scale = m_scale_2ds; _nclk = m_nclk_2ds; _hdr_nwd = m_hdr_nwd_2d0;
425 }
else if (m_cpr_2d1 == cprid && hslb == 1 && m_on_2d1) {
426 e_mdl = e_2d1; _nwd = m_nwd_2ds; _scale = m_scale_2ds; _nclk = m_nclk_2ds; _hdr_nwd = m_hdr_nwd_2d1;
427 }
else if (m_cpr_2d2 == cprid && hslb == 0 && m_on_2d2) {
428 e_mdl = e_2d2; _nwd = m_nwd_2ds; _scale = m_scale_2ds; _nclk = m_nclk_2ds; _hdr_nwd = m_hdr_nwd_2d2;
429 }
else if (m_cpr_2d3 == cprid && hslb == 1 && m_on_2d3) {
430 e_mdl = e_2d3; _nwd = m_nwd_2ds; _scale = m_scale_2ds; _nclk = m_nclk_2ds; _hdr_nwd = m_hdr_nwd_2d3;
431 }
else if (m_cpr_3d0 == cprid && hslb == 0 && m_on_3d0) {
432 e_mdl = e_3d0; _nwd = m_nwd_3ds; _scale = m_scale_3ds; _nclk = m_nclk_3ds; _hdr_nwd = m_hdr_nwd_3d0;
433 }
else if (m_cpr_3d1 == cprid && hslb == 1 && m_on_3d1) {
434 e_mdl = e_3d1; _nwd = m_nwd_3ds; _scale = m_scale_3ds; _nclk = m_nclk_3ds; _hdr_nwd = m_hdr_nwd_3d1;
435 }
else if (m_cpr_3d2 == cprid && hslb == 0 && m_on_3d2) {
436 e_mdl = e_3d2; _nwd = m_nwd_3ds; _scale = m_scale_3ds; _nclk = m_nclk_3ds; _hdr_nwd = m_hdr_nwd_3d2;
437 }
else if (m_cpr_3d3 == cprid && hslb == 1 && m_on_3d3) {
438 e_mdl = e_3d3; _nwd = m_nwd_3ds; _scale = m_scale_3ds; _nclk = m_nclk_3ds; _hdr_nwd = m_hdr_nwd_3d3;
439 }
else if (m_cpr_nn0 == cprid && hslb == 0 && m_on_nn0) {
440 e_mdl = e_nn0; _nwd = m_nwd_nns; _scale = m_scale_nns; _nclk = m_nclk_nns; _hdr_nwd = m_hdr_nwd_nn0;
441 }
else if (m_cpr_nn1 == cprid && hslb == 1 && m_on_nn1) {
442 e_mdl = e_nn1; _nwd = m_nwd_nns; _scale = m_scale_nns; _nclk = m_nclk_nns; _hdr_nwd = m_hdr_nwd_nn1;
443 }
else if (m_cpr_nn2 == cprid && hslb == 0 && m_on_nn2) {
444 e_mdl = e_nn2; _nwd = m_nwd_nns; _scale = m_scale_nns; _nclk = m_nclk_nns; _hdr_nwd = m_hdr_nwd_nn2;
445 }
else if (m_cpr_nn3 == cprid && hslb == 1 && m_on_nn3) {
446 e_mdl = e_nn3; _nwd = m_nwd_nns; _scale = m_scale_nns; _nclk = m_nclk_nns; _hdr_nwd = m_hdr_nwd_nn3;
447 }
else if (m_cpr_sl0 == cprid && hslb == 0 && m_on_sl0) {
448 e_mdl = e_sl0; _nwd = m_nwd_sl0; _scale = m_scale_sl0; _nclk = m_nclk_sl0; _hdr_nwd = m_hdr_nwd_sl0;
449 }
else if (m_cpr_sl1 == cprid && hslb == 0 && m_on_sl1) {
450 e_mdl = e_sl1; _nwd = m_nwd_sl1; _scale = m_scale_sl1; _nclk = m_nclk_sl1; _hdr_nwd = m_hdr_nwd_sl1;
451 }
else if (m_cpr_sl2 == cprid && hslb == 0 && m_on_sl2) {
452 e_mdl = e_sl2; _nwd = m_nwd_sl2; _scale = m_scale_sl2; _nclk = m_nclk_sl2; _hdr_nwd = m_hdr_nwd_sl2;
453 }
else if (m_cpr_sl3 == cprid && hslb == 1 && m_on_sl3) {
454 e_mdl = e_sl3; _nwd = m_nwd_sl3; _scale = m_scale_sl3; _nclk = m_nclk_sl3; _hdr_nwd = m_hdr_nwd_sl3;
455 }
else if (m_cpr_sl4 == cprid && hslb == 1 && m_on_sl4) {
456 e_mdl = e_sl4; _nwd = m_nwd_sl4; _scale = m_scale_sl4; _nclk = m_nclk_sl4; _hdr_nwd = m_hdr_nwd_sl4;
457 }
else if (m_cpr_sl5 == cprid && hslb == 1 && m_on_sl5) {
458 e_mdl = e_sl5; _nwd = m_nwd_sl5; _scale = m_scale_sl5; _nclk = m_nclk_sl5; _hdr_nwd = m_hdr_nwd_sl5;
459 }
else if (m_cpr_sl6 == cprid && hslb == 0 && m_on_sl6) {
460 e_mdl = e_sl6; _nwd = m_nwd_sl6; _scale = m_scale_sl6; _nclk = m_nclk_sl6; _hdr_nwd = m_hdr_nwd_sl6;
461 }
else if (m_cpr_sl8 == cprid && hslb == 0 && m_on_sl8) {
462 e_mdl = e_sl8; _nwd = m_nwd_sl8; _scale = m_scale_sl8; _nclk = m_nclk_sl8; _hdr_nwd = m_hdr_nwd_sl8;
463 }
else if (m_cpr_etf == cprid && hslb == 1 && m_on_etf) {
464 e_mdl = e_etf; _nwd = m_nwd_etf; _scale = m_scale_etf; _nclk = m_nclk_etf; _hdr_nwd = m_hdr_nwd_etf;
465 }
else if (m_cpr_top == cprid && hslb == 0 && m_on_top) {
466 e_mdl = e_top; _nwd = m_nwd_top; _scale = m_scale_top; _nclk = m_nclk_top; _hdr_nwd = m_hdr_nwd_top;
471 unsigned nword = raw_trgarray[i]->GetDetectorNwords(j, hslb);
472 int* buf = raw_trgarray[i]->GetDetectorBuffer(j, hslb);
474 if (nword > 0) buf0 = (unsigned)buf[0];
476 if (nword > 1) buf1 = (unsigned)buf[1];
478 if (nword > 2) buf2 = (unsigned)buf[2];
479 unsigned buf2cnttrg20 = (buf2 >> 12) & 0xfffff;
480 unsigned buf2rvc12 = (buf2 & 0xfff);
484 cntr_nwe_badnwd[e_mdl]++;
485 printf(
"ah:%s(0x%x%c) exp(%d), run(%d), eve(%u), eve(0x%x), nword(%u), ",
486 moduleNames[e_mdl], cprid,
'a' + hslb, _exp, _run, _eve, _eve, nword);
487 printf(
"buf0(0x%x), buf1(0x%x), buf2(0x%x)\n", buf0, buf1, buf2);
489 }
else if (nword == _hdr_nwd) {
491 if (gdlrvc12 != buf2rvc12) {
492 printf(
"ai:%s(0x%x%c) exp(%d), run(%d), eve(%u,0x%x), nword(%u), gdlrvc12(0x%x), buf2rvc12(0x%x)\n",
493 moduleNames[e_mdl], cprid,
'a' + hslb, _exp, _run, _eve, _eve, nword, gdlrvc12, buf2rvc12);
494 cntr_nw3_badrvc[e_mdl]++;
495 }
else if (eve20 != buf2cnttrg20) {
496 printf(
"aj:%s(0x%x%c) exp(%d), run(%d), eve(%u,0x%x), nword(%u), cnttrg20(0x%x)\n",
497 moduleNames[e_mdl], cprid,
'a' + hslb, _exp, _run, _eve, _eve, nword, buf2cnttrg20);
498 cntr_nw3_badtrg[e_mdl]++;
499 }
else if ((_eve % _scale) == 0) {
500 cntr_nw3_badvet[e_mdl]++;
505 }
else if (nword != _nwd) {
507 printf(
"bo:wrong nword: %s(0x%x%c) exp(%d), run(%d), eve(%u,0x%x), nword(%u), buf0(0x%x), buf2(0x%x)\n",
508 moduleNames[e_mdl], cprid,
'a' + hslb, _exp, _run, _eve, _eve, nword, buf0, buf2);
509 cntr_nwe_badnwd[e_mdl]++;
513 unsigned buf3 = (unsigned)buf[_hdr_nwd];
514 unsigned buf3dddd = ((buf3 >> 16) & 0xffff);
515 unsigned buf4 = (unsigned)buf[_hdr_nwd + 1];
516 unsigned buf5 = (unsigned)buf[_hdr_nwd + 2];
517 unsigned wdperclk = (_nwd - _hdr_nwd) / _nclk;
519 unsigned ibuf_lastclk_msw = _nwd - wdperclk;
521 unsigned buf_lastclk_msw2 = (unsigned)buf[ibuf_lastclk_msw + 1];
522 unsigned buf_lastclk_msw3 = (unsigned)buf[ibuf_lastclk_msw + 2];
524 unsigned datacnttrg32 = 0;
525 unsigned buf4_msb16 = (buf4 & 0xffff);
526 unsigned buf5_lsb16 = ((buf5 >> 16) & 0xffff);
529 printf(
"af:Debug0: %s(0x%x%c) exp(%d), run(%d), eve(%u), eve(0x%x), nword(%u)\n",
530 moduleNames[e_mdl], cprid,
'a' + hslb, _exp, _run, _eve, _eve, nword);
540 if ((0x11000009 == cprid && hslb == 0) ||
541 (0x11000008 == cprid && hslb == 1) ||
542 (0x11000009 == cprid && hslb == 1)
553 }
else if ((0x11000007 == cprid && hslb == 0) ||
554 (0x11000007 == cprid && hslb == 1) ||
555 (0x1100000a == cprid && hslb == 0)
566 datacnttrg32 = (buf4_msb16 << 16) + buf5_lsb16;
568 }
else if ((m_cpr_2d0 == cprid && hslb == 0 && m_on_2d0) ||
569 (m_cpr_2d1 == cprid && hslb == 1 && m_on_2d1) ||
570 (m_cpr_2d2 == cprid && hslb == 0 && m_on_2d2) ||
571 (m_cpr_2d3 == cprid && hslb == 1 && m_on_2d3)) {
576 unsigned buf_lastclk_lsb = (unsigned)buf[_nwd - 1];
577 unsigned buf_lastclk_lsb2 = (unsigned)buf[_nwd - 2];
581 datacnttrg32 = ((buf_lastclk_lsb2 & 0xff) << 24) + (buf_lastclk_lsb >> 8);
583 }
else if ((m_cpr_3d0 == cprid && hslb == 0 && m_on_3d0) ||
584 (m_cpr_3d1 == cprid && hslb == 1 && m_on_3d1) ||
585 (m_cpr_3d2 == cprid && hslb == 0 && m_on_3d2) ||
586 (m_cpr_3d3 == cprid && hslb == 1 && m_on_3d3)) {
596 unsigned datacnttrg_msb16 = (buf_lastclk_msw2 & 0xffff);
597 unsigned datacnttrg_lsb16 = ((buf_lastclk_msw3 >> 16) & 0xffff);
598 datacnttrg32 = (datacnttrg_msb16 << 16) + datacnttrg_lsb16;
600 }
else if ((m_cpr_nn0 == cprid && hslb == 0 && m_on_nn0) ||
601 (m_cpr_nn1 == cprid && hslb == 1 && m_on_nn1) ||
602 (m_cpr_nn2 == cprid && hslb == 0 && m_on_nn2) ||
603 (m_cpr_nn3 == cprid && hslb == 1 && m_on_nn3)) {
625 unsigned datacnttrg_msb16 = (buf_lastclk_msw2 & 0xffff);
626 unsigned datacnttrg_lsb16 = ((buf_lastclk_msw3 >> 16) & 0xffff);
627 datacnttrg32 = (datacnttrg_msb16 << 16) + datacnttrg_lsb16;
628 }
else if (m_cpr_top == cprid && hslb == 0 && m_on_top) {
632 bool something_bad =
false;
633 h_0->SetBinContent(4 * e_mdl + 1, _nclk, buf2cnttrg20);
634 h_0->SetBinContent(4 * e_mdl + 2, _nclk, datacnttrg32);
635 h_0->SetBinContent(4 * e_mdl + 3, _nclk, buf2rvc12);
636 if (gdlrvc12 != buf2rvc12) {
637 printf(
"ba:%s(0x%x%c) exp(%d), run(%d), eve(%u,0x%x), nword(%u), gdlrvc12(0x%x), buf2rvc12(0x%x)\n",
638 moduleNames[e_mdl], cprid,
'a' + hslb, _exp, _run, _eve, _eve, nword, gdlrvc12, buf2rvc12);
639 cntr_nwn_badrvc[e_mdl]++;
640 something_bad =
true;
642 if (buf3dddd == 0xbbbb) {
643 cntr_nwn_badbbb[e_mdl]++;
644 printf(
"bv:%s(0x%x%c) exp(%d), run(%d), eve(%u,0x%x), nword(%u), cnttrg20(0x%x), dddd(0x%x), datacnttrg32(0x%x)\n",
645 moduleNames[e_mdl], cprid,
'a' + hslb, _exp, _run, _eve, _eve, nword, buf2cnttrg20, buf3dddd, datacnttrg32);
646 something_bad =
true;
648 if (buf3dddd != 0xdddd) {
649 cntr_nwn_badddd[e_mdl]++;
650 printf(
"bb:%s(0x%x%c) exp(%d), run(%d), eve(%u,0x%x), nword(%u), cnttrg20(0x%x), dddd(0x%x), datacnttrg32(0x%x)\n",
651 moduleNames[e_mdl], cprid,
'a' + hslb, _exp, _run, _eve, _eve, nword, buf2cnttrg20, buf3dddd, datacnttrg32);
652 something_bad =
true;
654 if (datacnttrg32 + 1 != _eve) {
656 (m_cpr_top == cprid) ||
657 (m_cpr_3d0 <= cprid && cprid <= m_cpr_3d3)
660 printf(
"bc:%s(0x%x%c) exp(%d), run(%d), eve(%u,0x%x), nword(%u), cnttrg20(0x%x), dddd(0x%x), datacnttrg32(0x%x)\n",
661 moduleNames[e_mdl], cprid,
'a' + hslb, _exp, _run, _eve, _eve, nword, buf2cnttrg20, buf3dddd, datacnttrg32);
662 cntr_nwn_badtrg[e_mdl]++;
663 something_bad =
true;
666 if (! something_bad) cntr_nwn[e_mdl]++;
673 for (
int i = 0; i < raw_trgarray.
getEntries(); i++) {
674 for (
int j = 0; j < raw_trgarray[i]->GetNumEntries(); j++) {
675 unsigned cprid = raw_trgarray[i]->GetNodeID(j);
678 unsigned _eveRaw = raw_trgarray[i]->GetEveNo(j);
679 if ((0x11000001 <= cprid && cprid <= 0x1100000a) ||
680 (0x15000001 <= cprid && cprid <= 0x15000002) ||
681 (0x12000001 == cprid)
686 for (
int hslb = 0; hslb < 2; hslb++) {
687 int nclks = m_nclk_cdctrg;
688 unsigned _hdr_nwd = 3;
691 if (m_cpr_top == cprid && hslb == 0 && m_on_top) {
692 e_mdl = e_top; _nwd = m_nwd_top;
693 nclks = m_nclk_top; _hdr_nwd = m_hdr_nwd_top;
694 }
else if (m_cpr_2d0 == cprid && hslb == 0 && m_on_2d0) {
695 e_mdl = e_2d0; _nwd = m_nwd_2ds; _hdr_nwd = m_hdr_nwd_2d0;
696 }
else if (m_cpr_2d1 == cprid && hslb == 1 && m_on_2d1) {
697 e_mdl = e_2d1; _nwd = m_nwd_2ds; _hdr_nwd = m_hdr_nwd_2d1;
698 }
else if (m_cpr_2d2 == cprid && hslb == 0 && m_on_2d2) {
699 e_mdl = e_2d2; _nwd = m_nwd_2ds; _hdr_nwd = m_hdr_nwd_2d2;
700 }
else if (m_cpr_2d3 == cprid && hslb == 1 && m_on_2d3) {
701 e_mdl = e_2d3; _nwd = m_nwd_2ds; _hdr_nwd = m_hdr_nwd_2d3;
702 }
else if (m_cpr_3d0 == cprid && hslb == 0 && m_on_3d0) {
703 e_mdl = e_3d0; _nwd = m_nwd_3ds; _hdr_nwd = m_hdr_nwd_3d0;
704 }
else if (m_cpr_3d1 == cprid && hslb == 1 && m_on_3d1) {
705 e_mdl = e_3d1; _nwd = m_nwd_3ds; _hdr_nwd = m_hdr_nwd_3d1;
706 }
else if (m_cpr_3d2 == cprid && hslb == 0 && m_on_3d2) {
707 e_mdl = e_3d2; _nwd = m_nwd_3ds; _hdr_nwd = m_hdr_nwd_3d2;
708 }
else if (m_cpr_3d3 == cprid && hslb == 1 && m_on_3d3) {
709 e_mdl = e_3d3; _nwd = m_nwd_3ds; _hdr_nwd = m_hdr_nwd_3d3;
710 }
else if (m_cpr_nn0 == cprid && hslb == 0 && m_on_nn0) {
711 e_mdl = e_nn0; _nwd = m_nwd_nns; _hdr_nwd = m_hdr_nwd_nn0;
712 }
else if (m_cpr_nn1 == cprid && hslb == 1 && m_on_nn1) {
713 e_mdl = e_nn1; _nwd = m_nwd_nns; _hdr_nwd = m_hdr_nwd_nn1;
714 }
else if (m_cpr_nn2 == cprid && hslb == 0 && m_on_nn2) {
715 e_mdl = e_nn2; _nwd = m_nwd_nns; _hdr_nwd = m_hdr_nwd_nn2;
716 }
else if (m_cpr_nn3 == cprid && hslb == 1 && m_on_nn3) {
717 e_mdl = e_nn3; _nwd = m_nwd_nns; _hdr_nwd = m_hdr_nwd_nn3;
718 }
else if (m_cpr_sl0 == cprid && hslb == 0 && m_on_sl0) {
719 e_mdl = e_sl0; _nwd = m_nwd_sl0; _hdr_nwd = m_hdr_nwd_sl0;
720 }
else if (m_cpr_sl1 == cprid && hslb == 0 && m_on_sl1) {
721 e_mdl = e_sl1; _nwd = m_nwd_sl1; _hdr_nwd = m_hdr_nwd_sl1;
722 }
else if (m_cpr_sl2 == cprid && hslb == 0 && m_on_sl2) {
723 e_mdl = e_sl2; _nwd = m_nwd_sl2; _hdr_nwd = m_hdr_nwd_sl2;
724 }
else if (m_cpr_sl3 == cprid && hslb == 1 && m_on_sl3) {
725 e_mdl = e_sl3; _nwd = m_nwd_sl3; _hdr_nwd = m_hdr_nwd_sl3;
726 }
else if (m_cpr_sl4 == cprid && hslb == 1 && m_on_sl4) {
727 e_mdl = e_sl4; _nwd = m_nwd_sl4; _hdr_nwd = m_hdr_nwd_sl4;
728 }
else if (m_cpr_sl5 == cprid && hslb == 1 && m_on_sl5) {
729 e_mdl = e_sl5; _nwd = m_nwd_sl5; _hdr_nwd = m_hdr_nwd_sl5;
730 }
else if (m_cpr_sl6 == cprid && hslb == 0 && m_on_sl6) {
731 e_mdl = e_sl6; _nwd = m_nwd_sl6; _hdr_nwd = m_hdr_nwd_sl6;
732 }
else if (m_cpr_sl8 == cprid && hslb == 0 && m_on_sl8) {
733 e_mdl = e_sl8; _nwd = m_nwd_sl8; _hdr_nwd = m_hdr_nwd_sl8;
734 }
else if (m_cpr_etf == cprid && hslb == 1 && m_on_etf) {
735 e_mdl = e_etf; _nwd = m_nwd_etf; _hdr_nwd = m_hdr_nwd_etf;
736 }
else if (m_cpr_gdl == cprid && hslb == 0 && m_on_gdl) {
737 e_mdl = e_gdl; _nwd = m_nwd_gdl;
738 nclks = m_nclk_gdl; _hdr_nwd = 6;
742 unsigned nword = raw_trgarray[i]->GetDetectorNwords(j, hslb);
743 if (nword == _hdr_nwd)
continue;
745 printf(
"bu:Nword mismatch:nword(%u),expected(%u). eve(%u), %s(0x%x%c), nword(%u)\n",
746 nword, _nwd, _eveRaw, moduleNames[e_mdl], cprid,
'a' + hslb, nword);
748 int* buf = raw_trgarray[i]->GetDetectorBuffer(j, hslb);
749 int i47 = _hdr_nwd + (nclks - 1) * (_nwd - _hdr_nwd) / nclks;
750 if (i47 >
int(nword) - 1) {
751 if (m_print_clkcyc_err)
752 printf(
"bp:data truncation. eve(%u), %s(0x%x%c), nword(%u)\n",
753 _eveRaw, moduleNames[e_mdl], cprid,
'a' + hslb, nword);
756 unsigned buf47 = buf[i47];
757 bool break_this_module =
false;
758 bool cc_disorder =
false;
760 unsigned prev_cc = buf47 & 0xffff;
761 if (e_mdl == e_gdl) {
762 prev_cc = (buf47 >> 4) & 0xfff;
765 sprintf(ccc,
"i47(%d),buf47(0x%x),%x", i47, buf47, prev_cc);
766 std::string ccs(ccc);
767 for (
int clk = 0; clk < nclks; clk++) {
768 unsigned ibuf = _hdr_nwd + clk * (nword - _hdr_nwd) / nclks;
769 if (ibuf > nword - 1) {
770 if (m_print_clkcyc_err)
771 printf(
"bq:data truncation. eve(%u), %s(0x%x%c), nword(%u)\n",
772 _eveRaw, moduleNames[e_mdl], cprid,
'a' + hslb, nword);
773 break_this_module =
true;
774 cntr_bad_nwd[e_mdl]++;
777 unsigned ddddcc = buf[ibuf];
778 unsigned dddd = (ddddcc >> 16) & 0xffff;
779 unsigned cc = ddddcc & 0xffff;
780 if (e_mdl == e_gdl) {
781 cc = (ddddcc >> 4) & 0xfff;
783 h_0->SetBinContent(4 * e_mdl + 4, clk + 1, cc);
784 sprintf(ccc,
",%x", cc);
785 if ((
int)e_2d0 <= (
int)e_mdl && (
int)e_mdl <= (
int)e_2d3 &&
798 int i_addr = ibuf + 79;
799 int val_addr = buf[i_addr];
800 int addr_o = (val_addr >> 8) & 0xff;
801 int addr_i = val_addr & 0xff;
802 sprintf(ccc,
",%x(%d,%d)", cc, addr_i, addr_o);
805 if (e_mdl == e_gdl) {
806 dddd = (ddddcc >> 24);
808 if (m_print_clkcyc_err)
809 printf(
"br:dddd not found. eve(%u), %s(0x%x%c), nword(%u)\n",
810 _eveRaw, moduleNames[e_mdl], cprid,
'a' + hslb, nword);
811 break_this_module =
true;
812 cntr_bad_ddd[e_mdl]++;
815 }
else if (dddd != 0xdddd) {
816 if (m_print_clkcyc_err)
817 printf(
"bs:dddd not found. eve(%u), %s(0x%x%c), nword(%u)\n",
818 _eveRaw, moduleNames[e_mdl], cprid,
'a' + hslb, nword);
819 break_this_module =
true;
820 cntr_bad_ddd[e_mdl]++;
824 if (!(cc == prev_cc + 4 || prev_cc == cc + 4 * (nclks - 1) || prev_cc + 0x500 == cc + 4 * (nclks - 1)
825 || cc + 0x500 == prev_cc + 4)) {
831 if (break_this_module)
continue;
833 cntr_bad_odr[e_mdl]++;
835 printf(
"bt:ccdisorder: eve(%u), %s(0x%x%c), nword(%u), %s\n",
836 _eveRaw, moduleNames[e_mdl], cprid,
'a' + hslb, nword, ccs.c_str());
839 cntr_good_odr[e_mdl]++;
846 if (! m_histRecord) {
HistoModule.h is supposed to be used instead of Module.h for the modules with histogram definitions t...
void setDescription(const std::string &description)
Sets the description of the module.
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
@ c_ParallelProcessingCertified
This module can be run in parallel processing mode safely (All I/O must be done through the data stor...
Accessor to arrays stored in the data store.
int getEntries() const
Get the number of objects in the array.
Type-safe access to single objects in the data store.
static const unsigned int c_nModules
number of modules
virtual void initialize() override
initialize
virtual void event() override
Event.
TRGRAWDATAModule()
Costructor.
virtual void defineHisto() override
Define Histogram.
void addParam(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Abstract base class for different kinds of events.