ATLAS Offline Software
Loading...
Searching...
No Matches
gFexByteStreamTool.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
5//***************************************************************************
6// gFexByteStreamTool - description
7// -------------------
8// begin : 20 07 2022
9// email : cecilia.tosciri@cern.ch
10// ***************************************************************************/
11
12#include "gFexByteStreamTool.h"
14#include "eformat/SourceIdentifier.h"
15#include "eformat/Status.h"
17
18#include <span>
19
22
23namespace gPos = LVL1::gFEXPos;
24
26 const std::string& name,
27 const IInterface* parent)
28 : base_class(type, name, parent) {}
29
31 // Conversion mode for gRho TOBs
32 ATH_MSG_DEBUG(" ROB IDs: " << MSG::hex << m_robIds.value() << MSG::dec);
33
34 ConversionMode gRhomode = getConversionMode(m_gFexRhoReadKey, m_gFexRhoWriteKey, msg());
35 ATH_CHECK(gRhomode!=ConversionMode::Undefined);
36 ATH_CHECK(m_gFexRhoWriteKey.initialize(gRhomode==ConversionMode::Decoding));
37 ATH_CHECK(m_gFexRhoReadKey.initialize(gRhomode==ConversionMode::Encoding));
38 ATH_MSG_DEBUG((gRhomode==ConversionMode::Encoding ? "Encoding" : "Decoding") << " gRho ");
39
40 // Conversion mode for gSJ TOBs
41 ConversionMode gSJmode = getConversionMode(m_gFexBlockReadKey, m_gFexBlockWriteKey, msg());
42 ATH_CHECK(gSJmode!=ConversionMode::Undefined);
43 ATH_CHECK(m_gFexBlockWriteKey.initialize(gSJmode==ConversionMode::Decoding));
44 ATH_CHECK(m_gFexBlockReadKey.initialize(gSJmode==ConversionMode::Encoding));
45 ATH_MSG_DEBUG((gSJmode==ConversionMode::Encoding ? "Encoding" : "Decoding") << " gSJ ");
46
47 // Conversion mode for gLJ TOBs
48 ConversionMode gLJmode = getConversionMode(m_gFexJetReadKey, m_gFexJetWriteKey, msg());
49 ATH_CHECK(gLJmode!=ConversionMode::Undefined);
50 ATH_CHECK(m_gFexJetWriteKey.initialize(gLJmode==ConversionMode::Decoding));
51 ATH_CHECK(m_gFexJetReadKey.initialize(gLJmode==ConversionMode::Encoding));
52 ATH_MSG_DEBUG((gLJmode==ConversionMode::Encoding ? "Encoding" : "Decoding") << " gLJ ");
53
54 // Conversion mode for gScalarEJwoj TOBs
55 ConversionMode gScalarEJwojmode = getConversionMode(m_gScalarEJwojReadKey, m_gScalarEJwojWriteKey, msg());
56 ATH_CHECK(gScalarEJwojmode!=ConversionMode::Undefined);
57 ATH_CHECK(m_gScalarEJwojWriteKey.initialize(gScalarEJwojmode==ConversionMode::Decoding));
58 ATH_CHECK(m_gScalarEJwojReadKey.initialize(gScalarEJwojmode==ConversionMode::Encoding));
59 ATH_MSG_DEBUG((gScalarEJwojmode==ConversionMode::Encoding ? "Encoding" : "Decoding") << " gScalarEJwoj ");
60
61 // Conversion mode for gEspresso TOBs
62 ConversionMode gEspressomode = getConversionMode(m_gEspressoReadKey, m_gEspressoWriteKey, msg());
63 ATH_CHECK(gEspressomode!=ConversionMode::Undefined);
64 ATH_CHECK(m_gEspressoWriteKey.initialize(gEspressomode==ConversionMode::Decoding));
65 ATH_CHECK(m_gEspressoReadKey.initialize(gEspressomode==ConversionMode::Encoding));
66 ATH_MSG_DEBUG((gEspressomode==ConversionMode::Encoding ? "Encoding" : "Decoding") << " gEspresso ");
67
68 // Conversion mode for gMETComponentsJwoj TOBs
69 ConversionMode gMETComponentsJwojmode = getConversionMode(m_gMETComponentsJwojReadKey, m_gMETComponentsJwojWriteKey, msg());
70 ATH_CHECK(gMETComponentsJwojmode!=ConversionMode::Undefined);
71 ATH_CHECK(m_gMETComponentsJwojWriteKey.initialize(gMETComponentsJwojmode==ConversionMode::Decoding));
72 ATH_CHECK(m_gMETComponentsJwojReadKey.initialize(gMETComponentsJwojmode==ConversionMode::Encoding));
73 ATH_MSG_DEBUG((gMETComponentsJwojmode==ConversionMode::Encoding ? "Encoding" : "Decoding") << " gMETComponentsJwoj ");
74
75 // Conversion mode for gMHTComponentsJwoj TOBs
76 ConversionMode gMHTComponentsJwojmode = getConversionMode(m_gMHTComponentsJwojReadKey, m_gMHTComponentsJwojWriteKey, msg());
77 ATH_CHECK(gMHTComponentsJwojmode!=ConversionMode::Undefined);
78 ATH_CHECK(m_gMHTComponentsJwojWriteKey.initialize(gMHTComponentsJwojmode==ConversionMode::Decoding));
79 ATH_CHECK(m_gMHTComponentsJwojReadKey.initialize(gMHTComponentsJwojmode==ConversionMode::Encoding));
80 ATH_MSG_DEBUG((gMHTComponentsJwojmode==ConversionMode::Encoding ? "Encoding" : "Decoding") << " gMHTComponentsJwoj ");
81
82 // Conversion mode for gMSTComponentsJwoj TOBs
83 ConversionMode gMSTComponentsJwojmode = getConversionMode(m_gMSTComponentsJwojReadKey, m_gMSTComponentsJwojWriteKey, msg());
84 ATH_CHECK(gMSTComponentsJwojmode!=ConversionMode::Undefined);
85 ATH_CHECK(m_gMSTComponentsJwojWriteKey.initialize(gMSTComponentsJwojmode==ConversionMode::Decoding));
86 ATH_CHECK(m_gMSTComponentsJwojReadKey.initialize(gMSTComponentsJwojmode==ConversionMode::Encoding));
87 ATH_MSG_DEBUG((gMSTComponentsJwojmode==ConversionMode::Encoding ? "Encoding" : "Decoding") << " gMSTComponentsJwoj ");
88
89 // Conversion mode for gMETComponentsNoiseCut TOBs
90 ConversionMode gMETComponentsNoiseCutmode = getConversionMode(m_gMETComponentsNoiseCutReadKey, m_gMETComponentsNoiseCutWriteKey, msg());
91 ATH_CHECK(gMETComponentsNoiseCutmode!=ConversionMode::Undefined);
92 ATH_CHECK(m_gMETComponentsNoiseCutWriteKey.initialize(gMETComponentsNoiseCutmode==ConversionMode::Decoding));
93 ATH_CHECK(m_gMETComponentsNoiseCutReadKey.initialize(gMETComponentsNoiseCutmode==ConversionMode::Encoding));
94 ATH_MSG_DEBUG((gMETComponentsNoiseCutmode==ConversionMode::Encoding ? "Encoding" : "Decoding") << " gMETComponentsNoiseCut ");
95
96 // Conversion mode for gMETRms TOBs
97 ConversionMode gMETComponentsRmsmode = getConversionMode(m_gMETComponentsRmsReadKey, m_gMETComponentsRmsWriteKey, msg());
98 ATH_CHECK(gMETComponentsRmsmode!=ConversionMode::Undefined);
99 ATH_CHECK(m_gMETComponentsRmsWriteKey.initialize(gMETComponentsRmsmode==ConversionMode::Decoding));
100 ATH_CHECK(m_gMETComponentsRmsReadKey.initialize(gMETComponentsRmsmode==ConversionMode::Encoding));
101 ATH_MSG_DEBUG((gMETComponentsRmsmode==ConversionMode::Encoding ? "Encoding" : "Decoding") << " gMETComponentsRms ");
102
103 // Conversion mode for gScalarENoiseCut TOBs
104 ConversionMode gScalarENoiseCutmode = getConversionMode(m_gScalarENoiseCutReadKey, m_gScalarENoiseCutWriteKey, msg());
105 ATH_CHECK(gScalarENoiseCutmode!=ConversionMode::Undefined);
106 ATH_CHECK(m_gScalarENoiseCutWriteKey.initialize(gScalarENoiseCutmode==ConversionMode::Decoding));
107 ATH_CHECK(m_gScalarENoiseCutReadKey.initialize(gScalarENoiseCutmode==ConversionMode::Encoding));
108 ATH_MSG_DEBUG((gScalarENoiseCutmode==ConversionMode::Encoding ? "Encoding" : "Decoding") << " gScalarENoiseCut ");
109
110 // Conversion mode for gScalarERms TOBs
111 ConversionMode gScalarERmsmode = getConversionMode(m_gScalarERmsReadKey, m_gScalarERmsWriteKey, msg());
112 ATH_CHECK(gScalarERmsmode!=ConversionMode::Undefined);
113 ATH_CHECK(m_gScalarERmsWriteKey.initialize(gScalarERmsmode==ConversionMode::Decoding));
114 ATH_CHECK(m_gScalarERmsReadKey.initialize(gScalarERmsmode==ConversionMode::Encoding));
115 ATH_MSG_DEBUG((gScalarERmsmode==ConversionMode::Encoding ? "Encoding" : "Decoding") << " gScalarERms ");
116
117 // Initialize multi-slice write handle keys (only if configured with non-empty key)
130
131 // Initialize slice number decoration keys for out-of-time containers.
132 // Multi-slice mode is activated based on m_gFexJetSliceWriteKey being non-empty,
133 // so all decoration keys are initialized based on that same condition.
134 // When multi-slice mode is enabled, all OOT container keys must be configured together.
147
148 //checking all Conversion modes.. avoid misconfigurations
149 const std::array<ConversionMode,2> modes{gSJmode,gLJmode};
150 if (std::any_of(modes.begin(),modes.end(),[&gRhomode](ConversionMode m) { return m!=gRhomode; } )) {
151 ATH_MSG_ERROR("Inconsistent conversion modes");
152 return StatusCode::FAILURE;
153 }
154
155 ATH_CHECK(m_l1MenuKey.initialize());
156
157 if (!m_monTool.empty()) {
158 ATH_CHECK(m_monTool.retrieve());
159 ATH_MSG_INFO("Logging errors to " << m_monTool.name() << " monitoring tool");
160 m_UseMonitoring = true;
161 }
162
163
164 return StatusCode::SUCCESS;
165}
166
168 // Retrieve the L1 menu configuration
170 ATH_CHECK(l1Menu.isValid());
171
172 try {
173 const auto & l1Menu_gJ = l1Menu->thrExtraInfo().gJ();
174 const auto & l1Menu_gLJ = l1Menu->thrExtraInfo().gLJ();
175 const auto & l1Menu_gXE = l1Menu->thrExtraInfo().gXE();
176 const auto & l1Menu_gTE = l1Menu->thrExtraInfo().gTE();
177
178 ATH_CHECK(l1Menu_gJ.isValid());
179 ATH_CHECK(l1Menu_gLJ.isValid());
180 ATH_CHECK(l1Menu_gXE.isValid());
181 ATH_CHECK(l1Menu_gTE.isValid());
182
183 m_gJ_scale = l1Menu_gJ.resolutionMeV();
184 m_gLJ_scale = l1Menu_gLJ.resolutionMeV();
185 m_gXE_scale = l1Menu_gXE.resolutionMeV();
186 m_gTE_scale = l1Menu_gTE.resolutionMeV();
187 } catch (const std::exception& e) {
188 ATH_MSG_ERROR("Exception reading L1Menu: " << e.what());
189 return StatusCode::FAILURE;
190 }
191
192 return StatusCode::SUCCESS;
193
194}
195
196// BS->xAOD conversion
197StatusCode gFexByteStreamTool::convertFromBS(const std::vector<const ROBF*>& vrobf, const EventContext& ctx) const {
198
199 //WriteHandle for gFEX EDMs
200
201 //---Rho Container
203 ATH_CHECK(gRhoContainer.record(std::make_unique<xAOD::gFexJetRoIContainer>(), std::make_unique<xAOD::gFexJetRoIAuxContainer>()));
204 ATH_MSG_DEBUG("Recorded gFexJetRoIContainer with key " << gRhoContainer.key());
205
206 //---Small Jets Container
208 ATH_CHECK(gSJContainer.record(std::make_unique<xAOD::gFexJetRoIContainer>(), std::make_unique<xAOD::gFexJetRoIAuxContainer>()));
209 ATH_MSG_DEBUG("Recorded gFexJetRoIContainer with key " << gSJContainer.key());
210
211 //---Large Jets Container
213 ATH_CHECK(gLJContainer.record(std::make_unique<xAOD::gFexJetRoIContainer>(), std::make_unique<xAOD::gFexJetRoIAuxContainer>()));
214 ATH_MSG_DEBUG("Recorded gFexJetRoIContainer with key " << gLJContainer.key());
215
216 //---Scalar MET and SumET JwoJ Container
218 ATH_CHECK(gScalarEJwojContainer.record(std::make_unique<xAOD::gFexGlobalRoIContainer>(), std::make_unique<xAOD::gFexGlobalRoIAuxContainer>()));
219 ATH_MSG_DEBUG("Recorded gFexJetGlobalContainer with key " << gScalarEJwojContainer.key());
220
221 //---gEspresso Container
223 ATH_CHECK(gEspressoContainer.record(std::make_unique<xAOD::gFexGlobalRoIContainer>(), std::make_unique<xAOD::gFexGlobalRoIAuxContainer>()));
224 ATH_MSG_DEBUG("Recorded gFexJetGlobalContainer with key " << gEspressoContainer.key());
225
226 //---MET Components JwoJ Container
228 ATH_CHECK(gMETComponentsJwojContainer.record(std::make_unique<xAOD::gFexGlobalRoIContainer>(), std::make_unique<xAOD::gFexGlobalRoIAuxContainer>()));
229 ATH_MSG_DEBUG("Recorded gFexJetGlobalContainer with key " << gMETComponentsJwojContainer.key());
230
231 //---MHT Components JwoJ Container
233 ATH_CHECK(gMHTComponentsJwojContainer.record(std::make_unique<xAOD::gFexGlobalRoIContainer>(), std::make_unique<xAOD::gFexGlobalRoIAuxContainer>()));
234 ATH_MSG_DEBUG("Recorded gFexJetGlobalContainer with key " << gMHTComponentsJwojContainer.key());
235
236 //---MST Components JwoJ Container
238 ATH_CHECK(gMSTComponentsJwojContainer.record(std::make_unique<xAOD::gFexGlobalRoIContainer>(), std::make_unique<xAOD::gFexGlobalRoIAuxContainer>()));
239 ATH_MSG_DEBUG("Recorded gFexJetGlobalContainer with key " << gMSTComponentsJwojContainer.key());
240
241 //---MET Components NoiseCut Container
243 ATH_CHECK(gMETComponentsNoiseCutContainer.record(std::make_unique<xAOD::gFexGlobalRoIContainer>(), std::make_unique<xAOD::gFexGlobalRoIAuxContainer>()));
244 ATH_MSG_DEBUG("Recorded gFexJetGlobalContainer with key " << gMETComponentsNoiseCutContainer.key());
245
246 //---MET Components Rms Container
248 ATH_CHECK(gMETComponentsRmsContainer.record(std::make_unique<xAOD::gFexGlobalRoIContainer>(), std::make_unique<xAOD::gFexGlobalRoIAuxContainer>()));
249 ATH_MSG_DEBUG("Recorded gFexJetGlobalContainer with key " << gMETComponentsRmsContainer.key());
250
251 //---Scalar MET and SumET NoiseCut Container
253 ATH_CHECK(gScalarENoiseCutContainer.record(std::make_unique<xAOD::gFexGlobalRoIContainer>(), std::make_unique<xAOD::gFexGlobalRoIAuxContainer>()));
254 ATH_MSG_DEBUG("Recorded gFexJetGlobalContainer with key " << gScalarENoiseCutContainer.key());
255
256 //---Scalar MET and SumET Rms Container
258 ATH_CHECK(gScalarERmsContainer.record(std::make_unique<xAOD::gFexGlobalRoIContainer>(), std::make_unique<xAOD::gFexGlobalRoIAuxContainer>()));
259 ATH_MSG_DEBUG("Recorded gFexJetGlobalContainer with key " << gScalarERmsContainer.key());
260
261 // Determine if multi-slice mode is enabled (slice 0 = L1A, slices 1,2 = out-of-time)
262 const bool multiSlice = !m_gFexJetSliceWriteKey.empty();
263
264 // Create out-of-time containers for jet TOBs if multi-slice enabled
268 // Create out-of-time containers for global TOBs if multi-slice enabled
269 SG::WriteHandle<xAOD::gFexGlobalRoIContainer> gScalarEJwojSliceContainer;
270 SG::WriteHandle<xAOD::gFexGlobalRoIContainer> gMETComponentsJwojSliceContainer;
271 SG::WriteHandle<xAOD::gFexGlobalRoIContainer> gMHTComponentsJwojSliceContainer;
272 SG::WriteHandle<xAOD::gFexGlobalRoIContainer> gMSTComponentsJwojSliceContainer;
273 SG::WriteHandle<xAOD::gFexGlobalRoIContainer> gEspressoSliceContainer;
274 SG::WriteHandle<xAOD::gFexGlobalRoIContainer> gMETComponentsNoiseCutSliceContainer;
275 SG::WriteHandle<xAOD::gFexGlobalRoIContainer> gScalarENoiseCutSliceContainer;
276 SG::WriteHandle<xAOD::gFexGlobalRoIContainer> gMETComponentsRmsSliceContainer;
277 SG::WriteHandle<xAOD::gFexGlobalRoIContainer> gScalarERmsSliceContainer;
278
279 if (multiSlice) {
281 ATH_CHECK(gRhoSliceContainer.record(std::make_unique<xAOD::gFexJetRoIContainer>(), std::make_unique<xAOD::gFexJetRoIAuxContainer>()));
282 ATH_MSG_DEBUG("Recorded gFexJetRoIContainer (out-of-time) with key " << gRhoSliceContainer.key());
283
285 ATH_CHECK(gSJSliceContainer.record(std::make_unique<xAOD::gFexJetRoIContainer>(), std::make_unique<xAOD::gFexJetRoIAuxContainer>()));
286 ATH_MSG_DEBUG("Recorded gFexJetRoIContainer (out-of-time) with key " << gSJSliceContainer.key());
287
289 ATH_CHECK(gLJSliceContainer.record(std::make_unique<xAOD::gFexJetRoIContainer>(), std::make_unique<xAOD::gFexJetRoIAuxContainer>()));
290 ATH_MSG_DEBUG("Recorded gFexJetRoIContainer (out-of-time) with key " << gLJSliceContainer.key());
291
293 ATH_CHECK(gScalarEJwojSliceContainer.record(std::make_unique<xAOD::gFexGlobalRoIContainer>(), std::make_unique<xAOD::gFexGlobalRoIAuxContainer>()));
294 ATH_MSG_DEBUG("Recorded gFexGlobalRoIContainer (out-of-time) with key " << gScalarEJwojSliceContainer.key());
295
297 ATH_CHECK(gMETComponentsJwojSliceContainer.record(std::make_unique<xAOD::gFexGlobalRoIContainer>(), std::make_unique<xAOD::gFexGlobalRoIAuxContainer>()));
298 ATH_MSG_DEBUG("Recorded gFexGlobalRoIContainer (out-of-time) with key " << gMETComponentsJwojSliceContainer.key());
299
301 ATH_CHECK(gMHTComponentsJwojSliceContainer.record(std::make_unique<xAOD::gFexGlobalRoIContainer>(), std::make_unique<xAOD::gFexGlobalRoIAuxContainer>()));
302 ATH_MSG_DEBUG("Recorded gFexGlobalRoIContainer (out-of-time) with key " << gMHTComponentsJwojSliceContainer.key());
303
305 ATH_CHECK(gMSTComponentsJwojSliceContainer.record(std::make_unique<xAOD::gFexGlobalRoIContainer>(), std::make_unique<xAOD::gFexGlobalRoIAuxContainer>()));
306 ATH_MSG_DEBUG("Recorded gFexGlobalRoIContainer (out-of-time) with key " << gMSTComponentsJwojSliceContainer.key());
307
309 ATH_CHECK(gEspressoSliceContainer.record(std::make_unique<xAOD::gFexGlobalRoIContainer>(), std::make_unique<xAOD::gFexGlobalRoIAuxContainer>()));
310 ATH_MSG_DEBUG("Recorded gFexGlobalRoIContainer (out-of-time) with key " << gEspressoSliceContainer.key());
311
313 ATH_CHECK(gMETComponentsNoiseCutSliceContainer.record(std::make_unique<xAOD::gFexGlobalRoIContainer>(), std::make_unique<xAOD::gFexGlobalRoIAuxContainer>()));
314 ATH_MSG_DEBUG("Recorded gFexGlobalRoIContainer (out-of-time) with key " << gMETComponentsNoiseCutSliceContainer.key());
315
317 ATH_CHECK(gScalarENoiseCutSliceContainer.record(std::make_unique<xAOD::gFexGlobalRoIContainer>(), std::make_unique<xAOD::gFexGlobalRoIAuxContainer>()));
318 ATH_MSG_DEBUG("Recorded gFexGlobalRoIContainer (out-of-time) with key " << gScalarENoiseCutSliceContainer.key());
319
321 ATH_CHECK(gMETComponentsRmsSliceContainer.record(std::make_unique<xAOD::gFexGlobalRoIContainer>(), std::make_unique<xAOD::gFexGlobalRoIAuxContainer>()));
322 ATH_MSG_DEBUG("Recorded gFexGlobalRoIContainer (out-of-time) with key " << gMETComponentsRmsSliceContainer.key());
323
325 ATH_CHECK(gScalarERmsSliceContainer.record(std::make_unique<xAOD::gFexGlobalRoIContainer>(), std::make_unique<xAOD::gFexGlobalRoIAuxContainer>()));
326 ATH_MSG_DEBUG("Recorded gFexGlobalRoIContainer (out-of-time) with key " << gScalarERmsSliceContainer.key());
327 }
328
329
330 // Iterate over ROBFragments to decode
331 for (const ROBF* rob : vrobf) {
332 // Iterate over ROD words and decode
333
334
335 ATH_MSG_DEBUG("Starting to decode " << rob->rod_ndata() << " ROD words from ROB 0x" << std::hex << rob->rob_source_id());
336
337 //There is no data to decode.. not even the ROD trailers
338 if(rob->rod_ndata() <= 0){
339 continue;
340 }
341
342 const auto dataArray = std::span{rob->rod_data(), rob->rod_ndata()};
343
344
345 // Starting to loop over the gFEX words
346
347 unsigned int n_words = rob->rod_ndata();
348
349 //saving Jet TOBs into the EDM container
350 for(unsigned int iWord=0; iWord<n_words; iWord++) {
351 ATH_MSG_DEBUG("Raw word 0x" << std::hex << dataArray[iWord] << " " << std::bitset<32> (dataArray[iWord]));
352 }
353
354 // Vectors to temporarily store global tob before they are summed together
355 // For multi-slice support, we use vectors of arrays: [sliceNumber][fpga]
356 // Vectors are dynamically resized based on the actual number of slices in the data
357 // Inner arrays are fixed size 3 (one element per FPGA)
358 std::vector<int> global_counter;
359 std::vector<std::array<uint32_t, 3>> JWOJ_MHT;
360 std::vector<std::array<uint32_t, 3>> JWOJ_MST;
361 std::vector<std::array<uint32_t, 3>> JWOJ_MET;
362 std::vector<std::array<uint32_t, 3>> JWOJ_SCALAR;
363 std::vector<std::array<uint32_t, 3>> GESPRESSO;
364 std::vector<std::array<uint32_t, 3>> NC_MET;
365 std::vector<std::array<uint32_t, 3>> NC_SCALAR;
366 std::vector<std::array<uint32_t, 3>> RMS_MET;
367 std::vector<std::array<uint32_t, 3>> RMS_SCALAR;
368 // Track slice numbers for global TOBs (to be assigned when fillGlobal is called)
369 std::vector<uint32_t> globalSliceNumbers;
370
371 // Helper lambda to ensure vectors are large enough for a given slice
372 auto ensureSliceCapacity = [&](size_t sliceNum) {
373 if (sliceNum >= global_counter.size()) {
374 size_t newSize = sliceNum + 1;
375 global_counter.resize(newSize, 0);
376 JWOJ_MHT.resize(newSize, {0, 0, 0});
377 JWOJ_MST.resize(newSize, {0, 0, 0});
378 JWOJ_MET.resize(newSize, {0, 0, 0});
379 JWOJ_SCALAR.resize(newSize, {0, 0, 0});
380 GESPRESSO.resize(newSize, {0, 0, 0});
381 NC_MET.resize(newSize, {0, 0, 0});
382 NC_SCALAR.resize(newSize, {0, 0, 0});
383 RMS_MET.resize(newSize, {0, 0, 0});
384 RMS_SCALAR.resize(newSize, {0, 0, 0});
385 }
386 };
387
388 size_t index = 0;
389 while ( index < n_words ) {
390 const uint32_t headerWord = dataArray[index];//Identify the header words. The first is a header word.
391 const uint32_t blockType = (headerWord >> gPos::BLOCK_TYPE_BIT) & gPos::BLOCK_TYPE_MASK;
392 const uint32_t headerSize = (headerWord >> gPos::HEADER_SIZE_BIT) & gPos::HEADER_SIZE_MASK;
393 const uint32_t errorFlags = (headerWord >> gPos::ERROR_FLAG_BIT) & gPos::ERROR_FLAG_MASK;
394 const uint32_t dataSize = headerWord & gPos::DATA_SIZE_MASK;
395
396 ATH_MSG_DEBUG( "index "<< index );
397 ATH_MSG_DEBUG( "word "<< std::bitset<32> (dataArray[index]) );
398 ATH_MSG_DEBUG( "headerWord "<< std::bitset<32> (headerWord) );
399 ATH_MSG_DEBUG( "blockType "<< std::bitset<4> (blockType) );
400 ATH_MSG_DEBUG( "headerSize "<< std::bitset<2> (headerSize) );
401 ATH_MSG_DEBUG( "errorFlags "<< std::bitset<1> (errorFlags) );
402 ATH_MSG_DEBUG( "dataSize "<< std::bitset<12> (dataSize) );
403
404 const uint32_t blockSize = headerSize + dataSize;
405 if ( (index + blockSize) > n_words ) {
406
407 std::stringstream sdetail;
408 sdetail << "Remaining block size " << (n_words - index) << " is too small for subblock of type " << blockType << " with headerSize " << headerSize << " and dataSize " << dataSize ;
409 std::stringstream slocation;
410 slocation << "0x"<< std::hex << rob->rob_source_id() << std::dec << " type:"<<blockType;
411 std::stringstream stitle;
412 stitle << "Small subblock size " ;
413 printError(slocation.str(),stitle.str(),MSG::DEBUG,sdetail.str());
414
415 }
416
417 index += headerSize;
418
419 const uint32_t numSlices = dataSize / gPos::WORDS_PER_SLICE;
420 ATH_MSG_DEBUG( "numSlices " << numSlices );
421
422 if ( numSlices * gPos::WORDS_PER_SLICE != dataSize ) {
423
424 std::stringstream sdetail;
425 sdetail << "L1CaloBsDecoderRun3::decodeGfexTobs: subblock type " << blockType << " with dataSize " << dataSize << " is not a multiple of " << gPos::WORDS_PER_SLICE << " words" ;
426 std::stringstream slocation;
427 slocation << "0x"<< std::hex << rob->rob_source_id()<< std::dec << " type:"<<blockType;
428 std::stringstream stitle;
429 stitle << "Wrong dataSize" ;
430 printError(slocation.str(),stitle.str(),MSG::DEBUG,sdetail.str());
431
432 //skip decode of this fragment
433 index+=dataSize;
434 continue;
435
436 }
437
438 // The subblock type is 0xA,B,C for jet TOBs from FPGA A,B,C
439 // and 0x1,2,3 for global (MET) TOBs.
440 bool isMet = (blockType >= 0x1 && blockType <= 0x3);
441 bool isJet = (blockType >= 0xA && blockType <= 0xC);
442
443 for (uint32_t sliceNumber = 0; sliceNumber < numSlices; sliceNumber++) {
444
445 // Skip out-of-time slices (slice != 0) if multi-slice mode is disabled
446 if (sliceNumber != 0 && !multiSlice) {
448 continue;
449 }
450
451 if ( !isJet && !isMet ) {
452 std::stringstream sdetail;
453 sdetail << "gFexByteStreamTool::decodeGfexTobSlice: Invalid block type " << blockType ;
454 std::stringstream slocation;
455 slocation << "0x"<< std::hex << rob->rob_source_id();
456 std::stringstream stitle;
457 stitle << "Invalid block type" ;
458 printError(slocation.str(),stitle.str(),MSG::DEBUG,sdetail.str());
459 }
460
461 // Select target containers based on slice (slice 0 = L1A -> main containers, others -> out-of-time containers)
462 auto& targetRhoContainer = (sliceNumber == 0) ? gRhoContainer : gRhoSliceContainer;
463 auto& targetSJContainer = (sliceNumber == 0) ? gSJContainer : gSJSliceContainer;
464 auto& targetLJContainer = (sliceNumber == 0) ? gLJContainer : gLJSliceContainer;
465
466 for(unsigned int iWord=0; iWord<gPos::WORDS_PER_SLICE; iWord++) {
467
468 if (isJet) {
469 //Skipping the unused words
470 if (std::find(gPos::JET_UNUSED_POSITION.begin(),gPos::JET_UNUSED_POSITION.end(),iWord)!=gPos::JET_UNUSED_POSITION.end()){
471 continue;
472 }
473 //Skipping the trailer words
474 if (std::find(gPos::TRAILER_POSITION.begin(),gPos::TRAILER_POSITION.end(),iWord)!=gPos::TRAILER_POSITION.end()){
475 continue;
476 }
477 // Decorator for slice number - only needed for out-of-time containers
478 // (L1A containers by definition only contain slice 0)
479 static const SG::AuxElement::Decorator<uint32_t> sliceNumberDec("sliceNumber");
480
481 //Saving gRho TOBs into the EDM container
482 if (iWord == gPos::GRHO_POSITION){
483 std::unique_ptr<xAOD::gFexJetRoI> myEDM (new xAOD::gFexJetRoI());
484 targetRhoContainer->push_back(std::move(myEDM));
485 targetRhoContainer->back()->initialize(dataArray[index+iWord], m_gJ_scale);
486 if (sliceNumber != 0) sliceNumberDec(*targetRhoContainer->back()) = sliceNumber;
487 }
488 //Saving gBlock TOBs into the EDM container
489 if (std::find(gPos::GBLOCK_POSITION.begin(),gPos::GBLOCK_POSITION.end(),iWord)!=gPos::GBLOCK_POSITION.end()){
490 std::unique_ptr<xAOD::gFexJetRoI> myEDM (new xAOD::gFexJetRoI());
491 targetSJContainer->push_back(std::move(myEDM));
492 targetSJContainer->back()->initialize(dataArray[index+iWord], m_gJ_scale);
493 if (sliceNumber != 0) sliceNumberDec(*targetSJContainer->back()) = sliceNumber;
494 }
495 //Saving gJet TOBs into the EDM container
496 if (std::find(gPos::GJET_POSITION.begin(),gPos::GJET_POSITION.end(),iWord)!=gPos::GJET_POSITION.end()){
497 std::unique_ptr<xAOD::gFexJetRoI> myEDM (new xAOD::gFexJetRoI());
498 targetLJContainer->push_back(std::move(myEDM));
499 targetLJContainer->back()->initialize(dataArray[index+iWord], m_gLJ_scale);
500 if (sliceNumber != 0) sliceNumberDec(*targetLJContainer->back()) = sliceNumber;
501 }
502
503 }
504
505 // Global TOBs - decode for all slices, store per-slice data
506 // They require data from all 3 FPGAs to be combined later
507 if (isMet){
508 // Ensure we have storage for this slice
509 ensureSliceCapacity(sliceNumber);
510
511 //Skipping the unused words
513 continue;
514 }
515 //Skipping the trailer words
516 if (std::find(gPos::TRAILER_POSITION.begin(),gPos::TRAILER_POSITION.end(),iWord)!=gPos::TRAILER_POSITION.end()){
517 continue;
518 }
519 //Saving jwoj MHT TOBs into the EDM container
520 if (iWord == gPos::JWOJ_MHT_POSITION){
521 global_counter[sliceNumber]++;
522 if (blockType == 0x1) {JWOJ_MHT[sliceNumber][0] = dataArray[index+iWord];}
523 if (blockType == 0x2) {JWOJ_MHT[sliceNumber][1] = dataArray[index+iWord];}
524 if (blockType == 0x3) {JWOJ_MHT[sliceNumber][2] = dataArray[index+iWord];}
525 }
526 //Saving jwoj MST TOBs into the EDM container
527 if (iWord == gPos::JWOJ_MST_POSITION){
528 if (blockType == 0x1) {JWOJ_MST[sliceNumber][0] = dataArray[index+iWord];}
529 if (blockType == 0x2) {JWOJ_MST[sliceNumber][1] = dataArray[index+iWord];}
530 if (blockType == 0x3) {JWOJ_MST[sliceNumber][2] = dataArray[index+iWord];}
531 }
532 //Saving jwoj MET TOBs into the EDM container
533 if (iWord == gPos::JWOJ_MET_POSITION){
534 if (blockType == 0x1) {JWOJ_MET[sliceNumber][0] = dataArray[index+iWord];}
535 if (blockType == 0x2) {JWOJ_MET[sliceNumber][1] = dataArray[index+iWord];}
536 if (blockType == 0x3) {JWOJ_MET[sliceNumber][2] = dataArray[index+iWord];}
537 }
538 //Saving jwoj Scalar TOBs into the EDM container
539 if (iWord == gPos::JWOJ_SCALAR_POSITION){
540 if (blockType == 0x1) {JWOJ_SCALAR[sliceNumber][0] = dataArray[index+iWord];}
541 if (blockType == 0x2) {JWOJ_SCALAR[sliceNumber][1] = dataArray[index+iWord];}
542 if (blockType == 0x3) {JWOJ_SCALAR[sliceNumber][2] = dataArray[index+iWord];}
543 }
544 //Saving gEspresso TOBs into the EDM container
545 if (iWord == gPos::GESPRESSO_POSITION){
546 if (blockType == 0x1) {GESPRESSO[sliceNumber][0] = dataArray[index+iWord];}
547 if (blockType == 0x2) {GESPRESSO[sliceNumber][1] = dataArray[index+iWord];}
548 if (blockType == 0x3) {GESPRESSO[sliceNumber][2] = dataArray[index+iWord];}
549 }
550 //Saving Noise Cut MET TOBs into the EDM container
551 if (iWord == gPos::NC_MET_POSITION){
552 if (blockType == 0x1) {NC_MET[sliceNumber][0] = dataArray[index+iWord];}
553 if (blockType == 0x2) {NC_MET[sliceNumber][1] = dataArray[index+iWord];}
554 if (blockType == 0x3) {NC_MET[sliceNumber][2] = dataArray[index+iWord];}
555 }
556 //Saving Noise Cut Scalar TOBs into the EDM container
557 if (iWord == gPos::NC_SCALAR_POSITION){
558 if (blockType == 0x1) {NC_SCALAR[sliceNumber][0] = dataArray[index+iWord];}
559 if (blockType == 0x2) {NC_SCALAR[sliceNumber][1] = dataArray[index+iWord];}
560 if (blockType == 0x3) {NC_SCALAR[sliceNumber][2] = dataArray[index+iWord];}
561 }
562 //Saving Rho+RMS MET TOBs into the EDM container
563 if (iWord == gPos::RMS_MET_POSITION){
564 if (blockType == 0x1) {RMS_MET[sliceNumber][0] = dataArray[index+iWord];}
565 if (blockType == 0x2) {RMS_MET[sliceNumber][1] = dataArray[index+iWord];}
566 if (blockType == 0x3) {RMS_MET[sliceNumber][2] = dataArray[index+iWord];}
567 }
568 //Saving Rho+RMS Scalar TOBs into the EDM container
569 if (iWord == gPos::RMS_SCALAR_POSITION){
570 if (blockType == 0x1) {RMS_SCALAR[sliceNumber][0] = dataArray[index+iWord];}
571 if (blockType == 0x2) {RMS_SCALAR[sliceNumber][1] = dataArray[index+iWord];}
572 if (blockType == 0x3) {RMS_SCALAR[sliceNumber][2] = dataArray[index+iWord];}
573 }
574
575 }
576
577 }
578
580 }
581
582 // Fill global TOBs for each slice that has complete data from all 3 FPGAs
583 for (size_t slice = 0; slice < global_counter.size(); slice++) {
584 ATH_MSG_DEBUG("global_counter[" << slice << "] is " << global_counter[slice]);
585 if (global_counter[slice] == 3) {
586 // Skip out-of-time slices if multi-slice mode is disabled
587 if (slice != 0 && !multiSlice) {
588 global_counter[slice] = 0;
589 continue;
590 }
591
592 // Select target containers based on slice (slice 0 = L1A, others = out-of-time)
593 auto& targetMHTContainer = (slice == 0) ? gMHTComponentsJwojContainer : gMHTComponentsJwojSliceContainer;
594 auto& targetMSTContainer = (slice == 0) ? gMSTComponentsJwojContainer : gMSTComponentsJwojSliceContainer;
595 auto& targetMETContainer = (slice == 0) ? gMETComponentsJwojContainer : gMETComponentsJwojSliceContainer;
596 auto& targetScalarContainer = (slice == 0) ? gScalarEJwojContainer : gScalarEJwojSliceContainer;
597 auto& targetEspressoContainer = (slice == 0) ? gEspressoContainer : gEspressoSliceContainer;
598 auto& targetNCMETContainer = (slice == 0) ? gMETComponentsNoiseCutContainer : gMETComponentsNoiseCutSliceContainer;
599 auto& targetNCScalarContainer = (slice == 0) ? gScalarENoiseCutContainer : gScalarENoiseCutSliceContainer;
600 auto& targetRMSMETContainer = (slice == 0) ? gMETComponentsRmsContainer : gMETComponentsRmsSliceContainer;
601 auto& targetRMSScalarContainer = (slice == 0) ? gScalarERmsContainer : gScalarERmsSliceContainer;
602
603 fillGlobal(JWOJ_MHT[slice], 3, targetMHTContainer, slice);
604 fillGlobal(JWOJ_MST[slice], 4, targetMSTContainer, slice);
605 int16_t scalar = fillGlobal(JWOJ_MET[slice], 2, targetMETContainer, slice);
606 fillGlobal(JWOJ_SCALAR[slice], 1, targetScalarContainer, slice, scalar);
607
608 fillGlobal(GESPRESSO[slice], 1, targetEspressoContainer, slice, 0);
609
610 scalar = fillGlobal(NC_MET[slice], 2, targetNCMETContainer, slice);
611 fillGlobal(NC_SCALAR[slice], 1, targetNCScalarContainer, slice, scalar);
612
613 scalar = fillGlobal(RMS_MET[slice], 2, targetRMSMETContainer, slice);
614 fillGlobal(RMS_SCALAR[slice], 1, targetRMSScalarContainer, slice, scalar);
615
616 global_counter[slice] = 0;
617 }
618 }
619
620 }
621 }
622 return StatusCode::SUCCESS;
623}
624
625// For MHT, MST, and MET, it sums the x and y components across FPGAs, and also returnes
626// the sum in quadrature (which is actually only used for MET, and discared for MHT and MST)
627// This function also accepts "scalar" as optional variable, which is used to fill the X
628// component of the SCALAR tob.
629int16_t gFexByteStreamTool::fillGlobal(const std::array<uint32_t, 3> &tob, const int type,
631 uint32_t sliceNumber, int16_t scalar/* = -1*/) const {
632
633 ATH_MSG_DEBUG("fillGlobal with type " << type << " slice " << sliceNumber);
634
635 // 32 bit integers to avoid interim overflows when summing 16b (signed)
636 // quantities from each pFPGA. Proper clamping and bit masking follows afterwards
637 int32_t sum_x = 0;
638 int32_t sum_y = 0;
639
640 // Extract the x and y components and sum them for the three FPGAs
641 for (size_t fpga = 0; fpga < 3; fpga++) {
642 int16_t x = tob[fpga] >> gPos::GLOBAL_X_BIT & gPos::GLOBAL_X_MASK;
643 int16_t y = tob[fpga] >> gPos::GLOBAL_Y_BIT & gPos::GLOBAL_Y_MASK;
644 if (x & 0x00080000) { x = 0xFFFF0000 | x; }
645 if (y & 0x00080000) { y = 0xFFFF0000 | y; }
646 sum_x += x;
647 if (container.key() == "L1_gScalarEJwoj" && y < 0) y = 0;
648 sum_y += y;
649 }
650
651 // Special case for gEspresso: in the readout the gEspresso quantity is stored in x. We need to move it to y to armonize this with the other scalar quantities
652 // This is true for the readout only. On the realtime path gEspresso is sent to Topo on y (see https://docs.google.com/spreadsheets/d/15YVVtGofhXMtV7jXRFzWO0FVUtUAjS-X-aQjh3FKE_w/edit?gid=1546010783#gid=1546010783).
653 if (container.key() == "L1_gEspresso" ) {
654 sum_y = sum_x;
655 }
656
657 if (type == 1) {//we are considering the scalar case (sum_x = MET and sum_y = SumEt)
658 ATH_MSG_DEBUG(" scalar tob, saving " << scalar << " in X component");
659 sum_x = scalar; //Total MET
660 if( sum_y > 0x000FFF) sum_y = 0x000FFF; //Overflow control for SumEt
661 if( sum_y < 0) sum_y = 0;
662
663 } else {
664 if (sum_x < -0x000800) sum_x = -0x000800; //-2048
665 if (sum_x > 0x0007FF) sum_x = 0x0007FF; //2047
666
667 if (sum_y < -0x000800) sum_y = -0x000800; //-2048
668 if (sum_y > 0x0007FF) sum_y = 0x0007FF; //2047
669 }
670
671 ATH_MSG_DEBUG(" fillGlobal type " << type << std::dec << " sum_x " << sum_x << " sum_y " << sum_y);
672
673 uint32_t METword = 0;
674
675 METword = (sum_y & 0x00000FFF) << 0; //set the Quantity2 to the corresponding slot (LSB)
676 METword = METword | (sum_x & 0x00000FFF) << 12;//Quantity 1 (in bit number 12)
677 if (sum_y != 0) METword = METword | 0x00000001 << 24;//Status bit for Quantity 2 (0 if quantity is null)
678 if (sum_x != 0) METword = METword | 0x00000001 << 25;//Status bit for Quantity 1 (0 if quantity is null)
679 METword = METword | (type & 0x0000001F) << 26;//TOB ID (5 bits starting at 26)
680
681 // Save to the EDM
682 std::unique_ptr<xAOD::gFexGlobalRoI> myEDM (new xAOD::gFexGlobalRoI());
683 container->push_back(std::move(myEDM));
684 container->back()->setWord(METword);
685 container->back()->setQuantityOne(sum_x);
686 container->back()->setQuantityTwo(sum_y);
687 container->back()->setScaleOne(m_gXE_scale);
688 container->back()->setScaleTwo(m_gTE_scale);
689 container->back()->setStatusOne(1);
690 container->back()->setStatusTwo(1);
691 container->back()->setSaturated(0);
692 container->back()->setGlobalType(type);
693
694 // Add slice number decoration only for out-of-time TOBs
695 // (L1A containers by definition only contain slice 0)
696 if (sliceNumber != 0) {
697 static const SG::AuxElement::Decorator<uint32_t> sliceNumberDec("sliceNumber");
698 sliceNumberDec(*container->back()) = sliceNumber;
699 }
700
701 int MET2 = sum_x * sum_x + sum_y * sum_y;
702 int16_t MET = std::sqrt(MET2);
703 if (MET > 0x000FFF) MET = 0x000FFF;
704
705 return MET;
706
707}
708
709
711StatusCode gFexByteStreamTool::convertToBS(std::vector<WROBF*>& /*vrobf*/, const EventContext& /*eventContext*/) {
712
713 return StatusCode::SUCCESS;
714
715}
716
717
718void gFexByteStreamTool::printError(const std::string& location, const std::string& title, MSG::Level type, const std::string& detail) const{
719
720 if(m_UseMonitoring){
722 Monitored::Scalar("gfexDecoderErrorLocation",location.empty() ? std::string("UNKNOWN") : location),
723 Monitored::Scalar("gfexDecoderErrorTitle" ,title.empty() ? std::string("UNKNOWN") : title)
724 );
725 }
726 else {
727 msg() << type << detail << endmsg;
728 }
729}
#define endmsg
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_INFO(x)
#define ATH_MSG_DEBUG(x)
OFFLINE_FRAGMENTS_NAMESPACE_WRITE::ROBFragment ROBF
void printError()
Handle class for adding a decoration to an object.
#define y
#define x
Group of local monitoring quantities and retain correlation when filling histograms
Declare a monitored scalar variable.
SG::Decorator< T, ALLOC > Decorator
Definition AuxElement.h:576
virtual bool isValid() override final
Can the handle be successfully dereferenced?
virtual const std::string & key() const override final
Return the StoreGate ID for the referenced object.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
SG::WriteHandleKey< xAOD::gFexGlobalRoIContainer > m_gMETComponentsRmsWriteKey
virtual StatusCode start() override
SG::WriteHandleKey< xAOD::gFexGlobalRoIContainer > m_gMETComponentsNoiseCutWriteKey
SG::ReadHandleKey< xAOD::gFexJetRoIContainer > m_gFexRhoReadKey
SG::ReadHandleKey< xAOD::gFexGlobalRoIContainer > m_gMHTComponentsJwojReadKey
virtual StatusCode initialize() override
SG::WriteHandleKey< xAOD::gFexGlobalRoIContainer > m_gScalarENoiseCutSliceWriteKey
SG::WriteHandleKey< xAOD::gFexGlobalRoIContainer > m_gScalarERmsSliceWriteKey
SG::WriteDecorHandleKey< xAOD::gFexGlobalRoIContainer > m_gMSTComponentsJwojOOTDecorKey
SG::ReadHandleKey< xAOD::gFexGlobalRoIContainer > m_gScalarEJwojReadKey
virtual StatusCode convertFromBS(const std::vector< const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment * > &vrobf, const EventContext &eventContext) const override
BS->xAOD conversion.
SG::WriteDecorHandleKey< xAOD::gFexJetRoIContainer > m_gFexRhoOOTDecorKey
SG::WriteHandleKey< xAOD::gFexJetRoIContainer > m_gFexRhoSliceWriteKey
SG::WriteHandleKey< xAOD::gFexGlobalRoIContainer > m_gEspressoSliceWriteKey
gFexByteStreamTool(const std::string &type, const std::string &name, const IInterface *parent)
SG::ReadHandleKey< TrigConf::L1Menu > m_l1MenuKey
SG::ReadHandleKey< xAOD::gFexGlobalRoIContainer > m_gMETComponentsJwojReadKey
SG::WriteHandleKey< xAOD::gFexGlobalRoIContainer > m_gMSTComponentsJwojSliceWriteKey
SG::ReadHandleKey< xAOD::gFexGlobalRoIContainer > m_gMETComponentsNoiseCutReadKey
SG::WriteDecorHandleKey< xAOD::gFexJetRoIContainer > m_gFexJetOOTDecorKey
SG::WriteHandleKey< xAOD::gFexGlobalRoIContainer > m_gMSTComponentsJwojWriteKey
SG::ReadHandleKey< xAOD::gFexGlobalRoIContainer > m_gScalarERmsReadKey
SG::WriteHandleKey< xAOD::gFexGlobalRoIContainer > m_gScalarEJwojSliceWriteKey
ToolHandle< GenericMonitoringTool > m_monTool
void printError(const std::string &location, const std::string &title, MSG::Level type, const std::string &detail) const
SG::ReadHandleKey< xAOD::gFexJetRoIContainer > m_gFexJetReadKey
SG::WriteDecorHandleKey< xAOD::gFexGlobalRoIContainer > m_gScalarENoiseCutOOTDecorKey
SG::WriteHandleKey< xAOD::gFexGlobalRoIContainer > m_gMHTComponentsJwojWriteKey
SG::WriteHandleKey< xAOD::gFexGlobalRoIContainer > m_gMHTComponentsJwojSliceWriteKey
SG::WriteHandleKey< xAOD::gFexGlobalRoIContainer > m_gMETComponentsNoiseCutSliceWriteKey
SG::WriteHandleKey< xAOD::gFexGlobalRoIContainer > m_gScalarENoiseCutWriteKey
int16_t fillGlobal(const std::array< uint32_t, 3 > &tob, const int type, SG::WriteHandle< xAOD::gFexGlobalRoIContainer > &container, uint32_t sliceNumber, int16_t scalar=-1) const
virtual StatusCode convertToBS(std::vector< OFFLINE_FRAGMENTS_NAMESPACE_WRITE::ROBFragment * > &vrobf, const EventContext &eventContext) override
xAOD->BS conversion
SG::ReadHandleKey< xAOD::gFexGlobalRoIContainer > m_gEspressoReadKey
SG::WriteDecorHandleKey< xAOD::gFexGlobalRoIContainer > m_gMHTComponentsJwojOOTDecorKey
SG::WriteDecorHandleKey< xAOD::gFexGlobalRoIContainer > m_gScalarERmsOOTDecorKey
SG::WriteHandleKey< xAOD::gFexGlobalRoIContainer > m_gMETComponentsJwojWriteKey
SG::ReadHandleKey< xAOD::gFexGlobalRoIContainer > m_gMETComponentsRmsReadKey
SG::ReadHandleKey< xAOD::gFexJetRoIContainer > m_gFexBlockReadKey
SG::WriteHandleKey< xAOD::gFexGlobalRoIContainer > m_gScalarEJwojWriteKey
SG::ReadHandleKey< xAOD::gFexGlobalRoIContainer > m_gMSTComponentsJwojReadKey
SG::WriteDecorHandleKey< xAOD::gFexJetRoIContainer > m_gFexBlockOOTDecorKey
SG::WriteDecorHandleKey< xAOD::gFexGlobalRoIContainer > m_gMETComponentsRmsOOTDecorKey
SG::WriteDecorHandleKey< xAOD::gFexGlobalRoIContainer > m_gEspressoOOTDecorKey
Gaudi::Property< std::vector< uint32_t > > m_robIds
SG::WriteDecorHandleKey< xAOD::gFexGlobalRoIContainer > m_gScalarEJwojOOTDecorKey
SG::WriteHandleKey< xAOD::gFexGlobalRoIContainer > m_gEspressoWriteKey
SG::WriteHandleKey< xAOD::gFexJetRoIContainer > m_gFexJetWriteKey
SG::ReadHandleKey< xAOD::gFexGlobalRoIContainer > m_gScalarENoiseCutReadKey
SG::WriteHandleKey< xAOD::gFexJetRoIContainer > m_gFexBlockWriteKey
SG::WriteHandleKey< xAOD::gFexGlobalRoIContainer > m_gScalarERmsWriteKey
SG::WriteHandleKey< xAOD::gFexJetRoIContainer > m_gFexRhoWriteKey
SG::WriteHandleKey< xAOD::gFexJetRoIContainer > m_gFexJetSliceWriteKey
SG::WriteHandleKey< xAOD::gFexGlobalRoIContainer > m_gMETComponentsJwojSliceWriteKey
SG::WriteDecorHandleKey< xAOD::gFexGlobalRoIContainer > m_gMETComponentsNoiseCutOOTDecorKey
SG::WriteHandleKey< xAOD::gFexGlobalRoIContainer > m_gMETComponentsRmsSliceWriteKey
SG::WriteHandleKey< xAOD::gFexJetRoIContainer > m_gFexBlockSliceWriteKey
SG::WriteDecorHandleKey< xAOD::gFexGlobalRoIContainer > m_gMETComponentsJwojOOTDecorKey
OFFLINE_FRAGMENTS_NAMESPACE_WRITE::ROBFragment WROBF
constexpr unsigned int WORDS_PER_SLICE
Definition gFexPos.h:22
constexpr std::array< unsigned int, 4 > GBLOCK_POSITION
Definition gFexPos.h:31
constexpr unsigned int GLOBAL_Y_MASK
Definition gFexPos.h:48
constexpr unsigned int BLOCK_TYPE_BIT
Definition gFexPos.h:14
constexpr std::array< unsigned int, 2 > GJET_POSITION
Definition gFexPos.h:32
constexpr unsigned int DATA_SIZE_MASK
Definition gFexPos.h:20
constexpr unsigned int JWOJ_MHT_POSITION
Definition gFexPos.h:35
constexpr unsigned int GESPRESSO_POSITION
Definition gFexPos.h:39
constexpr unsigned int RMS_MET_POSITION
Definition gFexPos.h:44
constexpr unsigned int NC_SCALAR_POSITION
Definition gFexPos.h:42
constexpr unsigned int GLOBAL_X_MASK
Definition gFexPos.h:47
constexpr std::array< unsigned int, 4 > GLOBAL_UNUSED_POSITION
Definition gFexPos.h:29
constexpr unsigned int BLOCK_TYPE_MASK
Definition gFexPos.h:15
constexpr unsigned int ERROR_FLAG_BIT
Definition gFexPos.h:18
constexpr std::array< unsigned int, 2 > TRAILER_POSITION
Definition gFexPos.h:27
constexpr unsigned int GLOBAL_Y_BIT
Definition gFexPos.h:50
constexpr unsigned int HEADER_SIZE_MASK
Definition gFexPos.h:17
constexpr unsigned int NC_MET_POSITION
Definition gFexPos.h:41
constexpr unsigned int HEADER_SIZE_BIT
Definition gFexPos.h:16
constexpr unsigned int ERROR_FLAG_MASK
Definition gFexPos.h:19
constexpr std::array< unsigned int, 5 > JET_UNUSED_POSITION
Definition gFexPos.h:28
constexpr unsigned int GRHO_POSITION
Definition gFexPos.h:33
constexpr unsigned int JWOJ_SCALAR_POSITION
Definition gFexPos.h:38
constexpr unsigned int JWOJ_MST_POSITION
Definition gFexPos.h:36
constexpr unsigned int RMS_SCALAR_POSITION
Definition gFexPos.h:45
constexpr unsigned int JWOJ_MET_POSITION
Definition gFexPos.h:37
constexpr unsigned int GLOBAL_X_BIT
Definition gFexPos.h:49
Definition MET.py:1
eformat::write::ROBFragment ROBFragment
Definition RawEvent.h:33
eformat::ROBFragment< PointerType > ROBFragment
Definition RawEvent.h:27
Definition index.py:1
gFexJetRoI_v1 gFexJetRoI
Define the latest version of the gFexJetRoI class.
Definition gFexJetRoI.h:16
gFexGlobalRoI_v1 gFexGlobalRoI
Define the latest version of the eFexEMRoI class.
MsgStream & msg
Definition testRead.cxx:32