Belle II Software  release-08-01-10
TRGCDCETFUnpackerModule.h
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 //---------------------------------------------------------------
9 // $Id$
10 //---------------------------------------------------------------
11 // Filename : TRGCDCETFUnpackerModule.h
12 // Section :
13 // Owner :
14 // Email :
15 //---------------------------------------------------------------
16 // Description : TRGCDCETFUnpacker Module
17 //---------------------------------------------------------------
18 // $Log$
19 //---------------------------------------------------------------
20 
21 #ifndef TRGCDCETFUNPACKER_H
22 #define TRGCDCETFUNPACKER_H
23 
24 #include <string>
25 
26 #include "rawdata/dataobjects/RawTRG.h"
27 #include "trg/cdc/dataobjects/TRGCDCETFUnpackerStore.h"
28 
29 #include <framework/datastore/StoreArray.h>
30 #include <framework/core/Module.h>
31 
32 namespace Belle2 {
38  namespace TRGCDCETFUNPACKERSPACE {
39 
41  const int nLeafs = 108;
43  const int nLeafsExtra = 4;
45  const int nClks = 48 ;
47  const int nBits = 1024;
49  const char* LeafNames[nLeafs + nLeafsExtra] = {
50  "etf_threshold",
51  "etf_threshold2",
52  "etf_holdtime",
53  "etf_firmvers",
54  "etf_cc",
55  "etf_output_gdl",
56  "etf_valid_gdl",
57  "etf_output",
58  "etf_valid",
59 
60  "etf_tsf8_nhit",
61  "etf_tsf8_ft9",
62  "etf_tsf8_ft8",
63  "etf_tsf8_ft7",
64  "etf_tsf8_ft6",
65  "etf_tsf8_ft5",
66  "etf_tsf8_ft4",
67  "etf_tsf8_ft3",
68  "etf_tsf8_ft2",
69  "etf_tsf8_ft1",
70  "etf_tsf8_ft0",
71 
72  "etf_tsf7_nhit",
73  "etf_tsf7_ft9",
74  "etf_tsf7_ft8",
75  "etf_tsf7_ft7",
76  "etf_tsf7_ft6",
77  "etf_tsf7_ft5",
78  "etf_tsf7_ft4",
79  "etf_tsf7_ft3",
80  "etf_tsf7_ft2",
81  "etf_tsf7_ft1",
82  "etf_tsf7_ft0",
83 
84  "etf_tsf6_nhit",
85  "etf_tsf6_ft9",
86  "etf_tsf6_ft8",
87  "etf_tsf6_ft7",
88  "etf_tsf6_ft6",
89  "etf_tsf6_ft5",
90  "etf_tsf6_ft4",
91  "etf_tsf6_ft3",
92  "etf_tsf6_ft2",
93  "etf_tsf6_ft1",
94  "etf_tsf6_ft0",
95 
96  "etf_tsf5_nhit",
97  "etf_tsf5_ft9",
98  "etf_tsf5_ft8",
99  "etf_tsf5_ft7",
100  "etf_tsf5_ft6",
101  "etf_tsf5_ft5",
102  "etf_tsf5_ft4",
103  "etf_tsf5_ft3",
104  "etf_tsf5_ft2",
105  "etf_tsf5_ft1",
106  "etf_tsf5_ft0",
107 
108  "etf_tsf4_nhit",
109  "etf_tsf4_ft9",
110  "etf_tsf4_ft8",
111  "etf_tsf4_ft7",
112  "etf_tsf4_ft6",
113  "etf_tsf4_ft5",
114  "etf_tsf4_ft4",
115  "etf_tsf4_ft3",
116  "etf_tsf4_ft2",
117  "etf_tsf4_ft1",
118  "etf_tsf4_ft0",
119 
120  "etf_tsf3_nhit",
121  "etf_tsf3_ft9",
122  "etf_tsf3_ft8",
123  "etf_tsf3_ft7",
124  "etf_tsf3_ft6",
125  "etf_tsf3_ft5",
126  "etf_tsf3_ft4",
127  "etf_tsf3_ft3",
128  "etf_tsf3_ft2",
129  "etf_tsf3_ft1",
130  "etf_tsf3_ft0",
131 
132  "etf_tsf2_nhit",
133  "etf_tsf2_ft9",
134  "etf_tsf2_ft8",
135  "etf_tsf2_ft7",
136  "etf_tsf2_ft6",
137  "etf_tsf2_ft5",
138  "etf_tsf2_ft4",
139  "etf_tsf2_ft3",
140  "etf_tsf2_ft2",
141  "etf_tsf2_ft1",
142  "etf_tsf2_ft0",
143 
144  "etf_tsf1_nhit",
145  "etf_tsf1_ft9",
146  "etf_tsf1_ft8",
147  "etf_tsf1_ft7",
148  "etf_tsf1_ft6",
149  "etf_tsf1_ft5",
150  "etf_tsf1_ft4",
151  "etf_tsf1_ft3",
152  "etf_tsf1_ft2",
153  "etf_tsf1_ft1",
154  "etf_tsf1_ft0",
155 
156  "etf_tsf0_nhit",
157  "etf_tsf0_ft9",
158  "etf_tsf0_ft8",
159  "etf_tsf0_ft7",
160  "etf_tsf0_ft6",
161  "etf_tsf0_ft5",
162  "etf_tsf0_ft4",
163  "etf_tsf0_ft3",
164  "etf_tsf0_ft2",
165  "etf_tsf0_ft1",
166  "etf_tsf0_ft0",
167  "evt", "clk", "firmid", "firmvers"
168 
169  };
170 
172  enum EBits {
173  e_etf_threshold,
174  e_etf_threshold2,
175  e_etf_holdtime,
176  e_etf_firmvers,
177  e_etf_cc,
178  e_etf_output_gdl,
179  e_etf_valid_gdl,
180  e_etf_output,
181  e_etf_valid,
182 
183  e_etf_tsf8_nhit,
184  e_etf_tsf8_ft9,
185  e_etf_tsf8_ft8,
186  e_etf_tsf8_ft7,
187  e_etf_tsf8_ft6,
188  e_etf_tsf8_ft5,
189  e_etf_tsf8_ft4,
190  e_etf_tsf8_ft3,
191  e_etf_tsf8_ft2,
192  e_etf_tsf8_ft1,
193  e_etf_tsf8_ft0,
194 
195  e_etf_tsf7_nhit,
196  e_etf_tsf7_ft9,
197  e_etf_tsf7_ft8,
198  e_etf_tsf7_ft7,
199  e_etf_tsf7_ft6,
200  e_etf_tsf7_ft5,
201  e_etf_tsf7_ft4,
202  e_etf_tsf7_ft3,
203  e_etf_tsf7_ft2,
204  e_etf_tsf7_ft1,
205  e_etf_tsf7_ft0,
206 
207  e_etf_tsf6_nhit,
208  e_etf_tsf6_ft9,
209  e_etf_tsf6_ft8,
210  e_etf_tsf6_ft7,
211  e_etf_tsf6_ft6,
212  e_etf_tsf6_ft5,
213  e_etf_tsf6_ft4,
214  e_etf_tsf6_ft3,
215  e_etf_tsf6_ft2,
216  e_etf_tsf6_ft1,
217  e_etf_tsf6_ft0,
218 
219  e_etf_tsf5_nhit,
220  e_etf_tsf5_ft9,
221  e_etf_tsf5_ft8,
222  e_etf_tsf5_ft7,
223  e_etf_tsf5_ft6,
224  e_etf_tsf5_ft5,
225  e_etf_tsf5_ft4,
226  e_etf_tsf5_ft3,
227  e_etf_tsf5_ft2,
228  e_etf_tsf5_ft1,
229  e_etf_tsf5_ft0,
230 
231  e_etf_tsf4_nhit,
232  e_etf_tsf4_ft9,
233  e_etf_tsf4_ft8,
234  e_etf_tsf4_ft7,
235  e_etf_tsf4_ft6,
236  e_etf_tsf4_ft5,
237  e_etf_tsf4_ft4,
238  e_etf_tsf4_ft3,
239  e_etf_tsf4_ft2,
240  e_etf_tsf4_ft1,
241  e_etf_tsf4_ft0,
242 
243  e_etf_tsf3_nhit,
244  e_etf_tsf3_ft9,
245  e_etf_tsf3_ft8,
246  e_etf_tsf3_ft7,
247  e_etf_tsf3_ft6,
248  e_etf_tsf3_ft5,
249  e_etf_tsf3_ft4,
250  e_etf_tsf3_ft3,
251  e_etf_tsf3_ft2,
252  e_etf_tsf3_ft1,
253  e_etf_tsf3_ft0,
254 
255  e_etf_tsf2_nhit,
256  e_etf_tsf2_ft9,
257  e_etf_tsf2_ft8,
258  e_etf_tsf2_ft7,
259  e_etf_tsf2_ft6,
260  e_etf_tsf2_ft5,
261  e_etf_tsf2_ft4,
262  e_etf_tsf2_ft3,
263  e_etf_tsf2_ft2,
264  e_etf_tsf2_ft1,
265  e_etf_tsf2_ft0,
266 
267  e_etf_tsf1_nhit,
268  e_etf_tsf1_ft9,
269  e_etf_tsf1_ft8,
270  e_etf_tsf1_ft7,
271  e_etf_tsf1_ft6,
272  e_etf_tsf1_ft5,
273  e_etf_tsf1_ft4,
274  e_etf_tsf1_ft3,
275  e_etf_tsf1_ft2,
276  e_etf_tsf1_ft1,
277  e_etf_tsf1_ft0,
278 
279  e_etf_tsf0_nhit,
280  e_etf_tsf0_ft9,
281  e_etf_tsf0_ft8,
282  e_etf_tsf0_ft7,
283  e_etf_tsf0_ft6,
284  e_etf_tsf0_ft5,
285  e_etf_tsf0_ft4,
286  e_etf_tsf0_ft3,
287  e_etf_tsf0_ft2,
288  e_etf_tsf0_ft1,
289  e_etf_tsf0_ft0,
290 
291  e_evt, e_clk, e_firmid, e_firmvers
292  };
293 
295  const int BitMap[nLeafs][2] = {
296  {971, 3}, //etf_threshold (971 downto 968)
297  {967, 3}, //etf_threshold2 (967 downto 964)
298  {963, 7}, //etf_holdtime (963 downto 956)
299  {955, 31}, //etf_firmvers (955 downto 924)
300  {923, 8}, //etf_cc (923 downto 915)
301  {914, 12}, //etf_output_gdl (914 downto 902)
302  {901, 0}, //etf_valid_gdl (901 downto 901)
303  {900, 8}, //etf_output (900 downto 892)
304  {891, 0}, //etf_valid (891 downto 891)
305 
306  {890, 8}, //etf_tsf8_nhit (890 downto 882)
307  {881, 8}, //etf_tsf8_ft9 (881 downto 873)
308  {872, 8}, //etf_tsf8_ft8 (872 downto 864)
309  {863, 8}, //etf_tsf8_ft7 (863 downto 855)
310  {854, 8}, //etf_tsf8_ft6 (854 downto 846)
311  {845, 8}, //etf_tsf8_ft5 (845 downto 837)
312  {836, 8}, //etf_tsf8_ft4 (836 downto 828)
313  {827, 8}, //etf_tsf8_ft3 (827 downto 819)
314  {818, 8}, //etf_tsf8_ft2 (818 downto 810)
315  {809, 8}, //etf_tsf8_ft1 (809 downto 801)
316  {800, 8}, //etf_tsf8_ft0 (800 downto 792)
317 
318  {791, 8}, //etf_tsf7_nhit (791 downto 783)
319  {782, 8}, //etf_tsf7_ft9 (782 downto 774)
320  {773, 8}, //etf_tsf7_ft8 (773 downto 765)
321  {764, 8}, //etf_tsf7_ft7 (764 downto 756)
322  {755, 8}, //etf_tsf7_ft6 (755 downto 747)
323  {746, 8}, //etf_tsf7_ft5 (746 downto 738)
324  {737, 8}, //etf_tsf7_ft4 (737 downto 729)
325  {728, 8}, //etf_tsf7_ft3 (728 downto 720)
326  {719, 8}, //etf_tsf7_ft2 (719 downto 711)
327  {710, 8}, //etf_tsf7_ft1 (710 downto 702)
328  {701, 8}, //etf_tsf7_ft0 (701 downto 693)
329 
330  {692, 8}, //etf_tsf6_nhit (692 downto 684)
331  {683, 8}, //etf_tsf6_ft9 (683 downto 675)
332  {674, 8}, //etf_tsf6_ft8 (674 downto 666)
333  {665, 8}, //etf_tsf6_ft7 (665 downto 657)
334  {656, 8}, //etf_tsf6_ft6 (656 downto 648)
335  {647, 8}, //etf_tsf6_ft5 (647 downto 639)
336  {638, 8}, //etf_tsf6_ft4 (638 downto 630)
337  {629, 8}, //etf_tsf6_ft3 (629 downto 621)
338  {620, 8}, //etf_tsf6_ft2 (620 downto 612)
339  {611, 8}, //etf_tsf6_ft1 (611 downto 603)
340  {602, 8}, //etf_tsf6_ft0 (602 downto 594)
341 
342  {593, 8}, //etf_tsf5_nhit (593 downto 585)
343  {584, 8}, //etf_tsf5_ft9 (584 downto 576)
344  {575, 8}, //etf_tsf5_ft8 (575 downto 567)
345  {566, 8}, //etf_tsf5_ft7 (566 downto 558)
346  {557, 8}, //etf_tsf5_ft6 (557 downto 549)
347  {548, 8}, //etf_tsf5_ft5 (548 downto 540)
348  {539, 8}, //etf_tsf5_ft4 (539 downto 531)
349  {530, 8}, //etf_tsf5_ft3 (530 downto 522)
350  {521, 8}, //etf_tsf5_ft2 (521 downto 513)
351  {512, 8}, //etf_tsf5_ft1 (512 downto 504)
352  {503, 8}, //etf_tsf5_ft0 (503 downto 495)
353 
354  {494, 8}, //etf_tsf4_nhit (494 downto 486)
355  {485, 8}, //etf_tsf4_ft9 (485 downto 477)
356  {476, 8}, //etf_tsf4_ft8 (476 downto 468)
357  {467, 8}, //etf_tsf4_ft7 (467 downto 459)
358  {458, 8}, //etf_tsf4_ft6 (458 downto 450)
359  {449, 8}, //etf_tsf4_ft5 (449 downto 441)
360  {440, 8}, //etf_tsf4_ft4 (440 downto 432)
361  {431, 8}, //etf_tsf4_ft3 (431 downto 423)
362  {422, 8}, //etf_tsf4_ft2 (422 downto 414)
363  {413, 8}, //etf_tsf4_ft1 (413 downto 405)
364  {404, 8}, //etf_tsf4_ft0 (404 downto 396)
365 
366  {395, 8}, //etf_tsf3_nhit (395 downto 387)
367  {386, 8}, //etf_tsf3_ft9 (386 downto 378)
368  {377, 8}, //etf_tsf3_ft8 (377 downto 369)
369  {368, 8}, //etf_tsf3_ft7 (368 downto 360)
370  {359, 8}, //etf_tsf3_ft6 (359 downto 351)
371  {350, 8}, //etf_tsf3_ft5 (350 downto 342)
372  {341, 8}, //etf_tsf3_ft4 (341 downto 333)
373  {332, 8}, //etf_tsf3_ft3 (332 downto 324)
374  {323, 8}, //etf_tsf3_ft2 (323 downto 315)
375  {314, 8}, //etf_tsf3_ft1 (314 downto 306)
376  {305, 8}, //etf_tsf3_ft0 (305 downto 297)
377 
378  {296, 8}, //etf_tsf2_nhit (296 downto 288)
379  {287, 8}, //etf_tsf2_ft9 (287 downto 279)
380  {278, 8}, //etf_tsf2_ft8 (278 downto 270)
381  {269, 8}, //etf_tsf2_ft7 (269 downto 261)
382  {260, 8}, //etf_tsf2_ft6 (260 downto 252)
383  {251, 8}, //etf_tsf2_ft5 (251 downto 243)
384  {242, 8}, //etf_tsf2_ft4 (242 downto 234)
385  {233, 8}, //etf_tsf2_ft3 (233 downto 225)
386  {224, 8}, //etf_tsf2_ft2 (224 downto 216)
387  {215, 8}, //etf_tsf2_ft1 (215 downto 207)
388  {206, 8}, //etf_tsf2_ft0 (206 downto 198)
389 
390  {197, 8}, //etf_tsf1_nhit (197 downto 189)
391  {188, 8}, //etf_tsf1_ft9 (188 downto 180)
392  {179, 8}, //etf_tsf1_ft8 (179 downto 171)
393  {170, 8}, //etf_tsf1_ft7 (170 downto 162)
394  {161, 8}, //etf_tsf1_ft6 (161 downto 153)
395  {152, 8}, //etf_tsf1_ft5 (152 downto 144)
396  {143, 8}, //etf_tsf1_ft4 (143 downto 135)
397  {134, 8}, //etf_tsf1_ft3 (134 downto 126)
398  {125, 8}, //etf_tsf1_ft2 (125 downto 117)
399  {116, 8}, //etf_tsf1_ft1 (116 downto 108)
400  {107, 8}, //etf_tsf1_ft0 (107 downto 99)
401 
402  {98, 8}, //etf_tsf0_nhit ( 98 downto 90)
403  {89, 8}, //etf_tsf0_ft9 ( 89 downto 81)
404  {80, 8}, //etf_tsf0_ft8 ( 80 downto 72)
405  {71, 8}, //etf_tsf0_ft7 ( 71 downto 63)
406  {62, 8}, //etf_tsf0_ft6 ( 62 downto 54)
407  {53, 8}, //etf_tsf0_ft5 ( 53 downto 45)
408  {44, 8}, //etf_tsf0_ft4 ( 44 downto 36)
409  {35, 8}, //etf_tsf0_ft3 ( 35 downto 27)
410  {26, 8}, //etf_tsf0_ft2 ( 26 downto 18)
411  {17, 8}, //etf_tsf0_ft1 ( 17 downto 9)
412  {8, 8} //etf_tsf0_ft0 ( 8 downto 0)
413 
414 
415  //971, 8, //etf_tsf8_cc (890 downto 882)
416  //962, 8, //etf_tsf8_nhit (890 downto 882)
417  //953, 8, //etf_tsf8_ft0 (881 downto 873)
418  //944, 8, //etf_tsf8_ft1 (872 downto 864)
419  //935, 8, //etf_tsf8_ft2 (863 downto 855)
420  //926, 8, //etf_tsf8_ft3 (854 downto 846)
421  //917, 8, //etf_tsf8_ft4 (845 downto 837)
422  //908, 8, //etf_tsf8_ft5 (836 downto 828)
423  //899, 8, //etf_tsf8_ft6 (827 downto 819)
424  //890, 8, //etf_tsf8_ft7 (818 downto 810)
425  //881, 8, //etf_tsf8_ft8 (809 downto 801)
426  //872, 8, //etf_tsf8_ft9 (800 downto 792)
427  //
428  //863, 8, //etf_tsf7_cc (890 downto 882)
429  //854, 8, //etf_tsf7_nhit (791 downto 783)
430  //845, 8, //etf_tsf7_ft0 (782 downto 774)
431  //836, 8, //etf_tsf7_ft1 (773 downto 765)
432  //827, 8, //etf_tsf7_ft2 (764 downto 756)
433  //818, 8, //etf_tsf7_ft3 (755 downto 747)
434  //809, 8, //etf_tsf7_ft4 (746 downto 738)
435  //800, 8, //etf_tsf7_ft5 (737 downto 729)
436  //791, 8, //etf_tsf7_ft6 (728 downto 720)
437  //782, 8, //etf_tsf7_ft7 (719 downto 711)
438  //773, 8, //etf_tsf7_ft8 (710 downto 702)
439  //764, 8, //etf_tsf7_ft9 (701 downto 693)
440  //
441  //755, 8, //etf_tsf6_cc (890 downto 882)
442  //746, 8, //etf_tsf6_nhit (692 downto 684)
443  //737, 8, //etf_tsf6_ft0 (683 downto 675)
444  //728, 8, //etf_tsf6_ft1 (674 downto 666)
445  //719, 8, //etf_tsf6_ft2 (665 downto 657)
446  //710, 8, //etf_tsf6_ft3 (656 downto 648)
447  //701, 8, //etf_tsf6_ft4 (647 downto 639)
448  //692, 8, //etf_tsf6_ft5 (638 downto 630)
449  //683, 8, //etf_tsf6_ft6 (629 downto 621)
450  //674, 8, //etf_tsf6_ft7 (620 downto 612)
451  //665, 8, //etf_tsf6_ft8 (611 downto 603)
452  //656, 8, //etf_tsf6_ft9 (602 downto 594)
453  //
454  //647, 8, //etf_tsf5_cc (890 downto 882)
455  //638, 8, //etf_tsf5_nhit (593 downto 585)
456  //629, 8, //etf_tsf5_ft0 (584 downto 576)
457  //620, 8, //etf_tsf5_ft1 (575 downto 567)
458  //611, 8, //etf_tsf5_ft2 (566 downto 558)
459  //602, 8, //etf_tsf5_ft3 (557 downto 549)
460  //593, 8, //etf_tsf5_ft4 (548 downto 540)
461  //584, 8, //etf_tsf5_ft5 (539 downto 531)
462  //575, 8, //etf_tsf5_ft6 (530 downto 522)
463  //566, 8, //etf_tsf5_ft7 (521 downto 513)
464  //557, 8, //etf_tsf5_ft8 (512 downto 504)
465  //548, 8, //etf_tsf5_ft9 (503 downto 495)
466  //
467  //539, 8, //etf_tsf4_cc (890 downto 882)
468  //530, 8, //etf_tsf4_nhit (494 downto 486)
469  //521, 8, //etf_tsf4_ft0 (485 downto 477)
470  //512, 8, //etf_tsf4_ft1 (476 downto 468)
471  //503, 8, //etf_tsf4_ft2 (467 downto 459)
472  //494, 8, //etf_tsf4_ft3 (458 downto 450)
473  //485, 8, //etf_tsf4_ft4 (449 downto 441)
474  //476, 8, //etf_tsf4_ft5 (440 downto 432)
475  //467, 8, //etf_tsf4_ft6 (431 downto 423)
476  //458, 8, //etf_tsf4_ft7 (422 downto 414)
477  //449, 8, //etf_tsf4_ft8 (413 downto 405)
478  //440, 8, //etf_tsf4_ft9 (404 downto 396)
479  //
480  //431, 8, //etf_tsf3_cc (890 downto 882)
481  //422, 8, //etf_tsf3_nhit (395 downto 387)
482  //413, 8, //etf_tsf3_ft0 (386 downto 378)
483  //404, 8, //etf_tsf3_ft1 (377 downto 369)
484  //395, 8, //etf_tsf3_ft2 (368 downto 360)
485  //386, 8, //etf_tsf3_ft3 (359 downto 351)
486  //377, 8, //etf_tsf3_ft4 (350 downto 342)
487  //368, 8, //etf_tsf3_ft5 (341 downto 333)
488  //359, 8, //etf_tsf3_ft6 (332 downto 324)
489  //350, 8, //etf_tsf3_ft7 (323 downto 315)
490  //341, 8, //etf_tsf3_ft8 (314 downto 306)
491  //332, 8, //etf_tsf3_ft9 (305 downto 297)
492  //
493  //323, 8, //etf_tsf2_cc (890 downto 882)
494  //314, 8, //etf_tsf2_nhit (296 downto 288)
495  //305, 8, //etf_tsf2_ft0 (287 downto 279)
496  //296, 8, //etf_tsf2_ft1 (278 downto 270)
497  //287, 8, //etf_tsf2_ft2 (269 downto 261)
498  //278, 8, //etf_tsf2_ft3 (260 downto 252)
499  //269, 8, //etf_tsf2_ft4 (251 downto 243)
500  //260, 8, //etf_tsf2_ft5 (242 downto 234)
501  //251, 8, //etf_tsf2_ft6 (233 downto 225)
502  //242, 8, //etf_tsf2_ft7 (224 downto 216)
503  //233, 8, //etf_tsf2_ft8 (215 downto 207)
504  //224, 8, //etf_tsf2_ft9 (206 downto 198)
505  //
506  //215, 8, //etf_tsf1_cc (890 downto 882)
507  //206, 8, //etf_tsf1_nhit (197 downto 189)
508  //197, 8, //etf_tsf1_ft0 (188 downto 180)
509  //188, 8, //etf_tsf1_ft1 (179 downto 171)
510  //179, 8, //etf_tsf1_ft2 (170 downto 162)
511  //170, 8, //etf_tsf1_ft3 (161 downto 153)
512  //161, 8, //etf_tsf1_ft4 (152 downto 144)
513  //152, 8, //etf_tsf1_ft5 (143 downto 135)
514  //143, 8, //etf_tsf1_ft6 (134 downto 126)
515  //134, 8, //etf_tsf1_ft7 (125 downto 117)
516  //125, 8, //etf_tsf1_ft8 (116 downto 108)
517  //116, 8, //etf_tsf1_ft9 (107 downto 99)
518  //
519  //107, 8, //etf_tsf0_cc (890 downto 882)
520  // 98, 8, //etf_tsf0_nhit ( 98 downto 90)
521  // 89, 8, //etf_tsf0_ft0 ( 89 downto 81)
522  // 80, 8, //etf_tsf0_ft1 ( 80 downto 72)
523  // 71, 8, //etf_tsf0_ft2 ( 71 downto 63)
524  // 62, 8, //etf_tsf0_ft3 ( 62 downto 54)
525  // 53, 8, //etf_tsf0_ft4 ( 53 downto 45)
526  // 44, 8, //etf_tsf0_ft5 ( 44 downto 36)
527  // 35, 8, //etf_tsf0_ft6 ( 35 downto 27)
528  // 26, 8, //etf_tsf0_ft7 ( 26 downto 18)
529  // 17, 8, //etf_tsf0_ft8 ( 17 downto 9)
530  // 8, 8 //etf_tsf0_ft9 ( 8 downto 0)
531 
532 
533 
534  };
535 
536  void
537  setLeafPointersArray(TRGCDCETFUnpackerStore* store, int** bitArray)
538  {
539  bitArray[e_etf_threshold] = &(store->m_etf_threshold);
540  bitArray[e_etf_threshold2] = &(store->m_etf_threshold2);
541  bitArray[e_etf_holdtime] = &(store->m_etf_holdtime);
542  bitArray[e_etf_firmvers] = &(store->m_etf_firmvers);
543  bitArray[e_etf_cc] = &(store->m_etf_cc);
544  bitArray[e_etf_output_gdl] = &(store->m_etf_output_gdl);
545  bitArray[e_etf_valid_gdl] = &(store->m_etf_valid_gdl);
546  bitArray[e_etf_output] = &(store->m_etf_output);
547  bitArray[e_etf_valid] = &(store->m_etf_valid);
548 
549  bitArray[e_etf_tsf8_nhit] = &(store->m_etf_tsf8_nhit);
550  bitArray[e_etf_tsf8_ft9] = &(store->m_etf_tsf8_ft9);
551  bitArray[e_etf_tsf8_ft8] = &(store->m_etf_tsf8_ft8);
552  bitArray[e_etf_tsf8_ft7] = &(store->m_etf_tsf8_ft7);
553  bitArray[e_etf_tsf8_ft6] = &(store->m_etf_tsf8_ft6);
554  bitArray[e_etf_tsf8_ft5] = &(store->m_etf_tsf8_ft5);
555  bitArray[e_etf_tsf8_ft4] = &(store->m_etf_tsf8_ft4);
556  bitArray[e_etf_tsf8_ft3] = &(store->m_etf_tsf8_ft3);
557  bitArray[e_etf_tsf8_ft2] = &(store->m_etf_tsf8_ft2);
558  bitArray[e_etf_tsf8_ft1] = &(store->m_etf_tsf8_ft1);
559  bitArray[e_etf_tsf8_ft0] = &(store->m_etf_tsf8_ft0);
560 
561  bitArray[e_etf_tsf7_nhit] = &(store->m_etf_tsf7_nhit);
562  bitArray[e_etf_tsf7_ft9] = &(store->m_etf_tsf7_ft9);
563  bitArray[e_etf_tsf7_ft8] = &(store->m_etf_tsf7_ft8);
564  bitArray[e_etf_tsf7_ft7] = &(store->m_etf_tsf7_ft7);
565  bitArray[e_etf_tsf7_ft6] = &(store->m_etf_tsf7_ft6);
566  bitArray[e_etf_tsf7_ft5] = &(store->m_etf_tsf7_ft5);
567  bitArray[e_etf_tsf7_ft4] = &(store->m_etf_tsf7_ft4);
568  bitArray[e_etf_tsf7_ft3] = &(store->m_etf_tsf7_ft3);
569  bitArray[e_etf_tsf7_ft2] = &(store->m_etf_tsf7_ft2);
570  bitArray[e_etf_tsf7_ft1] = &(store->m_etf_tsf7_ft1);
571  bitArray[e_etf_tsf7_ft0] = &(store->m_etf_tsf7_ft0);
572 
573  bitArray[e_etf_tsf6_nhit] = &(store->m_etf_tsf6_nhit);
574  bitArray[e_etf_tsf6_ft9] = &(store->m_etf_tsf6_ft9);
575  bitArray[e_etf_tsf6_ft8] = &(store->m_etf_tsf6_ft8);
576  bitArray[e_etf_tsf6_ft7] = &(store->m_etf_tsf6_ft7);
577  bitArray[e_etf_tsf6_ft6] = &(store->m_etf_tsf6_ft6);
578  bitArray[e_etf_tsf6_ft5] = &(store->m_etf_tsf6_ft5);
579  bitArray[e_etf_tsf6_ft4] = &(store->m_etf_tsf6_ft4);
580  bitArray[e_etf_tsf6_ft3] = &(store->m_etf_tsf6_ft3);
581  bitArray[e_etf_tsf6_ft2] = &(store->m_etf_tsf6_ft2);
582  bitArray[e_etf_tsf6_ft1] = &(store->m_etf_tsf6_ft1);
583  bitArray[e_etf_tsf6_ft0] = &(store->m_etf_tsf6_ft0);
584 
585  bitArray[e_etf_tsf5_nhit] = &(store->m_etf_tsf5_nhit);
586  bitArray[e_etf_tsf5_ft9] = &(store->m_etf_tsf5_ft9);
587  bitArray[e_etf_tsf5_ft8] = &(store->m_etf_tsf5_ft8);
588  bitArray[e_etf_tsf5_ft7] = &(store->m_etf_tsf5_ft7);
589  bitArray[e_etf_tsf5_ft6] = &(store->m_etf_tsf5_ft6);
590  bitArray[e_etf_tsf5_ft5] = &(store->m_etf_tsf5_ft5);
591  bitArray[e_etf_tsf5_ft4] = &(store->m_etf_tsf5_ft4);
592  bitArray[e_etf_tsf5_ft3] = &(store->m_etf_tsf5_ft3);
593  bitArray[e_etf_tsf5_ft2] = &(store->m_etf_tsf5_ft2);
594  bitArray[e_etf_tsf5_ft1] = &(store->m_etf_tsf5_ft1);
595  bitArray[e_etf_tsf5_ft0] = &(store->m_etf_tsf5_ft0);
596 
597  bitArray[e_etf_tsf4_nhit] = &(store->m_etf_tsf4_nhit);
598  bitArray[e_etf_tsf4_ft9] = &(store->m_etf_tsf4_ft9);
599  bitArray[e_etf_tsf4_ft8] = &(store->m_etf_tsf4_ft8);
600  bitArray[e_etf_tsf4_ft7] = &(store->m_etf_tsf4_ft7);
601  bitArray[e_etf_tsf4_ft6] = &(store->m_etf_tsf4_ft6);
602  bitArray[e_etf_tsf4_ft5] = &(store->m_etf_tsf4_ft5);
603  bitArray[e_etf_tsf4_ft4] = &(store->m_etf_tsf4_ft4);
604  bitArray[e_etf_tsf4_ft3] = &(store->m_etf_tsf4_ft3);
605  bitArray[e_etf_tsf4_ft2] = &(store->m_etf_tsf4_ft2);
606  bitArray[e_etf_tsf4_ft1] = &(store->m_etf_tsf4_ft1);
607  bitArray[e_etf_tsf4_ft0] = &(store->m_etf_tsf4_ft0);
608 
609  bitArray[e_etf_tsf3_nhit] = &(store->m_etf_tsf3_nhit);
610  bitArray[e_etf_tsf3_ft9] = &(store->m_etf_tsf3_ft9);
611  bitArray[e_etf_tsf3_ft8] = &(store->m_etf_tsf3_ft8);
612  bitArray[e_etf_tsf3_ft7] = &(store->m_etf_tsf3_ft7);
613  bitArray[e_etf_tsf3_ft6] = &(store->m_etf_tsf3_ft6);
614  bitArray[e_etf_tsf3_ft5] = &(store->m_etf_tsf3_ft5);
615  bitArray[e_etf_tsf3_ft4] = &(store->m_etf_tsf3_ft4);
616  bitArray[e_etf_tsf3_ft3] = &(store->m_etf_tsf3_ft3);
617  bitArray[e_etf_tsf3_ft2] = &(store->m_etf_tsf3_ft2);
618  bitArray[e_etf_tsf3_ft1] = &(store->m_etf_tsf3_ft1);
619  bitArray[e_etf_tsf3_ft0] = &(store->m_etf_tsf3_ft0);
620 
621  bitArray[e_etf_tsf2_nhit] = &(store->m_etf_tsf2_nhit);
622  bitArray[e_etf_tsf2_ft9] = &(store->m_etf_tsf2_ft9);
623  bitArray[e_etf_tsf2_ft8] = &(store->m_etf_tsf2_ft8);
624  bitArray[e_etf_tsf2_ft7] = &(store->m_etf_tsf2_ft7);
625  bitArray[e_etf_tsf2_ft6] = &(store->m_etf_tsf2_ft6);
626  bitArray[e_etf_tsf2_ft5] = &(store->m_etf_tsf2_ft5);
627  bitArray[e_etf_tsf2_ft4] = &(store->m_etf_tsf2_ft4);
628  bitArray[e_etf_tsf2_ft3] = &(store->m_etf_tsf2_ft3);
629  bitArray[e_etf_tsf2_ft2] = &(store->m_etf_tsf2_ft2);
630  bitArray[e_etf_tsf2_ft1] = &(store->m_etf_tsf2_ft1);
631  bitArray[e_etf_tsf2_ft0] = &(store->m_etf_tsf2_ft0);
632 
633  bitArray[e_etf_tsf1_nhit] = &(store->m_etf_tsf1_nhit);
634  bitArray[e_etf_tsf1_ft9] = &(store->m_etf_tsf1_ft9);
635  bitArray[e_etf_tsf1_ft8] = &(store->m_etf_tsf1_ft8);
636  bitArray[e_etf_tsf1_ft7] = &(store->m_etf_tsf1_ft7);
637  bitArray[e_etf_tsf1_ft6] = &(store->m_etf_tsf1_ft6);
638  bitArray[e_etf_tsf1_ft5] = &(store->m_etf_tsf1_ft5);
639  bitArray[e_etf_tsf1_ft4] = &(store->m_etf_tsf1_ft4);
640  bitArray[e_etf_tsf1_ft3] = &(store->m_etf_tsf1_ft3);
641  bitArray[e_etf_tsf1_ft2] = &(store->m_etf_tsf1_ft2);
642  bitArray[e_etf_tsf1_ft1] = &(store->m_etf_tsf1_ft1);
643  bitArray[e_etf_tsf1_ft0] = &(store->m_etf_tsf1_ft0);
644 
645  bitArray[e_etf_tsf0_nhit] = &(store->m_etf_tsf0_nhit);
646  bitArray[e_etf_tsf0_ft9] = &(store->m_etf_tsf0_ft9);
647  bitArray[e_etf_tsf0_ft8] = &(store->m_etf_tsf0_ft8);
648  bitArray[e_etf_tsf0_ft7] = &(store->m_etf_tsf0_ft7);
649  bitArray[e_etf_tsf0_ft6] = &(store->m_etf_tsf0_ft6);
650  bitArray[e_etf_tsf0_ft5] = &(store->m_etf_tsf0_ft5);
651  bitArray[e_etf_tsf0_ft4] = &(store->m_etf_tsf0_ft4);
652  bitArray[e_etf_tsf0_ft3] = &(store->m_etf_tsf0_ft3);
653  bitArray[e_etf_tsf0_ft2] = &(store->m_etf_tsf0_ft2);
654  bitArray[e_etf_tsf0_ft1] = &(store->m_etf_tsf0_ft1);
655  bitArray[e_etf_tsf0_ft0] = &(store->m_etf_tsf0_ft0);
656 
657  bitArray[e_evt] = &(store->m_evt);
658  bitArray[e_clk] = &(store->m_clk);
659  bitArray[e_firmid] = &(store->m_firmid);
660  bitArray[e_firmvers] = &(store->m_firmvers);
661  }
662 
668 
669  public:
670 
673 
675  virtual ~TRGCDCETFUnpackerModule();
676 
678  virtual void initialize() override;
679 
681  virtual void event() override;
682 
684  virtual void terminate() override;
685 
687  virtual void beginRun() override;
688 
690  virtual void endRun() override;
691 
693  std::string version() const;
694 
696  virtual void fillTreeTRGCDCETFUnpacker(int* buf, int evt);
697 
698  private:
699 
702 
704  unsigned int m_copper_address = 0x1100000a;
705 
707  unsigned int m_copper_ab = 1;
708 
710  unsigned int m_pcie40_address = 0x10000001;
711 
713  unsigned int m_pcie40_ch = 20;
714 
716  bool m_pciedata = false;
717 
718  };
719  }
721 } // end namespace Belle2
722 #endif // TRGCDCETFUNPACKER_H
Base class for Modules.
Definition: Module.h:72
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
virtual void initialize() override
Initilizes TRGCDCETFUnpackerUnpackerModule.
virtual void event() override
Called event by event.
virtual void endRun() override
Called when run ended.
virtual void terminate() override
Called when processing ended.
virtual void beginRun() override
Called when new run started.
virtual void fillTreeTRGCDCETFUnpacker(int *buf, int evt)
Unpacker main function.
StoreArray< TRGCDCETFUnpackerStore > m_store
Output datastore for unpacker.
std::string version() const
returns version of TRGCDCETFUnpackerModule.
Abstract base class for different kinds of events.