CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GctFormatTranslateV35.cc
Go to the documentation of this file.
2 
3 // C++ headers
4 #include <iostream>
5 #include <cassert>
6 
7 // Framework headers
9 
10 // Namespace resolution
11 using std::cout;
12 using std::endl;
13 using std::pair;
14 using std::make_pair;
15 
16 // INITIALISE STATIC VARIABLES
23 
24 
25 // PUBLIC METHODS
26 
27 GctFormatTranslateV35::GctFormatTranslateV35(bool hltMode, bool unpackSharedRegions):
28  GctFormatTranslateBase(hltMode, unpackSharedRegions)
29 {
30  static bool initClass = true;
31 
32  if(initClass)
33  {
34  initClass = false;
35 
36  /*** Setup BlockID to BlockLength Map ***/
37  // Miscellaneous Blocks
38  m_blockLength.insert(make_pair(0x000,0)); // NULL
39  // ConcJet FPGA
40  m_blockLength.insert(make_pair(0x580,12)); // ConcJet: Input TrigPathA (Jet Cands)
41  m_blockLength.insert(make_pair(0x581,2)); // ConcJet: Input TrigPathB (HF Rings)
42  m_blockLength.insert(make_pair(0x583,8)); // ConcJet: Jet Cands and Counts Output to GT
43  m_blockLength.insert(make_pair(0x587,4)); // ConcJet: BX & Orbit Info
44  // ConcElec FPGA
45  m_blockLength.insert(make_pair(0x680,16)); // ConcElec: Input TrigPathA (EM Cands)
46  m_blockLength.insert(make_pair(0x681,6)); // ConcElec: Input TrigPathB (Et Sums)
47  m_blockLength.insert(make_pair(0x682,2)); // ConcElec: Input TrigPathC (Ht Sums)
48  m_blockLength.insert(make_pair(0x683,6)); // ConcElec: EM Cands and Energy Sums Output to GT
49  m_blockLength.insert(make_pair(0x686,2)); // ConcElec: Test (GT Serdes Loopback)
50  m_blockLength.insert(make_pair(0x687,4)); // ConcElec: BX & Orbit Info
51  // Electron Leaf FPGAs
52  m_blockLength.insert(make_pair(0x800,20)); // Leaf0ElecPosEtaU1: Sort Input
53  m_blockLength.insert(make_pair(0x803,4)); // Leaf0ElecPosEtaU1: Sort Output
54  m_blockLength.insert(make_pair(0x804,15)); // Leaf0ElecPosEtaU1: Raw Input
55  m_blockLength.insert(make_pair(0x880,16)); // Leaf0ElecPosEtaU2: Sort Input
56  m_blockLength.insert(make_pair(0x883,4)); // Leaf0ElecPosEtaU2: Sort Output
57  m_blockLength.insert(make_pair(0x884,12)); // Leaf0ElecPosEtaU2: Raw Input
58  m_blockLength.insert(make_pair(0xc00,20)); // Leaf0ElecNegEtaU1: Sort Input
59  m_blockLength.insert(make_pair(0xc03,4)); // Leaf0ElecNegEtaU1: Sort Output
60  m_blockLength.insert(make_pair(0xc04,15)); // Leaf0ElecNegEtaU1: Raw Input
61  m_blockLength.insert(make_pair(0xc80,16)); // Leaf0ElecNegEtaU2: Sort Input
62  m_blockLength.insert(make_pair(0xc83,4)); // Leaf0ElecNegEtaU2: Sort Output
63  m_blockLength.insert(make_pair(0xc84,12)); // Leaf0ElecNegEtaU2: Raw Input
64  // Wheel Pos-eta Jet FPGA
65  m_blockLength.insert(make_pair(0x300,27)); // WheelPosEtaJet: Input TrigPathA (Jet Sort)
66  m_blockLength.insert(make_pair(0x303,6)); // WheelPosEtaJet: Output TrigPathA (Jet Sort)
67  m_blockLength.insert(make_pair(0x306,32)); // WheelPosEtaJet: Test (deprecated) (Doesn't exist in V27.1 format, but does in V24 & V25, so keep for CRUZET2 data compatibility reasons)
68  m_blockLength.insert(make_pair(0x307,4)); // WheelPosEtaJet: Info (deprecated) (Doesn't exist in V27.1 format, but does in V24 & V25, so keep for CRUZET2 data compatibility reasons)
69  // Wheel Pos-eta Energy FPGA
70  m_blockLength.insert(make_pair(0x380,21)); // WheelPosEtaEnergy: Input TrigPathA (Et)
71  m_blockLength.insert(make_pair(0x381,3)); // WheelPosEtaEnergy: Input TrigPathB (Ht)
72  m_blockLength.insert(make_pair(0x383,7)); // WheelPosEtaEnergy: Output TrigPathA (Et)
73  m_blockLength.insert(make_pair(0x385,2)); // WheelPosEtaEnergy: Output TrigPathB (Ht)
74  m_blockLength.insert(make_pair(0x386,32)); // WheelPosEtaEnergy: Test
75  m_blockLength.insert(make_pair(0x387,6)); // WheelPosEtaEnergy: BX & Orbit Info (Potential data incompatibility between V24/V25 where block length=4, and V27.1 where block length=6)
76  // Wheel Neg-eta Jet FPGA
77  m_blockLength.insert(make_pair(0x700,27)); // WheelNegEtaJet: Input TrigPathA (Jet Sort)
78  m_blockLength.insert(make_pair(0x703,6)); // WheelNegEtaJet: Output TrigPathA (Jet Sort)
79  m_blockLength.insert(make_pair(0x706,32)); // WheelNegEtaJet: Test (deprecated) (Doesn't exist in V27.1 format, but does in V24 & V25, so keep for CRUZET2 data compatibility reasons)
80  m_blockLength.insert(make_pair(0x707,4)); // WheelNegEtaJet: Info (deprecated) (Doesn't exist in V27.1 format, but does in V24 & V25, so keep for CRUZET2 data compatibility reasons)
81  // Wheel Neg-eta Energy FPGA
82  m_blockLength.insert(make_pair(0x780,21)); // WheelNegEtaEnergy: Input TrigPathA (Et)
83  m_blockLength.insert(make_pair(0x781,3)); // WheelNegEtaEnergy: Input TrigPathB (Ht)
84  m_blockLength.insert(make_pair(0x783,7)); // WheelNegEtaEnergy: Output TrigPathA (Et)
85  m_blockLength.insert(make_pair(0x785,2)); // WheelNegEtaEnergy: Output TrigPathB (Ht)
86  m_blockLength.insert(make_pair(0x786,32)); // WheelNegEtaEnergy: Test
87  m_blockLength.insert(make_pair(0x787,6)); // WheelNegEtaEnergy: BX & Orbit Info (Potential data incompatibility between V24/V25 where block length=4, and V27.1 where block length=6)
88  // Jet Leaf FPGAs - Positive Eta
89  m_blockLength.insert(make_pair(0x900,12)); // Leaf1JetPosEtaU1: JF2 Input
90  m_blockLength.insert(make_pair(0x901,3)); // Leaf1JetPosEtaU1: JF2 Shared Received
91  m_blockLength.insert(make_pair(0x902,3)); // Leaf1JetPosEtaU1: JF2 Shared Sent
92  m_blockLength.insert(make_pair(0x903,10)); // Leaf1JetPosEtaU1: JF2 Output
93  m_blockLength.insert(make_pair(0x904,8)); // Leaf1JetPosEtaU1: JF2 Raw Input
94  m_blockLength.insert(make_pair(0x908,12)); // Leaf1JetPosEtaU1: JF3 Input
95  m_blockLength.insert(make_pair(0x909,3)); // Leaf1JetPosEtaU1: JF3 Shared Received
96  m_blockLength.insert(make_pair(0x90a,3)); // Leaf1JetPosEtaU1: JF3 Shared Sent
97  m_blockLength.insert(make_pair(0x90b,10)); // Leaf1JetPosEtaU1: JF3 Output
98  m_blockLength.insert(make_pair(0x90c,8)); // Leaf1JetPosEtaU1: JF3 Raw Input
99  m_blockLength.insert(make_pair(0x980,3)); // Leaf1JetPosEtaU2: Eta0 Input
100  m_blockLength.insert(make_pair(0x984,6)); // Leaf1JetPosEtaU2: Eta0 Raw Input
101  m_blockLength.insert(make_pair(0x988,12)); // Leaf1JetPosEtaU2: JF1 Input
102  m_blockLength.insert(make_pair(0x989,3)); // Leaf1JetPosEtaU2: JF1 Shared Received
103  m_blockLength.insert(make_pair(0x98a,3)); // Leaf1JetPosEtaU2: JF1 Shared Sent
104  m_blockLength.insert(make_pair(0x98b,10)); // Leaf1JetPosEtaU2: JF1 Output
105  m_blockLength.insert(make_pair(0x98c,8)); // Leaf1JetPosEtaU2: JF1 Raw Input
106  m_blockLength.insert(make_pair(0xa00,12)); // Leaf2JetPosEtaU1: JF2 Input
107  m_blockLength.insert(make_pair(0xa01,3)); // Leaf2JetPosEtaU1: JF2 Shared Received
108  m_blockLength.insert(make_pair(0xa02,3)); // Leaf2JetPosEtaU1: JF2 Shared Sent
109  m_blockLength.insert(make_pair(0xa03,10)); // Leaf2JetPosEtaU1: JF2 Output
110  m_blockLength.insert(make_pair(0xa04,8)); // Leaf2JetPosEtaU1: JF2 Raw Input
111  m_blockLength.insert(make_pair(0xa08,12)); // Leaf2JetPosEtaU1: JF3 Input
112  m_blockLength.insert(make_pair(0xa09,3)); // Leaf2JetPosEtaU1: JF3 Shared Received
113  m_blockLength.insert(make_pair(0xa0a,3)); // Leaf2JetPosEtaU1: JF3 Shared Sent
114  m_blockLength.insert(make_pair(0xa0b,10)); // Leaf2JetPosEtaU1: JF3 Output
115  m_blockLength.insert(make_pair(0xa0c,8)); // Leaf2JetPosEtaU1: JF3 Raw Input
116  m_blockLength.insert(make_pair(0xa80,3)); // Leaf2JetPosEtaU2: Eta0 Input
117  m_blockLength.insert(make_pair(0xa84,6)); // Leaf2JetPosEtaU2: Eta0 Raw Input
118  m_blockLength.insert(make_pair(0xa88,12)); // Leaf2JetPosEtaU2: JF1 Input
119  m_blockLength.insert(make_pair(0xa89,3)); // Leaf2JetPosEtaU2: JF1 Shared Received
120  m_blockLength.insert(make_pair(0xa8a,3)); // Leaf2JetPosEtaU2: JF1 Shared Sent
121  m_blockLength.insert(make_pair(0xa8b,10)); // Leaf2JetPosEtaU2: JF1 Output
122  m_blockLength.insert(make_pair(0xa8c,8)); // Leaf2JetPosEtaU2: JF1 Raw Input
123  m_blockLength.insert(make_pair(0xb00,12)); // Leaf3JetPosEtaU1: JF2 Input
124  m_blockLength.insert(make_pair(0xb01,3)); // Leaf3JetPosEtaU1: JF2 Shared Received
125  m_blockLength.insert(make_pair(0xb02,3)); // Leaf3JetPosEtaU1: JF2 Shared Sent
126  m_blockLength.insert(make_pair(0xb03,10)); // Leaf3JetPosEtaU1: JF2 Output
127  m_blockLength.insert(make_pair(0xb04,8)); // Leaf3JetPosEtaU1: JF2 Raw Input
128  m_blockLength.insert(make_pair(0xb08,12)); // Leaf3JetPosEtaU1: JF3 Input
129  m_blockLength.insert(make_pair(0xb09,3)); // Leaf3JetPosEtaU1: JF3 Shared Received
130  m_blockLength.insert(make_pair(0xb0a,3)); // Leaf3JetPosEtaU1: JF3 Shared Sent
131  m_blockLength.insert(make_pair(0xb0b,10)); // Leaf3JetPosEtaU1: JF3 Output
132  m_blockLength.insert(make_pair(0xb0c,8)); // Leaf3JetPosEtaU1: JF3 Raw Input
133  m_blockLength.insert(make_pair(0xb80,3)); // Leaf3JetPosEtaU2: Eta0 Input
134  m_blockLength.insert(make_pair(0xb84,6)); // Leaf3JetPosEtaU2: Eta0 Raw Input
135  m_blockLength.insert(make_pair(0xb88,12)); // Leaf3JetPosEtaU2: JF1 Input
136  m_blockLength.insert(make_pair(0xb89,3)); // Leaf3JetPosEtaU2: JF1 Shared Received
137  m_blockLength.insert(make_pair(0xb8a,3)); // Leaf3JetPosEtaU2: JF1 Shared Sent
138  m_blockLength.insert(make_pair(0xb8b,10)); // Leaf3JetPosEtaU2: JF1 Output
139  m_blockLength.insert(make_pair(0xb8c,8)); // Leaf3JetPosEtaU2: JF1 Raw Input
140  // Jet Leaf FPGAs - Negative Eta
141  m_blockLength.insert(make_pair(0xd00,12)); // Leaf1JetNegEtaU1: JF2 Input
142  m_blockLength.insert(make_pair(0xd01,3)); // Leaf1JetNegEtaU1: JF2 Shared Received
143  m_blockLength.insert(make_pair(0xd02,3)); // Leaf1JetNegEtaU1: JF2 Shared Sent
144  m_blockLength.insert(make_pair(0xd03,10)); // Leaf1JetNegEtaU1: JF2 Output
145  m_blockLength.insert(make_pair(0xd04,8)); // Leaf1JetNegEtaU1: JF2 Raw Input
146  m_blockLength.insert(make_pair(0xd08,12)); // Leaf1JetNegEtaU1: JF3 Input
147  m_blockLength.insert(make_pair(0xd09,3)); // Leaf1JetNegEtaU1: JF3 Shared Received
148  m_blockLength.insert(make_pair(0xd0a,3)); // Leaf1JetNegEtaU1: JF3 Shared Sent
149  m_blockLength.insert(make_pair(0xd0b,10)); // Leaf1JetNegEtaU1: JF3 Output
150  m_blockLength.insert(make_pair(0xd0c,8)); // Leaf1JetNegEtaU1: JF3 Raw Input
151  m_blockLength.insert(make_pair(0xd80,3)); // Leaf1JetNegEtaU2: Eta0 Input
152  m_blockLength.insert(make_pair(0xd84,6)); // Leaf1JetNegEtaU2: Eta0 Raw Input
153  m_blockLength.insert(make_pair(0xd88,12)); // Leaf1JetNegEtaU2: JF1 Input
154  m_blockLength.insert(make_pair(0xd89,3)); // Leaf1JetNegEtaU2: JF1 Shared Received
155  m_blockLength.insert(make_pair(0xd8a,3)); // Leaf1JetNegEtaU2: JF1 Shared Sent
156  m_blockLength.insert(make_pair(0xd8b,10)); // Leaf1JetNegEtaU2: JF1 Output
157  m_blockLength.insert(make_pair(0xd8c,8)); // Leaf1JetNegEtaU2: JF1 Raw Input
158  m_blockLength.insert(make_pair(0xe00,12)); // Leaf2JetNegEtaU1: JF2 Input
159  m_blockLength.insert(make_pair(0xe01,3)); // Leaf2JetNegEtaU1: JF2 Shared Received
160  m_blockLength.insert(make_pair(0xe02,3)); // Leaf2JetNegEtaU1: JF2 Shared Sent
161  m_blockLength.insert(make_pair(0xe03,10)); // Leaf2JetNegEtaU1: JF2 Output
162  m_blockLength.insert(make_pair(0xe04,8)); // Leaf2JetNegEtaU1: JF2 Raw Input
163  m_blockLength.insert(make_pair(0xe08,12)); // Leaf2JetNegEtaU1: JF3 Input
164  m_blockLength.insert(make_pair(0xe09,3)); // Leaf2JetNegEtaU1: JF3 Shared Received
165  m_blockLength.insert(make_pair(0xe0a,3)); // Leaf2JetNegEtaU1: JF3 Shared Sent
166  m_blockLength.insert(make_pair(0xe0b,10)); // Leaf2JetNegEtaU1: JF3 Output
167  m_blockLength.insert(make_pair(0xe0c,8)); // Leaf2JetNegEtaU1: JF3 Raw Input
168  m_blockLength.insert(make_pair(0xe80,3)); // Leaf2JetNegEtaU2: Eta0 Input
169  m_blockLength.insert(make_pair(0xe84,6)); // Leaf2JetNegEtaU2: Eta0 Raw Input
170  m_blockLength.insert(make_pair(0xe88,12)); // Leaf2JetNegEtaU2: JF1 Input
171  m_blockLength.insert(make_pair(0xe89,3)); // Leaf2JetNegEtaU2: JF1 Shared Received
172  m_blockLength.insert(make_pair(0xe8a,3)); // Leaf2JetNegEtaU2: JF1 Shared Sent
173  m_blockLength.insert(make_pair(0xe8b,10)); // Leaf2JetNegEtaU2: JF1 Output
174  m_blockLength.insert(make_pair(0xe8c,8)); // Leaf2JetNegEtaU2: JF1 Raw Input
175  m_blockLength.insert(make_pair(0xf00,12)); // Leaf3JetNegEtaU1: JF2 Input
176  m_blockLength.insert(make_pair(0xf01,3)); // Leaf3JetNegEtaU1: JF2 Shared Received
177  m_blockLength.insert(make_pair(0xf02,3)); // Leaf3JetNegEtaU1: JF2 Shared Sent
178  m_blockLength.insert(make_pair(0xf03,10)); // Leaf3JetNegEtaU1: JF2 Output
179  m_blockLength.insert(make_pair(0xf04,8)); // Leaf3JetNegEtaU1: JF2 Raw Input
180  m_blockLength.insert(make_pair(0xf08,12)); // Leaf3JetNegEtaU1: JF3 Input
181  m_blockLength.insert(make_pair(0xf09,3)); // Leaf3JetNegEtaU1: JF3 Shared Received
182  m_blockLength.insert(make_pair(0xf0a,3)); // Leaf3JetNegEtaU1: JF3 Shared Sent
183  m_blockLength.insert(make_pair(0xf0b,10)); // Leaf3JetNegEtaU1: JF3 Output
184  m_blockLength.insert(make_pair(0xf0c,8)); // Leaf3JetNegEtaU1: JF3 Raw Input
185  m_blockLength.insert(make_pair(0xf80,3)); // Leaf3JetNegEtaU2: Eta0 Input
186  m_blockLength.insert(make_pair(0xf84,6)); // Leaf3JetNegEtaU2: Eta0 Raw Input
187  m_blockLength.insert(make_pair(0xf88,12)); // Leaf3JetNegEtaU2: JF1 Input
188  m_blockLength.insert(make_pair(0xf89,3)); // Leaf3JetNegEtaU2: JF1 Shared Received
189  m_blockLength.insert(make_pair(0xf8a,3)); // Leaf3JetNegEtaU2: JF1 Shared Sent
190  m_blockLength.insert(make_pair(0xf8b,10)); // Leaf3JetNegEtaU2: JF1 Output
191  m_blockLength.insert(make_pair(0xf8c,8)); // Leaf3JetNegEtaU2: JF1 Raw Input
192 
193 
194  /*** Setup BlockID to BlockName Map ***/
195  // Miscellaneous Blocks
196  m_blockName.insert(make_pair(0x000,"NULL"));
197  // ConcJet FPGA
198  m_blockName.insert(make_pair(0x580,"ConcJet: Input TrigPathA (Jet Cands)"));
199  m_blockName.insert(make_pair(0x581,"ConcJet: Input TrigPathB (HF Rings)"));
200  m_blockName.insert(make_pair(0x583,"ConcJet: Jet Cands and Counts Output to GT"));
201  m_blockName.insert(make_pair(0x587,"ConcJet: BX & Orbit Info"));
202  // ConcElec FPGA
203  m_blockName.insert(make_pair(0x680,"ConcElec: Input TrigPathA (EM Cands)"));
204  m_blockName.insert(make_pair(0x681,"ConcElec: Input TrigPathB (Et Sums)"));
205  m_blockName.insert(make_pair(0x682,"ConcElec: Input TrigPathC (Ht Sums)"));
206  m_blockName.insert(make_pair(0x683,"ConcElec: EM Cands and Energy Sums Output to GT"));
207  m_blockName.insert(make_pair(0x686,"ConcElec: Test (GT Serdes Loopback)"));
208  m_blockName.insert(make_pair(0x687,"ConcElec: BX & Orbit Info"));
209  // Electron Leaf FPGAs
210  m_blockName.insert(make_pair(0x800,"Leaf0ElecPosEtaU1: Sort Input"));
211  m_blockName.insert(make_pair(0x803,"Leaf0ElecPosEtaU1: Sort Output"));
212  m_blockName.insert(make_pair(0x804,"Leaf0ElecPosEtaU1: Raw Input"));
213  m_blockName.insert(make_pair(0x880,"Leaf0ElecPosEtaU2: Sort Input"));
214  m_blockName.insert(make_pair(0x883,"Leaf0ElecPosEtaU2: Sort Output"));
215  m_blockName.insert(make_pair(0x884,"Leaf0ElecPosEtaU2: Raw Input"));
216  m_blockName.insert(make_pair(0xc00,"Leaf0ElecNegEtaU1: Sort Input"));
217  m_blockName.insert(make_pair(0xc03,"Leaf0ElecNegEtaU1: Sort Output"));
218  m_blockName.insert(make_pair(0xc04,"Leaf0ElecNegEtaU1: Raw Input"));
219  m_blockName.insert(make_pair(0xc80,"Leaf0ElecNegEtaU2: Sort Input"));
220  m_blockName.insert(make_pair(0xc83,"Leaf0ElecNegEtaU2: Sort Output"));
221  m_blockName.insert(make_pair(0xc84,"Leaf0ElecNegEtaU2: Raw Input"));
222  // Wheel Pos-eta Jet FPGA
223  m_blockName.insert(make_pair(0x300,"WheelPosEtaJet: Input TrigPathA (Jet Sort)"));
224  m_blockName.insert(make_pair(0x303,"WheelPosEtaJet: Output TrigPathA (Jet Sort)"));
225  m_blockName.insert(make_pair(0x306,"WheelPosEtaJet: Test (deprecated)")); // (Doesn't exist in V27.1 format, but does in V24 & V25, so keep for CRUZET2 data compatibility reasons)
226  m_blockName.insert(make_pair(0x307,"WheelPosEtaJet: Info (deprecated)")); // (Doesn't exist in V27.1 format, but does in V24 & V25, so keep for CRUZET2 data compatibility reasons)
227  // Wheel Pos-eta Energy FPGA
228  m_blockName.insert(make_pair(0x380,"WheelPosEtaEnergy: Input TrigPathA (Et)"));
229  m_blockName.insert(make_pair(0x381,"WheelPosEtaEnergy: Input TrigPathB (Ht)"));
230  m_blockName.insert(make_pair(0x383,"WheelPosEtaEnergy: Output TrigPathA (Et)"));
231  m_blockName.insert(make_pair(0x385,"WheelPosEtaEnergy: Output TrigPathB (Ht)"));
232  m_blockName.insert(make_pair(0x386,"WheelPosEtaEnergy: Test"));
233  m_blockName.insert(make_pair(0x387,"WheelPosEtaEnergy: BX & Orbit Info"));
234  // Wheel Neg-eta Jet FPGA
235  m_blockName.insert(make_pair(0x700,"WheelNegEtaJet: Input TrigPathA (Jet Sort)"));
236  m_blockName.insert(make_pair(0x703,"WheelNegEtaJet: Output TrigPathA (Jet Sort)"));
237  m_blockName.insert(make_pair(0x706,"WheelNegEtaJet: Test (deprecated)")); // (Doesn't exist in V27.1 format, but does in V24 & V25, so keep for CRUZET2 data compatibility reasons)
238  m_blockName.insert(make_pair(0x707,"WheelNegEtaJet: Info (deprecated)")); // (Doesn't exist in V27.1 format, but does in V24 & V25, so keep for CRUZET2 data compatibility reasons)
239  // Wheel Neg-eta Energy FPGA
240  m_blockName.insert(make_pair(0x780,"WheelNegEtaEnergy: Input TrigPathA (Et)"));
241  m_blockName.insert(make_pair(0x781,"WheelNegEtaEnergy: Input TrigPathB (Ht)"));
242  m_blockName.insert(make_pair(0x783,"WheelNegEtaEnergy: Output TrigPathA (Et)"));
243  m_blockName.insert(make_pair(0x785,"WheelNegEtaEnergy: Output TrigPathB (Ht)"));
244  m_blockName.insert(make_pair(0x786,"WheelNegEtaEnergy: Test"));
245  m_blockName.insert(make_pair(0x787,"WheelNegEtaEnergy: BX & Orbit Info"));
246  // Jet Leaf FPGAs - Positive Eta
247  m_blockName.insert(make_pair(0x900,"Leaf1JetPosEtaU1: JF2 Input"));
248  m_blockName.insert(make_pair(0x901,"Leaf1JetPosEtaU1: JF2 Shared Received"));
249  m_blockName.insert(make_pair(0x902,"Leaf1JetPosEtaU1: JF2 Shared Sent"));
250  m_blockName.insert(make_pair(0x903,"Leaf1JetPosEtaU1: JF2 Output"));
251  m_blockName.insert(make_pair(0x904,"Leaf1JetPosEtaU1: JF2 Raw Input"));
252  m_blockName.insert(make_pair(0x908,"Leaf1JetPosEtaU1: JF3 Input"));
253  m_blockName.insert(make_pair(0x909,"Leaf1JetPosEtaU1: JF3 Shared Received"));
254  m_blockName.insert(make_pair(0x90a,"Leaf1JetPosEtaU1: JF3 Shared Sent"));
255  m_blockName.insert(make_pair(0x90b,"Leaf1JetPosEtaU1: JF3 Output"));
256  m_blockName.insert(make_pair(0x90c,"Leaf1JetPosEtaU1: JF3 Raw Input"));
257  m_blockName.insert(make_pair(0x980,"Leaf1JetPosEtaU2: Eta0 Input")); // Next Leaf Start
258  m_blockName.insert(make_pair(0x984,"Leaf1JetPosEtaU2: Eta0 Raw Input"));
259  m_blockName.insert(make_pair(0x988,"Leaf1JetPosEtaU2: JF1 Input"));
260  m_blockName.insert(make_pair(0x989,"Leaf1JetPosEtaU2: JF1 Shared Received"));
261  m_blockName.insert(make_pair(0x98a,"Leaf1JetPosEtaU2: JF1 Shared Sent"));
262  m_blockName.insert(make_pair(0x98b,"Leaf1JetPosEtaU2: JF1 Output"));
263  m_blockName.insert(make_pair(0x98c,"Leaf1JetPosEtaU2: JF1 Raw Input"));
264  m_blockName.insert(make_pair(0xa00,"Leaf2JetPosEtaU1: JF2 Input")); // Next Leaf Start
265  m_blockName.insert(make_pair(0xa01,"Leaf2JetPosEtaU1: JF2 Shared Received"));
266  m_blockName.insert(make_pair(0xa02,"Leaf2JetPosEtaU1: JF2 Shared Sent"));
267  m_blockName.insert(make_pair(0xa03,"Leaf2JetPosEtaU1: JF2 Output"));
268  m_blockName.insert(make_pair(0xa04,"Leaf2JetPosEtaU1: JF2 Raw Input"));
269  m_blockName.insert(make_pair(0xa08,"Leaf2JetPosEtaU1: JF3 Input"));
270  m_blockName.insert(make_pair(0xa09,"Leaf2JetPosEtaU1: JF3 Shared Received"));
271  m_blockName.insert(make_pair(0xa0a,"Leaf2JetPosEtaU1: JF3 Shared Sent"));
272  m_blockName.insert(make_pair(0xa0b,"Leaf2JetPosEtaU1: JF3 Output"));
273  m_blockName.insert(make_pair(0xa0c,"Leaf2JetPosEtaU1: JF3 Raw Input"));
274  m_blockName.insert(make_pair(0xa80,"Leaf2JetPosEtaU2: Eta0 Input")); // Next Leaf Start
275  m_blockName.insert(make_pair(0xa84,"Leaf2JetPosEtaU2: Eta0 Raw Input"));
276  m_blockName.insert(make_pair(0xa88,"Leaf2JetPosEtaU2: JF1 Input"));
277  m_blockName.insert(make_pair(0xa89,"Leaf2JetPosEtaU2: JF1 Shared Received"));
278  m_blockName.insert(make_pair(0xa8a,"Leaf2JetPosEtaU2: JF1 Shared Sent"));
279  m_blockName.insert(make_pair(0xa8b,"Leaf2JetPosEtaU2: JF1 Output"));
280  m_blockName.insert(make_pair(0xa8c,"Leaf2JetPosEtaU2: JF1 Raw Input"));
281  m_blockName.insert(make_pair(0xb00,"Leaf3JetPosEtaU1: JF2 Input")); // Next Leaf Start
282  m_blockName.insert(make_pair(0xb01,"Leaf3JetPosEtaU1: JF2 Shared Received"));
283  m_blockName.insert(make_pair(0xb02,"Leaf3JetPosEtaU1: JF2 Shared Sent"));
284  m_blockName.insert(make_pair(0xb03,"Leaf3JetPosEtaU1: JF2 Output"));
285  m_blockName.insert(make_pair(0xb04,"Leaf3JetPosEtaU1: JF2 Raw Input"));
286  m_blockName.insert(make_pair(0xb08,"Leaf3JetPosEtaU1: JF3 Input"));
287  m_blockName.insert(make_pair(0xb09,"Leaf3JetPosEtaU1: JF3 Shared Received"));
288  m_blockName.insert(make_pair(0xb0a,"Leaf3JetPosEtaU1: JF3 Shared Sent"));
289  m_blockName.insert(make_pair(0xb0b,"Leaf3JetPosEtaU1: JF3 Output"));
290  m_blockName.insert(make_pair(0xb0c,"Leaf3JetPosEtaU1: JF3 Raw Input"));
291  m_blockName.insert(make_pair(0xb80,"Leaf3JetPosEtaU2: Eta0 Input")); // Next Leaf Start
292  m_blockName.insert(make_pair(0xb84,"Leaf3JetPosEtaU2: Eta0 Raw Input"));
293  m_blockName.insert(make_pair(0xb88,"Leaf3JetPosEtaU2: JF1 Input"));
294  m_blockName.insert(make_pair(0xb89,"Leaf3JetPosEtaU2: JF1 Shared Received"));
295  m_blockName.insert(make_pair(0xb8a,"Leaf3JetPosEtaU2: JF1 Shared Sent"));
296  m_blockName.insert(make_pair(0xb8b,"Leaf3JetPosEtaU2: JF1 Output"));
297  m_blockName.insert(make_pair(0xb8c,"Leaf3JetPosEtaU2: JF1 Raw Input"));
298  // Jet Leaf FPGAs - Negative Eta
299  m_blockName.insert(make_pair(0xd00,"Leaf1JetNegEtaU1: JF2 Input")); // START OF NEG ETA JET LEAVES
300  m_blockName.insert(make_pair(0xd01,"Leaf1JetNegEtaU1: JF2 Shared Received"));
301  m_blockName.insert(make_pair(0xd02,"Leaf1JetNegEtaU1: JF2 Shared Sent"));
302  m_blockName.insert(make_pair(0xd03,"Leaf1JetNegEtaU1: JF2 Output"));
303  m_blockName.insert(make_pair(0xd04,"Leaf1JetNegEtaU1: JF2 Raw Input"));
304  m_blockName.insert(make_pair(0xd08,"Leaf1JetNegEtaU1: JF3 Input"));
305  m_blockName.insert(make_pair(0xd09,"Leaf1JetNegEtaU1: JF3 Shared Received"));
306  m_blockName.insert(make_pair(0xd0a,"Leaf1JetNegEtaU1: JF3 Shared Sent"));
307  m_blockName.insert(make_pair(0xd0b,"Leaf1JetNegEtaU1: JF3 Output"));
308  m_blockName.insert(make_pair(0xd0c,"Leaf1JetNegEtaU1: JF3 Raw Input"));
309  m_blockName.insert(make_pair(0xd80,"Leaf1JetNegEtaU2: Eta0 Input")); // Next Leaf Start
310  m_blockName.insert(make_pair(0xd84,"Leaf1JetNegEtaU2: Eta0 Raw Input"));
311  m_blockName.insert(make_pair(0xd88,"Leaf1JetNegEtaU2: JF1 Input"));
312  m_blockName.insert(make_pair(0xd89,"Leaf1JetNegEtaU2: JF1 Shared Received"));
313  m_blockName.insert(make_pair(0xd8a,"Leaf1JetNegEtaU2: JF1 Shared Sent"));
314  m_blockName.insert(make_pair(0xd8b,"Leaf1JetNegEtaU2: JF1 Output"));
315  m_blockName.insert(make_pair(0xd8c,"Leaf1JetNegEtaU2: JF1 Raw Input"));
316  m_blockName.insert(make_pair(0xe00,"Leaf2JetNegEtaU1: JF2 Input")); // Next Leaf Start
317  m_blockName.insert(make_pair(0xe01,"Leaf2JetNegEtaU1: JF2 Shared Received"));
318  m_blockName.insert(make_pair(0xe02,"Leaf2JetNegEtaU1: JF2 Shared Sent"));
319  m_blockName.insert(make_pair(0xe03,"Leaf2JetNegEtaU1: JF2 Output"));
320  m_blockName.insert(make_pair(0xe04,"Leaf2JetNegEtaU1: JF2 Raw Input"));
321  m_blockName.insert(make_pair(0xe08,"Leaf2JetNegEtaU1: JF3 Input"));
322  m_blockName.insert(make_pair(0xe09,"Leaf2JetNegEtaU1: JF3 Shared Received"));
323  m_blockName.insert(make_pair(0xe0a,"Leaf2JetNegEtaU1: JF3 Shared Sent"));
324  m_blockName.insert(make_pair(0xe0b,"Leaf2JetNegEtaU1: JF3 Output"));
325  m_blockName.insert(make_pair(0xe0c,"Leaf2JetNegEtaU1: JF3 Raw Input"));
326  m_blockName.insert(make_pair(0xe80,"Leaf2JetNegEtaU2: Eta0 Input")); // Next Leaf Start
327  m_blockName.insert(make_pair(0xe84,"Leaf2JetNegEtaU2: Eta0 Raw Input"));
328  m_blockName.insert(make_pair(0xe88,"Leaf2JetNegEtaU2: JF1 Input"));
329  m_blockName.insert(make_pair(0xe89,"Leaf2JetNegEtaU2: JF1 Shared Received"));
330  m_blockName.insert(make_pair(0xe8a,"Leaf2JetNegEtaU2: JF1 Shared Sent"));
331  m_blockName.insert(make_pair(0xe8b,"Leaf2JetNegEtaU2: JF1 Output"));
332  m_blockName.insert(make_pair(0xe8c,"Leaf2JetNegEtaU2: JF1 Raw Input"));
333  m_blockName.insert(make_pair(0xf00,"Leaf3JetNegEtaU1: JF2 Input")); // Next Leaf Start
334  m_blockName.insert(make_pair(0xf01,"Leaf3JetNegEtaU1: JF2 Shared Received"));
335  m_blockName.insert(make_pair(0xf02,"Leaf3JetNegEtaU1: JF2 Shared Sent"));
336  m_blockName.insert(make_pair(0xf03,"Leaf3JetNegEtaU1: JF2 Output"));
337  m_blockName.insert(make_pair(0xf04,"Leaf3JetNegEtaU1: JF2 Raw Input"));
338  m_blockName.insert(make_pair(0xf08,"Leaf3JetNegEtaU1: JF3 Input"));
339  m_blockName.insert(make_pair(0xf09,"Leaf3JetNegEtaU1: JF3 Shared Received"));
340  m_blockName.insert(make_pair(0xf0a,"Leaf3JetNegEtaU1: JF3 Shared Sent"));
341  m_blockName.insert(make_pair(0xf0b,"Leaf3JetNegEtaU1: JF3 Output"));
342  m_blockName.insert(make_pair(0xf0c,"Leaf3JetNegEtaU1: JF3 Raw Input"));
343  m_blockName.insert(make_pair(0xf80,"Leaf3JetNegEtaU2: Eta0 Input")); // Next Leaf Start
344  m_blockName.insert(make_pair(0xf84,"Leaf3JetNegEtaU2: Eta0 Raw Input"));
345  m_blockName.insert(make_pair(0xf88,"Leaf3JetNegEtaU2: JF1 Input"));
346  m_blockName.insert(make_pair(0xf89,"Leaf3JetNegEtaU2: JF1 Shared Received"));
347  m_blockName.insert(make_pair(0xf8a,"Leaf3JetNegEtaU2: JF1 Shared Sent"));
348  m_blockName.insert(make_pair(0xf8b,"Leaf3JetNegEtaU2: JF1 Output"));
349  m_blockName.insert(make_pair(0xf8c,"Leaf3JetNegEtaU2: JF1 Raw Input"));
350 
351 
352  /*** Setup BlockID to Unpack-Function Map ***/
353  // Miscellaneous Blocks
355  // ConcJet FPGA
356  m_blockUnpackFn[0x580] = &GctFormatTranslateV35::blockToGctTrigObjects; // ConcJet: Input TrigPathA (Jet Cands)
357  m_blockUnpackFn[0x581] = &GctFormatTranslateV35::blockToGctInternRingSums; // ConcJet: Input TrigPathB (HF Rings)
358  m_blockUnpackFn[0x583] = &GctFormatTranslateV35::blockToGctJetCandsAndCounts; // ConcJet: Jet Cands and Counts Output to GT
359  m_blockUnpackFn[0x587] = &GctFormatTranslateV35::blockDoNothing; // ConcJet: BX & Orbit Info
360  // ConcElec FPGA
361  m_blockUnpackFn[0x680] = &GctFormatTranslateV35::blockToGctInternEmCand; // ConcElec: Input TrigPathA (EM Cands)
362  m_blockUnpackFn[0x681] = &GctFormatTranslateV35::blockToGctInternEtSums; // ConcElec: Input TrigPathB (Et Sums)
363  m_blockUnpackFn[0x682] = &GctFormatTranslateV35::blockToGctInternEtSums; // ConcElec: Input TrigPathC (Ht Sums)
364  m_blockUnpackFn[0x683] = &GctFormatTranslateV35::blockToGctEmCandsAndEnergySums; // ConcElec: EM Cands and Energy Sums Output to GT
365  m_blockUnpackFn[0x686] = &GctFormatTranslateV35::blockDoNothing; // ConcElec: Test (GT Serdes Loopback)
366  m_blockUnpackFn[0x687] = &GctFormatTranslateV35::blockDoNothing; // ConcElec: BX & Orbit Info
367  // Electron Leaf FPGAs
368  m_blockUnpackFn[0x800] = &GctFormatTranslateV35::blockToGctInternEmCand; // Leaf0ElecPosEtaU1: Sort Input
369  m_blockUnpackFn[0x803] = &GctFormatTranslateV35::blockToGctInternEmCand; // Leaf0ElecPosEtaU1: Sort Output
370  m_blockUnpackFn[0x804] = &GctFormatTranslateV35::blockToFibresAndToRctEmCand; // Leaf0ElecPosEtaU1: Raw Input
371  m_blockUnpackFn[0x880] = &GctFormatTranslateV35::blockToGctInternEmCand; // Leaf0ElecPosEtaU2: Sort Input
372  m_blockUnpackFn[0x883] = &GctFormatTranslateV35::blockToGctInternEmCand; // Leaf0ElecPosEtaU2: Sort Output
373  m_blockUnpackFn[0x884] = &GctFormatTranslateV35::blockToFibresAndToRctEmCand; // Leaf0ElecPosEtaU2: Raw Input
374  m_blockUnpackFn[0xc00] = &GctFormatTranslateV35::blockToGctInternEmCand; // Leaf0ElecNegEtaU1: Sort Input
375  m_blockUnpackFn[0xc03] = &GctFormatTranslateV35::blockToGctInternEmCand; // Leaf0ElecNegEtaU1: Sort Output
376  m_blockUnpackFn[0xc04] = &GctFormatTranslateV35::blockToFibresAndToRctEmCand; // Leaf0ElecNegEtaU1: Raw Input
377  m_blockUnpackFn[0xc80] = &GctFormatTranslateV35::blockToGctInternEmCand; // Leaf0ElecNegEtaU2: Sort Input
378  m_blockUnpackFn[0xc83] = &GctFormatTranslateV35::blockToGctInternEmCand; // Leaf0ElecNegEtaU2: Sort Output
379  m_blockUnpackFn[0xc84] = &GctFormatTranslateV35::blockToFibresAndToRctEmCand; // Leaf0ElecNegEtaU2: Raw Input
380  // Wheel Pos-eta Jet FPGA
381  m_blockUnpackFn[0x300] = &GctFormatTranslateV35::blockToGctJetClusterMinimal; // WheelPosEtaJet: Input TrigPathA (Jet Sort)
382  m_blockUnpackFn[0x303] = &GctFormatTranslateV35::blockToGctTrigObjects; // WheelPosEtaJet: Output TrigPathA (Jet Sort)
383  m_blockUnpackFn[0x306] = &GctFormatTranslateV35::blockDoNothing; // WheelPosEtaJet: Test (deprecated) (Doesn't exist in V27.1 format, but does in V24 & V25, so keep for CRUZET2 data compatibility reasons)
384  m_blockUnpackFn[0x307] = &GctFormatTranslateV35::blockDoNothing; // WheelPosEtaJet: Info (deprecated) (Doesn't exist in V27.1 format, but does in V24 & V25, so keep for CRUZET2 data compatibility reasons)
385  // Wheel Pos-eta Energy FPGA
386  m_blockUnpackFn[0x380] = &GctFormatTranslateV35::blockToGctWheelInputInternEtAndRingSums; // WheelPosEtaEnergy: Input TrigPathA (Et)
387  m_blockUnpackFn[0x381] = &GctFormatTranslateV35::blockToGctInternEtSums; // WheelPosEtaEnergy: Input TrigPathB (Ht)
388  m_blockUnpackFn[0x383] = &GctFormatTranslateV35::blockToGctWheelOutputInternEtAndRingSums; // WheelPosEtaEnergy: Output TrigPathA (Et)
389  m_blockUnpackFn[0x385] = &GctFormatTranslateV35::blockToGctInternEtSums; // WheelPosEtaEnergy: Output TrigPathB (Ht)
390  m_blockUnpackFn[0x386] = &GctFormatTranslateV35::blockDoNothing; // WheelPosEtaEnergy: Test
391  m_blockUnpackFn[0x387] = &GctFormatTranslateV35::blockDoNothing; // WheelPosEtaEnergy: BX & Orbit Info (Potential data incompatibility between V24/V25 where block length=4, and V27.1 where block length=6)
392  // Wheel Neg-eta Jet FPGA
393  m_blockUnpackFn[0x700] = &GctFormatTranslateV35::blockToGctJetClusterMinimal; // WheelNegEtaJet: Input TrigPathA (Jet Sort)
394  m_blockUnpackFn[0x703] = &GctFormatTranslateV35::blockToGctTrigObjects; // WheelNegEtaJet: Output TrigPathA (Jet Sort)
395  m_blockUnpackFn[0x706] = &GctFormatTranslateV35::blockDoNothing; // WheelNegEtaJet: Test (deprecated) (Doesn't exist in V27.1 format, but does in V24 & V25, so keep for CRUZET2 data compatibility reasons)
396  m_blockUnpackFn[0x707] = &GctFormatTranslateV35::blockDoNothing; // WheelNegEtaJet: Info (deprecated) (Doesn't exist in V27.1 format, but does in V24 & V25, so keep for CRUZET2 data compatibility reasons)
397  // Wheel Neg-eta Energy FPGA
398  m_blockUnpackFn[0x780] = &GctFormatTranslateV35::blockToGctWheelInputInternEtAndRingSums; // WheelNegEtaEnergy: Input TrigPathA (Et)
399  m_blockUnpackFn[0x781] = &GctFormatTranslateV35::blockToGctInternEtSums; // WheelNegEtaEnergy: Input TrigPathB (Ht)
400  m_blockUnpackFn[0x783] = &GctFormatTranslateV35::blockToGctWheelOutputInternEtAndRingSums; // WheelNegEtaEnergy: Output TrigPathA (Et)
401  m_blockUnpackFn[0x785] = &GctFormatTranslateV35::blockToGctInternEtSums; // WheelNegEtaEnergy: Output TrigPathB (Ht)
402  m_blockUnpackFn[0x786] = &GctFormatTranslateV35::blockDoNothing; // WheelNegEtaEnergy: Test
403  m_blockUnpackFn[0x787] = &GctFormatTranslateV35::blockDoNothing; // WheelNegEtaEnergy: BX & Orbit Info (Potential data incompatibility between V24/V25 where block length=4, and V27.1 where block length=6)
404  // Jet Leaf FPGAs - Positive Eta
405  m_blockUnpackFn[0x900] = &GctFormatTranslateV35::blockToRctCaloRegions; // Leaf1JetPosEtaU1: JF2 Input
406  m_blockUnpackFn[0x901] = &GctFormatTranslateV35::blockToGctJetPreCluster; // Leaf1JetPosEtaU1: JF2 Shared Received
407  m_blockUnpackFn[0x902] = &GctFormatTranslateV35::blockToGctJetPreCluster; // Leaf1JetPosEtaU1: JF2 Shared Sent
408  m_blockUnpackFn[0x903] = &GctFormatTranslateV35::blockToGctInternEtSumsAndJetCluster;// Leaf1JetPosEtaU1: JF2 Output
409  m_blockUnpackFn[0x904] = &GctFormatTranslateV35::blockToFibres; // Leaf1JetPosEtaU1: JF2 Raw Input
410  m_blockUnpackFn[0x908] = &GctFormatTranslateV35::blockToRctCaloRegions; // Leaf1JetPosEtaU1: JF3 Input
411  m_blockUnpackFn[0x909] = &GctFormatTranslateV35::blockToGctJetPreCluster; // Leaf1JetPosEtaU1: JF3 Shared Received
412  m_blockUnpackFn[0x90a] = &GctFormatTranslateV35::blockToGctJetPreCluster; // Leaf1JetPosEtaU1: JF3 Shared Sent
413  m_blockUnpackFn[0x90b] = &GctFormatTranslateV35::blockToGctInternEtSumsAndJetCluster;// Leaf1JetPosEtaU1: JF3 Output
414  m_blockUnpackFn[0x90c] = &GctFormatTranslateV35::blockToFibres; // Leaf1JetPosEtaU1: JF3 Raw Input
415  m_blockUnpackFn[0x980] = &GctFormatTranslateV35::blockDoNothing; // Leaf1JetPosEtaU2: Eta0 Input
416  m_blockUnpackFn[0x984] = &GctFormatTranslateV35::blockToFibres; // Leaf1JetPosEtaU2: Eta0 Raw Input
417  m_blockUnpackFn[0x988] = &GctFormatTranslateV35::blockToRctCaloRegions; // Leaf1JetPosEtaU2: JF1 Input
418  m_blockUnpackFn[0x989] = &GctFormatTranslateV35::blockToGctJetPreCluster; // Leaf1JetPosEtaU2: JF1 Shared Received
419  m_blockUnpackFn[0x98a] = &GctFormatTranslateV35::blockToGctJetPreCluster; // Leaf1JetPosEtaU2: JF1 Shared Sent
420  m_blockUnpackFn[0x98b] = &GctFormatTranslateV35::blockToGctInternEtSumsAndJetCluster;// Leaf1JetPosEtaU2: JF1 Output
421  m_blockUnpackFn[0x98c] = &GctFormatTranslateV35::blockToFibres; // Leaf1JetPosEtaU2: JF1 Raw Input
422  m_blockUnpackFn[0xa00] = &GctFormatTranslateV35::blockToRctCaloRegions; // Leaf2JetPosEtaU1: JF2 Input
423  m_blockUnpackFn[0xa01] = &GctFormatTranslateV35::blockToGctJetPreCluster; // Leaf2JetPosEtaU1: JF2 Shared Received
424  m_blockUnpackFn[0xa02] = &GctFormatTranslateV35::blockToGctJetPreCluster; // Leaf2JetPosEtaU1: JF2 Shared Sent
425  m_blockUnpackFn[0xa03] = &GctFormatTranslateV35::blockToGctInternEtSumsAndJetCluster;// Leaf2JetPosEtaU1: JF2 Output
426  m_blockUnpackFn[0xa04] = &GctFormatTranslateV35::blockToFibres; // Leaf2JetPosEtaU1: JF2 Raw Input
427  m_blockUnpackFn[0xa08] = &GctFormatTranslateV35::blockToRctCaloRegions; // Leaf2JetPosEtaU1: JF3 Input
428  m_blockUnpackFn[0xa09] = &GctFormatTranslateV35::blockToGctJetPreCluster; // Leaf2JetPosEtaU1: JF3 Shared Received
429  m_blockUnpackFn[0xa0a] = &GctFormatTranslateV35::blockToGctJetPreCluster; // Leaf2JetPosEtaU1: JF3 Shared Sent
430  m_blockUnpackFn[0xa0b] = &GctFormatTranslateV35::blockToGctInternEtSumsAndJetCluster;// Leaf2JetPosEtaU1: JF3 Output
431  m_blockUnpackFn[0xa0c] = &GctFormatTranslateV35::blockToFibres; // Leaf2JetPosEtaU1: JF3 Raw Input
432  m_blockUnpackFn[0xa80] = &GctFormatTranslateV35::blockDoNothing; // Leaf2JetPosEtaU2: Eta0 Input
433  m_blockUnpackFn[0xa84] = &GctFormatTranslateV35::blockToFibres; // Leaf2JetPosEtaU2: Eta0 Raw Input
434  m_blockUnpackFn[0xa88] = &GctFormatTranslateV35::blockToRctCaloRegions; // Leaf2JetPosEtaU2: JF1 Input
435  m_blockUnpackFn[0xa89] = &GctFormatTranslateV35::blockToGctJetPreCluster; // Leaf2JetPosEtaU2: JF1 Shared Received
436  m_blockUnpackFn[0xa8a] = &GctFormatTranslateV35::blockToGctJetPreCluster; // Leaf2JetPosEtaU2: JF1 Shared Sent
437  m_blockUnpackFn[0xa8b] = &GctFormatTranslateV35::blockToGctInternEtSumsAndJetCluster;// Leaf2JetPosEtaU2: JF1 Output
438  m_blockUnpackFn[0xa8c] = &GctFormatTranslateV35::blockToFibres; // Leaf2JetPosEtaU2: JF1 Raw Input
439  m_blockUnpackFn[0xb00] = &GctFormatTranslateV35::blockToRctCaloRegions; // Leaf3JetPosEtaU1: JF2 Input
440  m_blockUnpackFn[0xb01] = &GctFormatTranslateV35::blockToGctJetPreCluster; // Leaf3JetPosEtaU1: JF2 Shared Received
441  m_blockUnpackFn[0xb02] = &GctFormatTranslateV35::blockToGctJetPreCluster; // Leaf3JetPosEtaU1: JF2 Shared Sent
442  m_blockUnpackFn[0xb03] = &GctFormatTranslateV35::blockToGctInternEtSumsAndJetCluster;// Leaf3JetPosEtaU1: JF2 Output
443  m_blockUnpackFn[0xb04] = &GctFormatTranslateV35::blockToFibres; // Leaf3JetPosEtaU1: JF2 Raw Input
444  m_blockUnpackFn[0xb08] = &GctFormatTranslateV35::blockToRctCaloRegions; // Leaf3JetPosEtaU1: JF3 Input
445  m_blockUnpackFn[0xb09] = &GctFormatTranslateV35::blockToGctJetPreCluster; // Leaf3JetPosEtaU1: JF3 Shared Received
446  m_blockUnpackFn[0xb0a] = &GctFormatTranslateV35::blockToGctJetPreCluster; // Leaf3JetPosEtaU1: JF3 Shared Sent
447  m_blockUnpackFn[0xb0b] = &GctFormatTranslateV35::blockToGctInternEtSumsAndJetCluster;// Leaf3JetPosEtaU1: JF3 Output
448  m_blockUnpackFn[0xb0c] = &GctFormatTranslateV35::blockToFibres; // Leaf3JetPosEtaU1: JF3 Raw Input
449  m_blockUnpackFn[0xb80] = &GctFormatTranslateV35::blockDoNothing; // Leaf3JetPosEtaU2: Eta0 Input
450  m_blockUnpackFn[0xb84] = &GctFormatTranslateV35::blockToFibres; // Leaf3JetPosEtaU2: Eta0 Raw Input
451  m_blockUnpackFn[0xb88] = &GctFormatTranslateV35::blockToRctCaloRegions; // Leaf3JetPosEtaU2: JF1 Input
452  m_blockUnpackFn[0xb89] = &GctFormatTranslateV35::blockToGctJetPreCluster; // Leaf3JetPosEtaU2: JF1 Shared Received
453  m_blockUnpackFn[0xb8a] = &GctFormatTranslateV35::blockToGctJetPreCluster; // Leaf3JetPosEtaU2: JF1 Shared Sent
454  m_blockUnpackFn[0xb8b] = &GctFormatTranslateV35::blockToGctInternEtSumsAndJetCluster;// Leaf3JetPosEtaU2: JF1 Output
455  m_blockUnpackFn[0xb8c] = &GctFormatTranslateV35::blockToFibres; // Leaf3JetPosEtaU2: JF1 Raw Input
456  // Jet Leaf FPGAs - Negative Eta
457  m_blockUnpackFn[0xd00] = &GctFormatTranslateV35::blockToRctCaloRegions; // Leaf1JetNegEtaU1: JF2 Input
458  m_blockUnpackFn[0xd01] = &GctFormatTranslateV35::blockToGctJetPreCluster; // Leaf1JetNegEtaU1: JF2 Shared Received
459  m_blockUnpackFn[0xd02] = &GctFormatTranslateV35::blockToGctJetPreCluster; // Leaf1JetNegEtaU1: JF2 Shared Sent
460  m_blockUnpackFn[0xd03] = &GctFormatTranslateV35::blockToGctInternEtSumsAndJetCluster;// Leaf1JetNegEtaU1: JF2 Output
461  m_blockUnpackFn[0xd04] = &GctFormatTranslateV35::blockToFibres; // Leaf1JetNegEtaU1: JF2 Raw Input
462  m_blockUnpackFn[0xd08] = &GctFormatTranslateV35::blockToRctCaloRegions; // Leaf1JetNegEtaU1: JF3 Input
463  m_blockUnpackFn[0xd09] = &GctFormatTranslateV35::blockToGctJetPreCluster; // Leaf1JetNegEtaU1: JF3 Shared Received
464  m_blockUnpackFn[0xd0a] = &GctFormatTranslateV35::blockToGctJetPreCluster; // Leaf1JetNegEtaU1: JF3 Shared Sent
465  m_blockUnpackFn[0xd0b] = &GctFormatTranslateV35::blockToGctInternEtSumsAndJetCluster;// Leaf1JetNegEtaU1: JF3 Output
466  m_blockUnpackFn[0xd0c] = &GctFormatTranslateV35::blockToFibres; // Leaf1JetNegEtaU1: JF3 Raw Input
467  m_blockUnpackFn[0xd80] = &GctFormatTranslateV35::blockDoNothing; // Leaf1JetNegEtaU2: Eta0 Input
468  m_blockUnpackFn[0xd84] = &GctFormatTranslateV35::blockToFibres; // Leaf1JetNegEtaU2: Eta0 Raw Input
469  m_blockUnpackFn[0xd88] = &GctFormatTranslateV35::blockToRctCaloRegions; // Leaf1JetNegEtaU2: JF1 Input
470  m_blockUnpackFn[0xd89] = &GctFormatTranslateV35::blockToGctJetPreCluster; // Leaf1JetNegEtaU2: JF1 Shared Received
471  m_blockUnpackFn[0xd8a] = &GctFormatTranslateV35::blockToGctJetPreCluster; // Leaf1JetNegEtaU2: JF1 Shared Sent
472  m_blockUnpackFn[0xd8b] = &GctFormatTranslateV35::blockToGctInternEtSumsAndJetCluster;// Leaf1JetNegEtaU2: JF1 Output
473  m_blockUnpackFn[0xd8c] = &GctFormatTranslateV35::blockToFibres; // Leaf1JetNegEtaU2: JF1 Raw Input
474  m_blockUnpackFn[0xe00] = &GctFormatTranslateV35::blockToRctCaloRegions; // Leaf2JetNegEtaU1: JF2 Input
475  m_blockUnpackFn[0xe01] = &GctFormatTranslateV35::blockToGctJetPreCluster; // Leaf2JetNegEtaU1: JF2 Shared Received
476  m_blockUnpackFn[0xe02] = &GctFormatTranslateV35::blockToGctJetPreCluster; // Leaf2JetNegEtaU1: JF2 Shared Sent
477  m_blockUnpackFn[0xe03] = &GctFormatTranslateV35::blockToGctInternEtSumsAndJetCluster;// Leaf2JetNegEtaU1: JF2 Output
478  m_blockUnpackFn[0xe04] = &GctFormatTranslateV35::blockToFibres; // Leaf2JetNegEtaU1: JF2 Raw Input
479  m_blockUnpackFn[0xe08] = &GctFormatTranslateV35::blockToRctCaloRegions; // Leaf2JetNegEtaU1: JF3 Input
480  m_blockUnpackFn[0xe09] = &GctFormatTranslateV35::blockToGctJetPreCluster; // Leaf2JetNegEtaU1: JF3 Shared Received
481  m_blockUnpackFn[0xe0a] = &GctFormatTranslateV35::blockToGctJetPreCluster; // Leaf2JetNegEtaU1: JF3 Shared Sent
482  m_blockUnpackFn[0xe0b] = &GctFormatTranslateV35::blockToGctInternEtSumsAndJetCluster;// Leaf2JetNegEtaU1: JF3 Output
483  m_blockUnpackFn[0xe0c] = &GctFormatTranslateV35::blockToFibres; // Leaf2JetNegEtaU1: JF3 Raw Input
484  m_blockUnpackFn[0xe80] = &GctFormatTranslateV35::blockDoNothing; // Leaf2JetNegEtaU2: Eta0 Input
485  m_blockUnpackFn[0xe84] = &GctFormatTranslateV35::blockToFibres; // Leaf2JetNegEtaU2: Eta0 Raw Input
486  m_blockUnpackFn[0xe88] = &GctFormatTranslateV35::blockToRctCaloRegions; // Leaf2JetNegEtaU2: JF1 Input
487  m_blockUnpackFn[0xe89] = &GctFormatTranslateV35::blockToGctJetPreCluster; // Leaf2JetNegEtaU2: JF1 Shared Received
488  m_blockUnpackFn[0xe8a] = &GctFormatTranslateV35::blockToGctJetPreCluster; // Leaf2JetNegEtaU2: JF1 Shared Sent
489  m_blockUnpackFn[0xe8b] = &GctFormatTranslateV35::blockToGctInternEtSumsAndJetCluster;// Leaf2JetNegEtaU2: JF1 Output
490  m_blockUnpackFn[0xe8c] = &GctFormatTranslateV35::blockToFibres; // Leaf2JetNegEtaU2: JF1 Raw Input
491  m_blockUnpackFn[0xf00] = &GctFormatTranslateV35::blockToRctCaloRegions; // Leaf3JetNegEtaU1: JF2 Input
492  m_blockUnpackFn[0xf01] = &GctFormatTranslateV35::blockToGctJetPreCluster; // Leaf3JetNegEtaU1: JF2 Shared Received
493  m_blockUnpackFn[0xf02] = &GctFormatTranslateV35::blockToGctJetPreCluster; // Leaf3JetNegEtaU1: JF2 Shared Sent
494  m_blockUnpackFn[0xf03] = &GctFormatTranslateV35::blockToGctInternEtSumsAndJetCluster;// Leaf3JetNegEtaU1: JF2 Output
495  m_blockUnpackFn[0xf04] = &GctFormatTranslateV35::blockToFibres; // Leaf3JetNegEtaU1: JF2 Raw Input
496  m_blockUnpackFn[0xf08] = &GctFormatTranslateV35::blockToRctCaloRegions; // Leaf3JetNegEtaU1: JF3 Input
497  m_blockUnpackFn[0xf09] = &GctFormatTranslateV35::blockToGctJetPreCluster; // Leaf3JetNegEtaU1: JF3 Shared Received
498  m_blockUnpackFn[0xf0a] = &GctFormatTranslateV35::blockToGctJetPreCluster; // Leaf3JetNegEtaU1: JF3 Shared Sent
499  m_blockUnpackFn[0xf0b] = &GctFormatTranslateV35::blockToGctInternEtSumsAndJetCluster;// Leaf3JetNegEtaU1: JF3 Output
500  m_blockUnpackFn[0xf0c] = &GctFormatTranslateV35::blockToFibres; // Leaf3JetNegEtaU1: JF3 Raw Input
501  m_blockUnpackFn[0xf80] = &GctFormatTranslateV35::blockDoNothing; // Leaf3JetNegEtaU2: Eta0 Input
502  m_blockUnpackFn[0xf84] = &GctFormatTranslateV35::blockToFibres; // Leaf3JetNegEtaU2: Eta0 Raw Input
503  m_blockUnpackFn[0xf88] = &GctFormatTranslateV35::blockToRctCaloRegions; // Leaf3JetNegEtaU2: JF1 Input
504  m_blockUnpackFn[0xf89] = &GctFormatTranslateV35::blockToGctJetPreCluster; // Leaf3JetNegEtaU2: JF1 Shared Received
505  m_blockUnpackFn[0xf8a] = &GctFormatTranslateV35::blockToGctJetPreCluster; // Leaf3JetNegEtaU2: JF1 Shared Sent
506  m_blockUnpackFn[0xf8b] = &GctFormatTranslateV35::blockToGctInternEtSumsAndJetCluster;// Leaf3JetNegEtaU2: JF1 Output
507  m_blockUnpackFn[0xf8c] = &GctFormatTranslateV35::blockToFibres; // Leaf3JetNegEtaU2: JF1 Raw Input
508 
509 
510  /*** Setup RCT Em Crate Map ***/
511  m_rctEmCrate[0x804] = 13;
512  m_rctEmCrate[0x884] = 9;
513  m_rctEmCrate[0xc04] = 4;
514  m_rctEmCrate[0xc84] = 0;
515 
516 
517  /*** Setup RCT jet crate map. ***/
518  m_rctJetCrate[0x900] = 9; // PosEta Leaf 1 JF2
519  m_rctJetCrate[0x908] = 10; // PosEta Leaf 1 JF3
520  m_rctJetCrate[0x988] = 17; // PosEta Leaf 1 JF1
521  m_rctJetCrate[0xa00] = 12; // PosEta Leaf 2 JF2
522  m_rctJetCrate[0xa08] = 13; // PosEta Leaf 2 JF3
523  m_rctJetCrate[0xa88] = 11; // PosEta Leaf 2 JF1
524  m_rctJetCrate[0xb00] = 15; // PosEta Leaf 3 JF2
525  m_rctJetCrate[0xb08] = 16; // PosEta Leaf 3 JF3
526  m_rctJetCrate[0xb88] = 14; // PosEta Leaf 3 JF1
527  m_rctJetCrate[0xd00] = 0; // NegEta Leaf 1 JF2
528  m_rctJetCrate[0xd08] = 1; // NegEta Leaf 1 JF3
529  m_rctJetCrate[0xd88] = 8; // NegEta Leaf 1 JF1
530  m_rctJetCrate[0xe00] = 3; // NegEta Leaf 2 JF2
531  m_rctJetCrate[0xe08] = 4; // NegEta Leaf 2 JF3
532  m_rctJetCrate[0xe88] = 2; // NegEta Leaf 2 JF1
533  m_rctJetCrate[0xf00] = 6; // NegEta Leaf 3 JF2
534  m_rctJetCrate[0xf08] = 7; // NegEta Leaf 3 JF3
535  m_rctJetCrate[0xf88] = 5; // NegEta Leaf 3 JF1
536 
537 
538  /*** Setup Block ID map for pipeline payload positions of isolated Internal EM Cands. ***/
539  m_internEmIsoBounds[0x680] = IsoBoundaryPair(8,15);
540  m_internEmIsoBounds[0x800] = IsoBoundaryPair(0, 9);
541  m_internEmIsoBounds[0x803] = IsoBoundaryPair(0, 1);
542  m_internEmIsoBounds[0x880] = IsoBoundaryPair(0, 7);
543  m_internEmIsoBounds[0x883] = IsoBoundaryPair(0, 1);
544  m_internEmIsoBounds[0xc00] = IsoBoundaryPair(0, 9);
545  m_internEmIsoBounds[0xc03] = IsoBoundaryPair(0, 1);
546  m_internEmIsoBounds[0xc80] = IsoBoundaryPair(0, 7);
547  m_internEmIsoBounds[0xc83] = IsoBoundaryPair(0, 1);
548  }
549 }
550 
552 {
553 }
554 
556 {
557  // Turn the four 8-bit header words into the full 32-bit header.
558  uint32_t hdr = data[0] + (data[1]<<8) + (data[2]<<16) + (data[3]<<24);
559 
560 // Bit mapping of V35 header:
561 // --------------------------
562 // 11:0 => block_id Unique pipeline identifier.
563 // - 3:0 =>> pipe_id There can be up to 16 different pipelines per FPGA.
564 // - 6:4 =>> reserved Do not use yet. Set to zero.
565 // - 11:7 =>> fpga geograpical add The VME geographical address of the FPGA.
566 // 15:12 => event_id Determined locally. Not reset by Resync.
567 // 19:16 => number_of_time_samples If time samples 15 or more then value = 15.
568 // 31:20 => event_bcid The bunch crossing the data was recorded.
569 
570  unsigned blockId = hdr & 0xfff;
571  unsigned blockLength = 0; // Set to zero until we know it's a valid block
572  unsigned nSamples = (hdr>>16) & 0xf;
573  unsigned bxId = (hdr>>20) & 0xfff;
574  unsigned eventId = (hdr>>12) & 0xf;
575  bool valid = (blockLengthMap().find(blockId) != blockLengthMap().end());
576 
577  if(valid) { blockLength = blockLengthMap().find(blockId)->second; }
578 
579  return GctBlockHeader(blockId, blockLength, nSamples, bxId, eventId, valid);
580 }
581 
582 // conversion
583 bool GctFormatTranslateV35::convertBlock(const unsigned char * data, const GctBlockHeader& hdr)
584 {
585  // if the block has no time samples, don't bother with it.
586  if ( hdr.nSamples() < 1 ) { return true; }
587 
588  if(!checkBlock(hdr)) { return false; } // Check the block to see if it's possible to unpack.
589 
590  // The header validity check above will protect against
591  // the map::find() method returning the end of the map,
592  // assuming the block header definitions are up-to-date.
593  (this->*m_blockUnpackFn.find(hdr.blockId())->second)(data, hdr); // Calls the correct unpack function, based on block ID.
594 
595  return true;
596 }
597 
598 
599 // PROTECTED METHODS
600 
601 uint32_t GctFormatTranslateV35::generateRawHeader(const uint32_t blockId,
602  const uint32_t nSamples,
603  const uint32_t bxId,
604  const uint32_t eventId) const
605 {
606  // Bit mapping of V35 header:
607  // --------------------------
608  // 11:0 => block_id Unique pipeline identifier.
609  // - 3:0 =>> pipe_id There can be up to 16 different pipelines per FPGA.
610  // - 6:4 =>> reserved Do not use yet. Set to zero.
611  // - 11:7 =>> fpga geograpical add The VME geographical address of the FPGA.
612  // 15:12 => event_id Determined locally. Not reset by Resync.
613  // 19:16 => number_of_time_samples If time samples 15 or more then value = 15.
614  // 31:20 => event_bxId The bunch crossing the data was recorded.
615 
616  return ((bxId & 0xfff) << 20) | ((nSamples & 0xf) << 16) | ((eventId & 0xf) << 12) | (blockId & 0xfff);
617 }
618 
619 
620 // PRIVATE METHODS
621 
622 // Output EM Candidates unpacking
624 {
625  const unsigned int id = hdr.blockId();
626  const unsigned int nSamples = hdr.nSamples();
627 
628  // Re-interpret pointer. p16 will be pointing at the 16 bit word that
629  // contains the rank0 non-isolated electron of the zeroth time-sample.
630  const uint16_t * p16 = reinterpret_cast<const uint16_t *>(d);
631 
632  // UNPACK EM CANDS
633 
634  const unsigned int emCandCategoryOffset = nSamples * 4; // Offset to jump from the non-iso electrons to the isolated ones.
635  const unsigned int timeSampleOffset = nSamples * 2; // Offset to jump to next candidate pair in the same time-sample.
636 
637  unsigned int samplesToUnpack = 1;
638  if(!hltMode()) { samplesToUnpack = nSamples; } // Only if not running in HLT mode do we want more than 1 timesample.
639 
640  for (unsigned int iso=0; iso<2; ++iso) // loop over non-iso/iso candidate pairs
641  {
642  bool isoFlag = (iso==1);
643 
644  // Get the correct collection to put them in.
646  if (isoFlag) { em = colls()->gctIsoEm(); }
647  else { em = colls()->gctNonIsoEm(); }
648 
649  for (unsigned int bx=0; bx<samplesToUnpack; ++bx) // loop over time samples
650  {
651  // cand0Offset will give the offset on p16 to get the rank 0 candidate
652  // of the correct category and timesample.
653  const unsigned int cand0Offset = iso*emCandCategoryOffset + bx*2;
654 
655  em->push_back(L1GctEmCand(p16[cand0Offset], isoFlag, id, 0, bx)); // rank0 electron
656  em->push_back(L1GctEmCand(p16[cand0Offset + timeSampleOffset], isoFlag, id, 1, bx)); // rank1 electron
657  em->push_back(L1GctEmCand(p16[cand0Offset + 1], isoFlag, id, 2, bx)); // rank2 electron
658  em->push_back(L1GctEmCand(p16[cand0Offset + timeSampleOffset + 1], isoFlag, id, 3, bx)); // rank3 electron
659  }
660  }
661 
662  p16 += emCandCategoryOffset * 2; // Move the pointer over the data we've already unpacked.
663 
664  // UNPACK ENERGY SUMS
665  // NOTE: we are only unpacking one timesample of these currently!
666 
667  colls()->gctEtTot()->push_back(L1GctEtTotal(p16[0])); // Et total (timesample 0).
668  colls()->gctEtHad()->push_back(L1GctEtHad(p16[1])); // Et hadronic (timesample 0).
669 
670  // 32-bit pointer for getting Missing Et.
671  const uint32_t * p32 = reinterpret_cast<const uint32_t *>(p16);
672 
673  colls()->gctEtMiss()->push_back(L1GctEtMiss(p32[nSamples])); // Et Miss (timesample 0).
674 }
675 
677 {
678  const unsigned int id = hdr.blockId(); // Capture block ID.
679  const unsigned int nSamples = hdr.nSamples(); // Number of time-samples.
680 
681  // Re-interpret block payload pointer to 16 bits so it sees one candidate at a time.
682  // p16 points to the start of the block payload, at the rank0 tau jet candidate.
683  const uint16_t * p16 = reinterpret_cast<const uint16_t *>(d);
684 
685  // UNPACK JET CANDS
686 
687  const unsigned int jetCandCategoryOffset = nSamples * 4; // Offset to jump from one jet category to the next.
688  const unsigned int timeSampleOffset = nSamples * 2; // Offset to jump to next candidate pair in the same time-sample.
689 
690  unsigned int samplesToUnpack = 1;
691  if(!hltMode()) { samplesToUnpack = nSamples; } // Only if not running in HLT mode do we want more than 1 timesample.
692 
693  // Loop over the different catagories of jets
694  for(unsigned int iCat = 0 ; iCat < NUM_JET_CATEGORIES ; ++iCat)
695  {
696  L1GctJetCandCollection * const jets = gctJets(iCat);
697  assert(jets->empty()); // The supplied vector should be empty.
698 
699  bool tauflag = (iCat == TAU_JETS);
700  bool forwardFlag = (iCat == FORWARD_JETS);
701 
702  // Loop over the different timesamples (bunch crossings).
703  for(unsigned int bx = 0 ; bx < samplesToUnpack ; ++bx)
704  {
705  // cand0Offset will give the offset on p16 to get the rank 0 Jet Cand of the correct category and timesample.
706  const unsigned int cand0Offset = iCat*jetCandCategoryOffset + bx*2;
707 
708  // Rank 0 Jet.
709  jets->push_back(L1GctJetCand(p16[cand0Offset], tauflag, forwardFlag, id, 0, bx));
710  // Rank 1 Jet.
711  jets->push_back(L1GctJetCand(p16[cand0Offset + timeSampleOffset], tauflag, forwardFlag, id, 1, bx));
712  // Rank 2 Jet.
713  jets->push_back(L1GctJetCand(p16[cand0Offset + 1], tauflag, forwardFlag, id, 2, bx));
714  // Rank 3 Jet.
715  jets->push_back(L1GctJetCand(p16[cand0Offset + timeSampleOffset + 1], tauflag, forwardFlag, id, 3, bx));
716  }
717  }
718 
719  p16 += NUM_JET_CATEGORIES * jetCandCategoryOffset; // Move the pointer over the data we've already unpacked.
720 
721  // NOW UNPACK: HFBitCounts, HFRingEtSums (no Missing Ht yet)
722  // NOTE: we are only unpacking one timesample of these currently!
723 
724  // Re-interpret block payload pointer to 32 bits so it sees six jet counts at a time.
725  const uint32_t * p32 = reinterpret_cast<const uint32_t *>(p16);
726 
727  // Channel 0 carries both HF counts and sums
728  colls()->gctHfBitCounts()->push_back(L1GctHFBitCounts::fromConcHFBitCounts(id,6,0,p32[0]));
729  colls()->gctHfRingEtSums()->push_back(L1GctHFRingEtSums::fromConcRingSums(id,6,0,p32[0]));
730  // Skip channel 1 for now. Later this may carry MHT would be accessed as p32[nSamples]
731 }
732 
733 // Internal EM Candidates unpacking
734 void GctFormatTranslateV35::blockToGctInternEmCand(const unsigned char * d, const GctBlockHeader& hdr)
735 {
736  // Don't want to do this in HLT optimisation mode!
737  if(hltMode()) { LogDebug("GCT") << "HLT mode - skipping unpack of internal EM Cands"; return; }
738 
739  unsigned int id = hdr.blockId();
740  unsigned int nSamples = hdr.nSamples();
741  unsigned int numCandPairs = hdr.blockLength();
742 
743  // Debug assertion to prevent problems if definitions not up to date.
744  assert(internEmIsoBounds().find(id) != internEmIsoBounds().end());
745 
746  unsigned int lowerIsoPairBound = internEmIsoBounds()[id].first;
747  unsigned int upperIsoPairBound = internEmIsoBounds()[id].second;
748 
749  // Re-interpret pointer to 16 bits so it sees one candidate at a time.
750  const uint16_t * p = reinterpret_cast<const uint16_t *>(d);
751 
752  // Loop over timesamples (i.e. bunch crossings)
753  for(unsigned int bx=0; bx < nSamples; ++bx)
754  {
755  // Loop over candidate pairs (i.e. each iteration unpacks a pair of candidates)
756  for(unsigned int candPair = 0 ; candPair < numCandPairs ; ++candPair)
757  {
758  // Is the candidate electron pair an isolated pair or not?
759  bool iso = ((candPair>=lowerIsoPairBound) && (candPair<=upperIsoPairBound));
760 
761  // Loop over the two electron candidates in each pair
762  for(unsigned int i = 0 ; i < 2 ; ++i)
763  {
764  unsigned offset = 2*(bx + candPair*nSamples) + i;
765  uint16_t candRaw = p[offset];
766  colls()->gctInternEm()->push_back( L1GctInternEmCand(candRaw, iso, id, candPair*2 + i, bx) );
767  }
768  }
769  }
770 }
771 
772 
773 // Input EM Candidates unpacking
774 // this is the last time I deal the RCT bit assignment travesty!!!
775 void GctFormatTranslateV35::blockToRctEmCand(const unsigned char * d, const GctBlockHeader& hdr)
776 {
777  // Don't want to do this in HLT optimisation mode!
778  if(hltMode()) { LogDebug("GCT") << "HLT mode - skipping unpack of RCT EM Cands"; return; }
779 
780  unsigned int id = hdr.blockId();
781  unsigned int nSamples = hdr.nSamples();
782  unsigned int length = hdr.blockLength();
783 
784  // re-interpret pointer
785  const uint16_t * p = reinterpret_cast<const uint16_t *>(d);
786 
787  // arrays of source card data
788  uint16_t sfp[2][4]; // [ cycle ] [ SFP ]
789  uint16_t eIsoRank[4];
790  uint16_t eIsoCard[4];
791  uint16_t eIsoRgn[4];
792  uint16_t eNonIsoRank[4];
793  uint16_t eNonIsoCard[4];
794  uint16_t eNonIsoRgn[4];
795  uint16_t MIPbits[7][2];
796  uint16_t QBits[7][2];
797 
798  unsigned int bx = 0;
799 
800  // loop over crates
801  for (unsigned int crate=rctEmCrateMap()[id]; crate<rctEmCrateMap()[id]+length/3; ++crate) {
802 
803  // read SC SFP words
804  for (unsigned short iSfp=0 ; iSfp<4 ; ++iSfp) {
805  for (unsigned short cyc=0 ; cyc<2 ; ++cyc) {
806  if (iSfp==0) { sfp[cyc][iSfp] = 0; } // muon bits
807  else { // EM candidate
808  sfp[cyc][iSfp] = *p;
809  ++p;
810  }
811  }
812  p = p + 2*(nSamples-1);
813  }
814 
815  // fill SC arrays
816  srcCardRouting().SFPtoEMU(eIsoRank, eIsoCard, eIsoRgn, eNonIsoRank, eNonIsoCard, eNonIsoRgn, MIPbits, QBits, sfp);
817 
818  // create EM cands
819  for (unsigned short int i=0; i<4; ++i) {
820  colls()->rctEm()->push_back( L1CaloEmCand( eIsoRank[i], eIsoRgn[i], eIsoCard[i], crate, true, i, bx) );
821  }
822  for (unsigned short int i=0; i<4; ++i) {
823  colls()->rctEm()->push_back( L1CaloEmCand( eNonIsoRank[i], eNonIsoRgn[i], eNonIsoCard[i], crate, false, i, bx) );
824  }
825  }
826 }
827 
828 // Input RCT region unpacking
829 void GctFormatTranslateV35::blockToRctCaloRegions(const unsigned char * d, const GctBlockHeader& hdr)
830 {
831  // Don't want to do this in HLT optimisation mode!
832  if(hltMode()) { LogDebug("GCT") << "HLT mode - skipping unpack of RCT Regions"; return; }
833 
834  unsigned int id = hdr.blockId();
835  unsigned int nSamples = hdr.nSamples();
836  unsigned int length = hdr.blockLength();
837 
838  // Debug assertion to prevent problems if definitions not up to date.
839  assert(rctJetCrateMap().find(id) != rctJetCrateMap().end());
840 
841  // get crate (need this to get ieta and iphi)
842  unsigned int crate=rctJetCrateMap()[id];
843 
844  // re-interpret pointer
845  const uint16_t * p = reinterpret_cast<const uint16_t *>(d);
846 
847  // eta and phi
848  unsigned int ieta;
849  unsigned int iphi;
850 
851  for (unsigned int i=0; i<length; ++i) {
852  for (uint16_t bx=0; bx<nSamples; ++bx) {
853  if (i>0) {
854  if (crate<9){ // negative eta
855  ieta = 11-i;
856  iphi = 2*((11-crate)%9);
857  } else { // positive eta
858  ieta = 10+i;
859  iphi = 2*((20-crate)%9);
860  }
861  // First region is phi=0
862  colls()->rctCalo()->push_back( L1CaloRegion::makeRegionFromUnpacker(*p, ieta, iphi, id, i, bx) );
863  ++p;
864  // Second region is phi=1
865  if (iphi>0){
866  iphi-=1;
867  } else {
868  iphi = 17;
869  }
870  colls()->rctCalo()->push_back( L1CaloRegion::makeRegionFromUnpacker(*p, ieta, iphi, id, i, bx) );
871  ++p;
872  } else { // Skip the first two regions which are duplicates.
873  ++p;
874  ++p;
875  }
876  }
877  }
878 }
879 
880 // Fibre unpacking
881 void GctFormatTranslateV35::blockToFibres(const unsigned char * d, const GctBlockHeader& hdr)
882 {
883  // Don't want to do this in HLT optimisation mode!
884  if(hltMode()) { LogDebug("GCT") << "HLT mode - skipping unpack of GCT Fibres"; return; }
885 
886  unsigned int id = hdr.blockId();
887  unsigned int nSamples = hdr.nSamples();
888  unsigned int length = hdr.blockLength();
889 
890  // re-interpret pointer
891  const uint32_t * p = reinterpret_cast<const uint32_t *>(d);
892 
893  for (unsigned int i=0; i<length; ++i) {
894  for (unsigned int bx=0; bx<nSamples; ++bx) {
895  colls()->gctFibres()->push_back( L1GctFibreWord(*p, id, i, bx) );
896  ++p;
897  }
898  }
899 }
900 
902 {
903  this->blockToRctEmCand(d, hdr);
904  this->blockToFibres(d, hdr);
905 }
906 
907 void GctFormatTranslateV35::blockToGctInternEtSums(const unsigned char * d, const GctBlockHeader& hdr)
908 {
909  // Don't want to do this in HLT optimisation mode!
910 
911  if(hltMode()) { LogDebug("GCT") << "HLT mode - skipping unpack of internal Et Sums"; return; }
912 
913  unsigned int id = hdr.blockId();
914  unsigned int nSamples = hdr.nSamples();
915  unsigned int length = hdr.blockLength();
916 
917  // Re-interpret pointer to 32 bits
918  const uint32_t * p = reinterpret_cast<const uint32_t *>(d);
919 
920  for (unsigned int i=0; i<length; ++i) {
921  // Loop over timesamples (i.e. bunch crossings)
922  for (unsigned int bx=0; bx<nSamples; ++bx) {
923  colls()->gctInternEtSums()->push_back(L1GctInternEtSum::fromTotalEtOrHt(id,i,bx,*p));
924  ++p;
925  }
926  }
927 }
928 
930 {
931  // Don't want to do this in HLT optimisation mode!
932  if(hltMode()) { LogDebug("GCT") << "HLT mode - skipping unpack of internal Jet Cands"; return; }
933 
934  unsigned int id = hdr.blockId();
935  unsigned int nSamples = hdr.nSamples();
936  unsigned int length = hdr.blockLength();
937 
938  // Re-interpret pointer to 32 bits
939  const uint32_t * p = reinterpret_cast<const uint32_t *>(d);
940 
941  for (unsigned int i=0; i<length; ++i) {
942  // Loop over timesamples (i.e. bunch crossings)
943  for (unsigned int bx=0; bx<nSamples; ++bx) {
944  if (i<2) colls()->gctInternEtSums()->push_back(L1GctInternEtSum::fromJetMissEt(id,i,bx,*p));
945  if (i==3){
946  colls()->gctInternEtSums()->push_back(L1GctInternEtSum::fromJetTotEt(id,i,bx,*p));
947  colls()->gctInternEtSums()->push_back(L1GctInternEtSum::fromJetTotHt(id,i,bx,*p));
948  }
949  if (i>4) colls()->gctInternJets()->push_back(L1GctInternJetData::fromJetCluster(L1CaloRegionDetId(0,0),id,i,bx,*p));
950  ++p;
951  }
952  }
953 }
954 
955 void GctFormatTranslateV35::blockToGctTrigObjects(const unsigned char * d, const GctBlockHeader& hdr)
956 {
957  // Don't want to do this in HLT optimisation mode!
958  if(hltMode()) { LogDebug("GCT") << "HLT mode - skipping unpack of internal Jet Cands"; return; }
959 
960  unsigned int id = hdr.blockId();
961  unsigned int nSamples = hdr.nSamples();
962  unsigned int length = hdr.blockLength();
963 
964  // Re-interpret pointer to 16 bits so it sees one candidate at a time.
965  const uint16_t * p = reinterpret_cast<const uint16_t *>(d);
966 
967  for (unsigned int i=0; i<length; ++i) {
968  // Loop over timesamples (i.e. bunch crossings)
969  for (unsigned int bx=0; bx<nSamples; ++bx) {
971  ++p;
973  ++p;
974  }
975  }
976 }
977 
979 {
980  // Don't want to do this in HLT optimisation mode!
981  if(hltMode()) { LogDebug("GCT") << "HLT mode - skipping unpack of internal Jet Cands"; return; }
982 
983  unsigned int id = hdr.blockId();
984  unsigned int nSamples = hdr.nSamples();
985  unsigned int length = hdr.blockLength();
986 
987  // Re-interpret pointer to 16 bits so it sees one candidate at a time.
988  const uint16_t * p = reinterpret_cast<const uint16_t *>(d);
989 
990  for (unsigned int i=0; i<length; ++i) {
991  // Loop over timesamples (i.e. bunch crossings)
992  for (unsigned int bx=0; bx<nSamples; ++bx) {
994  ++p;
996  ++p;
997  }
998  }
999 }
1000 
1001 void GctFormatTranslateV35::blockToGctJetPreCluster(const unsigned char * d, const GctBlockHeader& hdr)
1002 {
1003  // Don't want to do this in HLT optimisation mode!
1004  if(hltMode()) { LogDebug("GCT") << "HLT mode - skipping unpack of internal Jet Cands"; return; }
1005 
1006  unsigned int id = hdr.blockId();
1007  unsigned int nSamples = hdr.nSamples();
1008  unsigned int length = hdr.blockLength();
1009 
1010  // Re-interpret pointer to 16 bits so it sees one candidate at a time.
1011  const uint16_t * p = reinterpret_cast<const uint16_t *>(d);
1012 
1013  for (unsigned int i=0; i<length; ++i) {
1014  // Loop over timesamples (i.e. bunch crossings)
1015  for (unsigned int bx=0; bx<nSamples; ++bx) {
1017  ++p;
1019  ++p;
1020  }
1021  }
1022 }
1023 
1024 void GctFormatTranslateV35::blockToGctInternRingSums(const unsigned char * d, const GctBlockHeader& hdr)
1025 {
1026  // Don't want to do this in HLT optimisation mode!
1027  if(hltMode()) { LogDebug("GCT") << "HLT mode - skipping unpack of internal HF ring data"; return; }
1028 
1029  unsigned int id = hdr.blockId();
1030  unsigned int nSamples = hdr.nSamples();
1031  unsigned int length = hdr.blockLength();
1032 
1033  // Re-interpret pointer to 32 bits
1034  const uint32_t * p = reinterpret_cast<const uint32_t *>(d);
1035 
1036  for (unsigned int i=0; i<length/2; ++i) {
1037  // Loop over timesamples (i.e. bunch crossings)
1038  for (unsigned int bx=0; bx<nSamples; ++bx) {
1039  colls()->gctInternHFData()->push_back(L1GctInternHFData::fromConcRingSums(id,i,bx,*p));
1040  ++p;
1041  }
1042  for (unsigned int bx=0; bx<nSamples; ++bx) {
1043  colls()->gctInternHFData()->push_back(L1GctInternHFData::fromConcBitCounts(id,i,bx,*p));
1044  ++p;
1045  }
1046  }
1047 }
1048 
1050 {
1051  // Don't want to do this in HLT optimisation mode!
1052  if(hltMode()) { LogDebug("GCT") << "HLT mode - skipping unpack of wheel input internal Et sums and HF ring data"; return; }
1053 
1054  unsigned int id = hdr.blockId();
1055  unsigned int nSamples = hdr.nSamples();
1056  unsigned int length = hdr.blockLength();
1057 
1058  // Re-interpret pointer to 32 bits
1059  const uint32_t * p = reinterpret_cast<const uint32_t *>(d);
1060 
1061  for (unsigned int i=0; i<length; ++i) {
1062  // Loop over timesamples (i.e. bunch crossings)
1063  for (unsigned int bx=0; bx<nSamples; ++bx) {
1064  if (i<3){
1065  colls()->gctInternEtSums()->push_back(L1GctInternEtSum::fromTotalEtOrHt(id,i,bx,*p));
1066  } else if (i>2 && i<9) {
1067  colls()->gctInternEtSums()->push_back(L1GctInternEtSum::fromMissEtxOrEty(id,i,bx,*p));
1068  } else if (i>8 && i<15) {
1069  colls()->gctInternHFData()->push_back(L1GctInternHFData::fromWheelRingSums(id,i,bx,*p));
1070  } else if (i>14){
1071  colls()->gctInternHFData()->push_back(L1GctInternHFData::fromWheelBitCounts(id,i,bx,*p));
1072  }
1073  ++p;
1074  }
1075  }
1076 }
1077 
1079 {
1080  // Don't want to do this in HLT optimisation mode!
1081  if(hltMode()) { LogDebug("GCT") << "HLT mode - skipping unpack of wheel output internal Et sums and HF ring data"; return; }
1082 
1083  unsigned int id = hdr.blockId();
1084  unsigned int nSamples = hdr.nSamples();
1085  unsigned int length = hdr.blockLength();
1086 
1087  // Re-interpret pointer to 32 bits
1088  const uint32_t * p = reinterpret_cast<const uint32_t *>(d);
1089 
1090  for (unsigned int i=0; i<length; ++i) {
1091  // Loop over timesamples (i.e. bunch crossings)
1092  for (unsigned int bx=0; bx<nSamples; ++bx) {
1093  if (i<1){
1094  colls()->gctInternEtSums()->push_back(L1GctInternEtSum::fromTotalEtOrHt(id,i,bx,*p));
1095  } else if (i>0 && i<3) {
1096  colls()->gctInternEtSums()->push_back(L1GctInternEtSum::fromMissEtxOrEty(id,i,bx,*p));
1097  } else if (i>2 && i<5) {
1098  colls()->gctInternHFData()->push_back(L1GctInternHFData::fromWheelRingSums(id,i,bx,*p));
1099  } else if (i>4){
1100  colls()->gctInternHFData()->push_back(L1GctInternHFData::fromWheelBitCounts(id,i,bx,*p));
1101  }
1102  ++p;
1103  }
1104  }
1105 }
#define LogDebug(id)
static L1GctInternEtSum fromMissEtxOrEty(uint16_t capBlock, uint16_t capIndex, int16_t bx, uint32_t data)
L1GctHFBitCountsCollection *const gctHfBitCounts() const
GCT output: Hadronic-Forward bit-counts collection.
virtual BlkToRctCrateMap & rctJetCrateMap()
get the static block ID to RCT crate map for jets
int i
Definition: DBlmapReader.cc:9
static L1GctInternJetData fromJetPreCluster(L1CaloRegionDetId rgn, uint16_t capBlock, uint16_t capIndex, int16_t bx, uint32_t data)
construct from &quot;jet_precluster&quot;
L1GctEmCandCollection *const gctNonIsoEm() const
GCT output: Non-isolated EM candidate collection.
Global Calorimeter Trigger SC -&gt; CC fibre data word.
std::pair< unsigned int, unsigned int > IsoBoundaryPair
virtual GctBlockHeader generateBlockHeader(const unsigned char *data) const
Generate a block header from four 8-bit values.
bool checkBlock(const GctBlockHeader &hdr) const
Performs checks on the block header to see if the block is possible to unpack or not.
L1CaloEmCollection *const rctEm() const
Input electrons from the RCT to the GCT.
static BlockLengthMap m_blockLength
Map to translate block number to fundamental size of a block (i.e. for 1 time-sample).
void SFPtoEMU(unsigned short(&eIsoRank)[4], unsigned short(&eIsoCardId)[4], unsigned short(&eIsoRegionId)[4], unsigned short(&eNonIsoRank)[4], unsigned short(&eNonIsoCardId)[4], unsigned short(&eNonIsoRegionId)[4], unsigned short(&MIPbits)[7][2], unsigned short(&Qbits)[7][2], unsigned short(&SFP)[2][4]) const
void blockToRctCaloRegions(const unsigned char *d, const GctBlockHeader &hdr)
Unpack RCT Calo Regions.
GctFormatTranslateV35(bool hltMode=false, bool unpackSharedRegions=false)
Constructor.
void blockToGctJetCandsAndCounts(const unsigned char *d, const GctBlockHeader &hdr)
Unpack GCT Jet Candidates and jet counts.
Level-1 Trigger jet candidate.
Definition: L1GctJetCand.h:18
Abstract interface for RawToDigi/DigiToRaw conversions of GCT data.
void blockToGctJetPreCluster(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT internal shared jet finder info
Level-1 Region Calorimeter Trigger EM candidate.
Definition: L1CaloEmCand.h:18
Persistable copy of missing Et measured at Level-1.
Definition: L1GctEtMiss.h:18
virtual bool convertBlock(const unsigned char *d, const GctBlockHeader &hdr)
Get digis from the block - will return true if it succeeds, false otherwise.
const SourceCardRouting & srcCardRouting() const
Protected interface to the unpackSharedRegions commissioning option.
static L1GctInternJetData fromJetClusterMinimal(L1CaloRegionDetId rgn, uint16_t capBlock, uint16_t capIndex, int16_t bx, uint32_t data)
construct from &quot;jet_cluster_minimal&quot;
void blockToFibres(const unsigned char *d, const GctBlockHeader &hdr)
unpack Fibres
void blockToGctInternRingSums(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT internal HF ring sums
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
static L1GctInternHFData fromConcBitCounts(const uint16_t capBlock, const uint16_t capIndex, const int16_t bx, const uint32_t data)
Level-1 Trigger EM candidate at output of GCT.
Definition: L1GctEmCand.h:22
static L1GctInternEtSum fromTotalEtOrHt(uint16_t capBlock, uint16_t capIndex, int16_t bx, uint32_t data)
L1GctInternHFDataCollection *const gctInternHFData() const
Internal Hadronic-Forward bit-counts/ring-sums data collection.
U second(std::pair< T, U > const &p)
std::vector< L1GctJetCand > L1GctJetCandCollection
void blockToGctTrigObjects(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT internal wheel and conc jets
void blockToGctEmCandsAndEnergySums(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT EM Candidates and energy sums.
L1GctInternEtSumCollection *const gctInternEtSums() const
Internal Et Sum collection.
L1GctEtTotalCollection *const gctEtTot() const
GCT output: Total Et collection.
GctUnpackCollections *const colls() const
Protected access to the GCT Unpack Collections.
virtual BlkToRctCrateMap & rctEmCrateMap()
get the static block ID to RCT crate map for electrons.
static L1GctInternHFData fromConcRingSums(const uint16_t capBlock, const uint16_t capIndex, const int16_t bx, const uint32_t data)
void blockToGctWheelInputInternEtAndRingSums(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT internal input to wheel
Persistable copy of total Et measured at Level-1.
Definition: L1GctEtTotal.h:18
Simple class for holding the basic attributes of an 32-bit block header.
vector< PseudoJet > jets
virtual uint32_t generateRawHeader(const uint32_t blockId, const uint32_t nSamples, const uint32_t bxId, const uint32_t eventId) const
Returns a raw 32-bit header word generated from the blockId, number of time samples, bunch-crossing and event IDs.
static BlkToRctCrateMap m_rctEmCrate
Map to relate capture block ID to the RCT crate the data originated from (for electrons).
void blockToGctInternEmCand(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT internal EM Candidates
void blockToGctJetClusterMinimal(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT internal input to wheel jet sort
L1GctEtMissCollection *const gctEtMiss() const
GCT output: Missing Et collection.
virtual BlockLengthMap & blockLengthMap()
get the static block ID to block-length map.
#define end
Definition: vmac.h:37
static L1GctInternEtSum fromJetMissEt(uint16_t capBlock, uint16_t capIndex, int16_t bx, uint32_t data)
std::map< unsigned int, unsigned int > BlockLengthMap
Block ID to Block Length map.
unsigned int offset(bool)
void blockDoNothing(const unsigned char *d, const GctBlockHeader &hdr)
The null unpack function - obviously common to all formats.
bool hltMode() const
Protected interface to get HLT optimisation mode flag.
static L1GctInternHFData fromWheelRingSums(const uint16_t capBlock, const uint16_t capIndex, const int16_t bx, const uint32_t data)
Persistable copy of total Ht measured at Level-1.
Definition: L1GctEtHad.h:18
uint32_t blockLength() const
Get the fundamental block length (for 1 time sample)
static L1GctHFRingEtSums fromConcRingSums(const uint16_t capBlock, const uint16_t capIndex, const int16_t bx, const uint32_t data)
L1GctJetCandCollection *const gctJets(const unsigned cat) const
Get a specific jet candandiate collection using the JetCandCategory enumeration.
void blockToGctInternEtSums(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT internal Et sums
static L1GctInternJetData fromJetCluster(L1CaloRegionDetId rgn, uint16_t capBlock, uint16_t capIndex, int16_t bx, uint32_t data)
construct from &quot;jet_cluster&quot;
void blockToGctInternEtSumsAndJetCluster(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT internal output of leaf jet finder
L1GctHFRingEtSumsCollection *const gctHfRingEtSums() const
GCT output: Hadronic-Forward ring-sums collection.
static BlkToRctCrateMap m_rctJetCrate
Map to relate capture block ID to the RCT crate the data originated from (for jets).
static L1GctInternJetData fromGctTrigObject(L1CaloRegionDetId rgn, uint16_t capBlock, uint16_t capIndex, int16_t bx, uint32_t data)
construct from &quot;gct_trig_object&quot;
void blockToFibresAndToRctEmCand(const unsigned char *d, const GctBlockHeader &hdr)
unpack Fibres and RCT EM Candidates
L1GctFibreCollection *const gctFibres() const
Raw fibre input to the GCT.
L1GctEmCandCollection *const gctIsoEm() const
GCT output: Isolated EM candidate collection.
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
virtual ~GctFormatTranslateV35()
Destructor.
L1GctInternJetDataCollection *const gctInternJets() const
Internal Jet candidate collection.
static BlockIdToUnpackFnMap m_blockUnpackFn
Block ID to unpack function map.
L1GctEtHadCollection *const gctEtHad() const
GCT output: Hadronic transverse-energy (Ht) collection.
void blockToRctEmCand(const unsigned char *d, const GctBlockHeader &hdr)
unpack RCT EM Candidates
static L1GctHFBitCounts fromConcHFBitCounts(const uint16_t capBlock, const uint16_t capIndex, const int16_t bx, const uint32_t data)
static L1GctInternHFData fromWheelBitCounts(const uint16_t capBlock, const uint16_t capIndex, const int16_t bx, const uint32_t data)
tuple cout
Definition: gather_cfg.py:121
std::map< unsigned int, IsoBoundaryPair > BlockIdToEmCandIsoBoundMap
A typdef for mapping Block IDs to IsoBoundaryPairs.
uint32_t blockId() const
Get the block ID.
std::map< unsigned int, unsigned int > BlkToRctCrateMap
Typedef for mapping block ID to RCT crate.
std::map< unsigned int, std::string > BlockNameMap
Block ID to Block Description map.
void blockToGctWheelOutputInternEtAndRingSums(const unsigned char *d, const GctBlockHeader &hdr)
unpack GCT internal output of wheel
L1GctInternEmCandCollection *const gctInternEm() const
Internal EM candidate collection.
static BlockNameMap m_blockName
Map to hold a description for each block number.
uint32_t nSamples() const
Get the number of time samples.
static L1CaloRegion makeRegionFromUnpacker(const uint16_t data, const unsigned ieta, const unsigned iphi, const uint16_t block, const uint16_t index, const int16_t bx)
constructor from raw data and GCT indices for unpacking
static L1GctInternEtSum fromJetTotEt(uint16_t capBlock, uint16_t capIndex, int16_t bx, uint32_t data)
virtual BlockIdToEmCandIsoBoundMap & internEmIsoBounds()
get the static intern EM cand isolated boundary map.
L1CaloRegionCollection *const rctCalo() const
Input calo regions from the RCT to the GCT.
std::vector< L1GctEmCand > L1GctEmCandCollection
std::map< unsigned int, PtrToUnpackFn > BlockIdToUnpackFnMap
Typedef for a block ID to unpack function map.
static BlockIdToEmCandIsoBoundMap m_internEmIsoBounds
static L1GctInternEtSum fromJetTotHt(uint16_t capBlock, uint16_t capIndex, int16_t bx, uint32_t data)