ATLAS Offline Software
JepRoiByteStreamV1Tool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 
6 #include <numeric>
7 #include <set>
8 #include <utility>
9 
10 #include "GaudiKernel/IInterface.h"
11 #include "GaudiKernel/MsgStream.h"
12 #include "GaudiKernel/StatusCode.h"
13 
15 
18 #include "TrigT1CaloEvent/CMMRoI.h"
19 #include "TrigT1CaloEvent/JEMRoI.h"
21 
22 #include "CmmEnergySubBlock.h"
23 #include "CmmJetSubBlock.h"
24 #include "CmmSubBlock.h"
25 #include "JemRoiSubBlockV1.h"
27 #include "L1CaloSrcIdMap.h"
28 #include "L1CaloSubBlock.h"
29 #include "L1CaloUserHeader.h"
30 
31 #include "JepRoiByteStreamV1Tool.h"
32 
33 namespace LVL1BS {
34 
35 // Interface ID
36 
37 static const InterfaceID IID_IJepRoiByteStreamV1Tool("JepRoiByteStreamV1Tool",
38  1, 1);
39 
41 {
42  return IID_IJepRoiByteStreamV1Tool;
43 }
44 
45 // Constructor
46 
48  const std::string& name,
49  const IInterface* parent)
51  m_errorTool("LVL1BS::L1CaloErrorByteStreamTool/L1CaloErrorByteStreamTool"),
52  m_crates(2), m_modules(16),
53  m_subDetector (eformat::TDAQ_CALO_JET_PROC_ROI)
54 {
55  declareInterface<JepRoiByteStreamV1Tool>(this);
56 
57  declareProperty("ErrorTool", m_errorTool,
58  "Tool to collect errors for monitoring");
59  declareProperty("CrateOffsetHw", m_crateOffsetHw = 12,
60  "Offset of JEP crate numbers in bytestream");
61  declareProperty("CrateOffsetSw", m_crateOffsetSw = 0,
62  "Offset of JEP crate numbers in RDOs");
63 
64  // Properties for reading bytestream only
65  declareProperty("ROBSourceIDs", m_sourceIDsProp,
66  "ROB fragment source identifiers");
67  declareProperty("ROBSourceIDsRoIB", m_sourceIDsRoIBProp,
68  "ROB fragment source identifiers");
69 
70  // Properties for writing bytestream only
71  declareProperty("DataVersion", m_version = 1,
72  "Format version number in sub-block header");
73  declareProperty("DataFormat", m_dataFormat = 1,
74  "Format identifier (0-1) in sub-block header");
75  declareProperty("SlinksPerCrate", m_slinks = 1,
76  "The number of S-Links per crate");
77  declareProperty("CrateMin", m_crateMin = 0,
78  "Minimum crate number, allows partial output");
79  declareProperty("CrateMax", m_crateMax = m_crates - 1,
80  "Maximum crate number, allows partial output");
81 
82 }
83 
84 // Destructor
85 
87 {
88 }
89 
90 // Initialize
91 
92 
94 {
95  ATH_MSG_INFO( "Initializing " << name() );
96 
97  ATH_CHECK( m_errorTool.retrieve() );
98  ATH_CHECK( m_byteStreamCnvSvc.retrieve() );
99 
100  return StatusCode::SUCCESS;
101 }
102 
103 // Finalize
104 
106 {
107  return StatusCode::SUCCESS;
108 }
109 
110 // Conversion bytestream to JEM RoI
111 
113  const IROBDataProviderSvc::VROBFRAG& robFrags,
114  DataVector<LVL1::JEMRoI>* const jeCollection) const
115 {
116  return convertBs(robFrags, jeCollection, nullptr);
117 }
118 
119 // Conversion bytestream to CMM RoI
120 
122  const IROBDataProviderSvc::VROBFRAG& robFrags,
123  LVL1::CMMRoI* const cmCollection) const
124 {
125  return convertBs(robFrags, nullptr, cmCollection);
126 }
127 
128 // Conversion of JEP container to bytestream
129 
131  const LVL1::JEPRoIBSCollectionV1* const jep) const
132 {
133  const bool debug = msgLvl(MSG::DEBUG);
134  if (debug) msg(MSG::DEBUG);
135 
136  // Get the event assembler
137  FullEventAssembler<L1CaloSrcIdMap>* fea = nullptr;
138  ATH_CHECK( m_byteStreamCnvSvc->getFullEventAssembler (fea,
139  "JepRoiByteStreamV1") );
140  const uint16_t minorVersion = m_srcIdMap.minorVersionPreLS1();
141  fea->setRodMinorVersion(minorVersion);
142 
143  // Pointer to ROD data vector
144 
146 
147  // Sub-block for neutral format
148  JemRoiSubBlockV1 subBlock;
149 
150  // Set up the container maps
151 
152  const bool neutralFormat = m_dataFormat == L1CaloSubBlock::NEUTRAL;
153 
154  // JEM RoI map
155  JemRoiMap roiMap;
156  setupJemRoiMap(jep->JemRoi(), roiMap);
157  JemRoiMap::const_iterator mapIter = roiMap.begin();
158  JemRoiMap::const_iterator mapIterEnd = roiMap.end();
159 
160  // CMM hits map
161  CmmHitsMap cmmHitsMap;
162  // CMM energy sums map
163  CmmSumsMap cmmEtMap;
164  if (neutralFormat) {
165  setupCmmHitsMap(jep->CmmHits(), cmmHitsMap);
166  setupCmmEtMap(jep->CmmSums(), cmmEtMap);
167  }
168 
169  // Loop over JEM RoI data
170 
171  const int modulesPerSlink = m_modules / m_slinks;
172  for (int crate = m_crateMin; crate <= m_crateMax; ++crate) {
173  const int hwCrate = crate + m_crateOffsetHw;
174 
175  for (int module = 0; module < m_modules; ++module) {
176 
177  // Pack required number of modules per slink
178 
179  if (module % modulesPerSlink == 0) {
180  const int daqOrRoi = 1;
181  const int slink = module / modulesPerSlink;
182  if (debug) {
183  msg() << "Treating crate " << hwCrate
184  << " slink " << slink << endmsg
185  << "Data Version/Format: " << m_version
186  << " " << m_dataFormat << endmsg;
187  }
188  const uint32_t rodIdJem = m_srcIdMap.getRodID(hwCrate, slink, daqOrRoi,
189  m_subDetector);
190  theROD = fea->getRodData(rodIdJem);
191  if (neutralFormat) {
192  const L1CaloUserHeader userHeader;
193  theROD->push_back(userHeader.header());
194  }
195  }
196  if (debug) msg() << "JEM Module " << module << endmsg;
197  if (!theROD) break; // for coverity, shouldn't happen
198 
199  // Create a sub-block (Neutral format only)
200 
201  if (neutralFormat) {
202  subBlock.clear();
203  subBlock.setRoiHeader(m_version, hwCrate, module);
204  }
205 
206  // Find JEM RoIs for this module
207 
208  for (; mapIter != mapIterEnd; ++mapIter) {
209  const LVL1::JEMRoI* const roi = mapIter->second;
210  if (roi->crate() < crate) continue;
211  if (roi->crate() > crate) break;
212  if (roi->jem() < module) continue;
213  if (roi->jem() > module) break;
214  if (roi->hits() || roi->error()) {
215  if (neutralFormat) subBlock.fillRoi(*roi);
216  else theROD->push_back(roi->roiWord());
217  }
218  }
219 
220  // Pack and write the sub-block
221 
222  if (neutralFormat) {
223  if ( !subBlock.pack()) {
224  msg(MSG::ERROR) << "JEM RoI sub-block packing failed" << endmsg;
225  return StatusCode::FAILURE;
226  }
227  if (debug) {
228  msg() << "JEM RoI sub-block data words: "
229  << subBlock.dataWords() << endmsg;
230  }
231  subBlock.write(theROD);
232  }
233  }
234  if (!theROD) break; // for coverity, shouldn't happen
235 
236  // Append CMM RoIs to last S-Link of the system crate
237 
238  if (crate != m_crates - 1) continue;
239 
240  // Create sub-blocks for Neutral format
241 
242  if (neutralFormat) {
243  const int timeslices = 1;
244  const int slice = 0;
245 
246  // CMM-Energy
247 
248  CmmEnergySubBlock enBlock;
249  const int cmmEnergyVersion = 2; // with Missing-ET-Sig
250  enBlock.setCmmHeader(cmmEnergyVersion, m_dataFormat, slice, hwCrate,
252  CmmSubBlock::LEFT, timeslices);
253  int maxDataID = static_cast<int>(LVL1::CMMEtSums::MAXID);
254  for (int dataID = 0; dataID < maxDataID; ++dataID) {
255  int source = dataID;
256  if (dataID >= m_modules) {
257  switch (dataID) {
260  break;
263  break;
266  break;
270  break;
271  default:
272  continue;
273  }
274  }
275  const LVL1::CMMEtSums* const sums = findCmmSums(crate, dataID, cmmEtMap);
276  if ( sums ) {
277  const unsigned int ex = sums->Ex();
278  const unsigned int ey = sums->Ey();
279  const unsigned int et = sums->Et();
280  const int exErr = sums->ExError();
281  const int eyErr = sums->EyError();
282  const int etErr = sums->EtError();
283  if (dataID == LVL1::CMMEtSums::MISSING_ET_MAP) {
284  enBlock.setMissingEtHits(slice, et);
285  } else if (dataID == LVL1::CMMEtSums::SUM_ET_MAP) {
286  enBlock.setSumEtHits(slice, et);
287  } else if (dataID == LVL1::CMMEtSums::MISSING_ET_SIG_MAP) {
288  enBlock.setMissingEtSigHits(slice, et);
289  } else {
290  enBlock.setSubsums(slice, source, ex, ey, et, exErr, eyErr, etErr);
291  }
292  }
293  }
294  if ( !enBlock.pack()) {
295  msg(MSG::ERROR) << "CMM-Energy sub-block packing failed" << endmsg;
296  return StatusCode::FAILURE;
297  }
298  if (debug) {
299  msg() << "CMM-Energy sub-block data words: "
300  << enBlock.dataWords() << endmsg;
301  }
302  enBlock.write(theROD);
303 
304  // CMM-Jet
305 
306  CmmJetSubBlock jetBlock;
307  jetBlock.setCmmHeader(m_version, m_dataFormat, slice, hwCrate,
309  CmmSubBlock::RIGHT, timeslices);
310  maxDataID = static_cast<int>(LVL1::CMMJetHits::MAXID);
311  for (int dataID = 0; dataID < maxDataID; ++dataID) {
312  int source = dataID;
313  if (dataID >= m_modules) {
314  // coverity[mixed_enums : FALSE]
315  // coverity[switch_on_enum : FALSE]
316  // coverity[first_enum_type : FALSE]
317  switch (dataID) {
320  break;
323  break;
326  break;
329  break;
332  break;
335  break;
337  break;
338  default:
339  continue;
340  }
341  }
342  const LVL1::CMMJetHits* const ch = findCmmHits(crate, dataID, cmmHitsMap);
343  if ( ch ) {
344  const unsigned int hits = ch->Hits();
345  const int errs = ch->Error();
346  if (dataID == LVL1::CMMJetHits::ET_MAP) {
347  jetBlock.setJetEtMap(slice, hits);
348  } else {
349  jetBlock.setJetHits(slice, source, hits, errs);
350  }
351  }
352  }
353  if ( !jetBlock.pack()) {
354  msg(MSG::ERROR) << "CMM-Jet sub-block packing failed" << endmsg;
355  return StatusCode::FAILURE;
356  }
357  if (debug) {
358  msg() << "CMM-Jet sub-block data words: "
359  << jetBlock.dataWords() << endmsg;
360  }
361  jetBlock.write(theROD);
362 
363  } else {
364 
365  // Standard format
366 
367  const LVL1::CMMRoI* const roi = jep->CmmRoi();
368  if ( roi ) {
369  // Make sure word IDs are correct
370  const LVL1::CMMRoI roid(roi->jetEtHits(), roi->sumEtHits(),
371  roi->missingEtHits(), roi->missingEtSigHits(),
372  roi->ex(), roi->ey(), roi->et(),
373  roi->jetEtError(), roi->sumEtError(),
374  roi->missingEtError(), roi->missingEtSigError(),
375  roi->exError(), roi->eyError(), roi->etError());
376  if (roid.jetEtHits() || roid.jetEtError()) {
377  theROD->push_back(roid.jetEtRoiWord());
378  }
379  // CMM-Energy RoIs are not zero-supressed unless all are zero
380  if (roid.sumEtHits() || roid.missingEtHits() ||
381  roid.missingEtSigHits() || roid.ex() || roid.ey() || roid.et() ||
382  roid.sumEtError() || roid.missingEtError() ||
383  roid.missingEtSigError() || roid.exError() || roid.eyError() ||
384  roid.etError()) {
385  theROD->push_back(roid.energyRoiWord0());
386  theROD->push_back(roid.energyRoiWord1());
387  theROD->push_back(roid.energyRoiWord2());
388  }
389  }
390  }
391  }
392 
393  return StatusCode::SUCCESS;
394 }
395 
396 // Return reference to vector with all possible Source Identifiers
397 
398 std::vector<uint32_t> JepRoiByteStreamV1Tool::makeSourceIDs (bool roiDaq) const
399 {
400  std::vector<uint32_t> sourceIDs;
401 
402  if (roiDaq) {
404  }
405  else {
407  }
408 
409  if (sourceIDs.empty()) {
410  const int maxCrates = m_crates + m_crateOffsetHw;
411  const int maxSlinks = m_srcIdMap.maxSlinks();
412  for (int hwCrate = m_crateOffsetHw; hwCrate < maxCrates; ++hwCrate)
413  {
414  for (int slink = 0; slink < maxSlinks; ++slink)
415  {
416  const int daqOrRoi = 1;
417  const uint32_t rodId = m_srcIdMap.getRodID(hwCrate, slink, daqOrRoi,
418  m_subDetector);
419  const uint32_t robId = m_srcIdMap.getRobID(rodId);
420  if (roiDaq)
421  {
422  if (slink < 2) sourceIDs.push_back(robId);
423  }
424  else if (slink >= 2) sourceIDs.push_back(robId);
425  }
426  }
427 
428  }
429  return sourceIDs;
430 }
431 
432 const std::vector<uint32_t>& JepRoiByteStreamV1Tool::sourceIDs(
433  const std::string& sgKey) const
434 {
435  const std::string flag("RoIB");
436  const std::string::size_type pos = sgKey.find(flag);
437  const bool roiDaq =
438  (pos == std::string::npos || pos != sgKey.length() - flag.length());
439 
440  if (roiDaq) {
441  static const std::vector<uint32_t> sourceIDs = makeSourceIDs(roiDaq);
442  return sourceIDs;
443  }
444  else {
445  static const std::vector<uint32_t> sourceIDsRoIB = makeSourceIDs(roiDaq);
446  return sourceIDsRoIB;
447  }
448 }
449 
450 // Convert bytestream to given container type
451 
453  const IROBDataProviderSvc::VROBFRAG& robFrags,
454  DataVector<LVL1::JEMRoI>* jeCollection,
455  LVL1::CMMRoI* cmCollection) const
456 {
457  const bool debug = msgLvl(MSG::DEBUG);
458  if (debug) msg(MSG::DEBUG);
459 
460  // Loop over ROB fragments
461 
462  int robCount = 0;
463  std::set<uint32_t> dupCheck;
464  std::set<uint32_t> dupRoiCheck;
465  ROBIterator rob = robFrags.begin();
466  ROBIterator robEnd = robFrags.end();
467  for (; rob != robEnd; ++rob) {
468 
469  if (debug) {
470  ++robCount;
471  msg() << "Treating ROB fragment " << robCount << endmsg;
472  }
473 
474  // Skip fragments with ROB status errors
475 
476  uint32_t robid = (*rob)->source_id();
477  if ((*rob)->nstatus() > 0) {
478  ROBPointer robData;
479  (*rob)->status(robData);
480  if (*robData != 0) {
481  m_errorTool->robError(robid, *robData);
482  if (debug) msg() << "ROB status error - skipping fragment" << endmsg;
483  continue;
484  }
485  }
486 
487  // Skip duplicate fragments
488 
489  if (!dupCheck.insert(robid).second) {
491  if (debug) msg() << "Skipping duplicate ROB fragment" << endmsg;
492  continue;
493  }
494 
495  // Unpack ROD data (slinks)
496 
497  RODPointer payloadBeg;
499  RODPointer payloadEnd;
500  (*rob)->rod_data(payloadBeg);
501  payloadEnd = payloadBeg + (*rob)->rod_ndata();
502  payload = payloadBeg;
503  if (payload == payloadEnd) {
504  if (debug) msg() << "ROB fragment empty" << endmsg;
505  continue;
506  }
507 
508  // Check identifier
509  const uint32_t sourceID = (*rob)->rod_source_id();
510  if (m_srcIdMap.getRobID(sourceID) != robid ||
511  m_srcIdMap.subDet(sourceID) != m_subDetector ||
512  m_srcIdMap.daqOrRoi(sourceID) != 1 ||
513  (m_srcIdMap.slink(sourceID) != 0 && m_srcIdMap.slink(sourceID) != 2) ||
514  m_srcIdMap.crate(sourceID) < m_crateOffsetHw ||
515  m_srcIdMap.crate(sourceID) >= m_crateOffsetHw + m_crates) {
516  m_errorTool->rodError(robid, L1CaloSubBlock::ERROR_ROD_ID);
517  if (debug) {
518  msg() << "Wrong source identifier in data: "
519  << MSG::hex << sourceID << MSG::dec << endmsg;
520  }
521  continue;
522  }
523 
524  // Check minor version
525  const int minorVersion = (*rob)->rod_version() & 0xffff;
526  if (minorVersion > m_srcIdMap.minorVersionPreLS1()) {
527  if (debug) msg() << "Skipping post-LS1 data" << endmsg;
528  continue;
529  }
530  const int rodCrate = m_srcIdMap.crate(sourceID);
531  if (debug) {
532  msg() << "Treating crate " << rodCrate
533  << " slink " << m_srcIdMap.slink(sourceID) << endmsg;
534  }
535 
536  // First word may be User Header
538  L1CaloUserHeader userHeader(*payload);
539  userHeader.setVersion(minorVersion);
540  const int headerWords = userHeader.words();
541  if (headerWords != 1) {
543  if (debug) msg() << "Unexpected number of user header words: "
544  << headerWords << endmsg;
545  continue;
546  }
547  for (int i = 0; i < headerWords; ++i) ++payload;
548  }
549 
550  // Loop over sub-blocks if there are any
551 
552  unsigned int rodErr = L1CaloSubBlock::ERROR_NONE;
553  while (payload != payloadEnd) {
554 
556  const int slice = 0;
558  // CMMs
560  CmmJetSubBlock subBlock;
561  payload = subBlock.read(payload, payloadEnd);
562  if (cmCollection != nullptr) {
563  if (subBlock.dataWords() && !subBlock.unpack()) {
564  if (debug) {
565  std::string errMsg(subBlock.unpackErrorMsg());
566  msg() << "CMM-Jet sub-block unpacking failed: "
567  << errMsg << endmsg;
568  }
569  rodErr = subBlock.unpackErrorCode();
570  break;
571  }
572  const LVL1::CMMRoI roi(subBlock.jetEtMap(slice),
573  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
574  cmCollection->setRoiWord(roi.jetEtRoiWord());
575  }
576  } else {
577  CmmEnergySubBlock subBlock;
578  payload = subBlock.read(payload, payloadEnd);
579  if (cmCollection != nullptr) {
580  if (subBlock.dataWords() && !subBlock.unpack()) {
581  if (debug) {
582  std::string errMsg(subBlock.unpackErrorMsg());
583  msg() << "CMM-Energy sub-block unpacking failed: "
584  << errMsg << endmsg;
585  }
586  rodErr = subBlock.unpackErrorCode();
587  break;
588  }
589  const LVL1::CMMRoI roi(0, subBlock.sumEtHits(slice),
590  subBlock.missingEtHits(slice),
591  subBlock.missingEtSigHits(slice),
592  subBlock.ex(slice, CmmEnergySubBlock::TOTAL),
593  subBlock.ey(slice, CmmEnergySubBlock::TOTAL),
594  subBlock.et(slice, CmmEnergySubBlock::TOTAL),
595  0, 0, 0, 0,
599  cmCollection->setRoiWord(roi.energyRoiWord0());
600  cmCollection->setRoiWord(roi.energyRoiWord1());
601  cmCollection->setRoiWord(roi.energyRoiWord2());
602  }
603  }
604  } else {
605  // JEM RoI
606  JemRoiSubBlockV1 subBlock;
607  payload = subBlock.read(payload, payloadEnd);
608  if (jeCollection != nullptr) {
609  if (subBlock.dataWords() && !subBlock.unpack()) {
610  if (debug) {
611  std::string errMsg(subBlock.unpackErrorMsg());
612  msg() << "JEM RoI sub-block unpacking failed: "
613  << errMsg << endmsg;
614  }
615  rodErr = subBlock.unpackErrorCode();
616  break;
617  }
618  for (int frame = 0; frame < 8; ++frame) {
619  for (int forward = 0; forward < 2; ++forward) {
620  const LVL1::JEMRoI roi = subBlock.roi(frame, forward);
621  if (roi.hits() || roi.error()) {
622  jeCollection->push_back(new LVL1::JEMRoI(roi));
623  }
624  }
625  }
626  }
627  }
628  } else {
629  // Just RoI word
630  LVL1::JEMRoI jroi;
631  LVL1::CMMRoI croi;
632  if (jroi.setRoiWord(*payload)) {
633  if (jeCollection != nullptr) {
634  if (jroi.crate() != rodCrate - m_crateOffsetHw) {
635  if (debug) msg() << "Inconsistent RoI crate number: "
636  << jroi.crate() << endmsg;
638  break;
639  }
640  const uint32_t location = (*payload) & 0xfffc0000;
641  if (dupRoiCheck.insert(location).second) {
642  if (jroi.hits() || jroi.error()) {
643  jeCollection->push_back(new LVL1::JEMRoI(*payload));
644  }
645  } else {
646  if (debug) msg() << "Duplicate RoI word "
647  << MSG::hex << *payload << MSG::dec << endmsg;
649  break;
650  }
651  }
652  } else if (croi.setRoiWord(*payload)) {
653  if (cmCollection != nullptr) {
654  uint32_t roiType = (*payload) & 0xf0000000;
655  if ((roiType & 0xe0000000) == 0xa0000000) roiType = 0xa0000000;
656  if (dupRoiCheck.insert(roiType).second) {
657  cmCollection->setRoiWord(*payload);
658  } else {
659  if (debug) msg() << "Duplicate RoI word "
660  << MSG::hex << *payload << MSG::dec << endmsg;
662  break;
663  }
664  }
665  } else {
666  if (debug) msg() << "Invalid RoI word "
667  << MSG::hex << *payload << MSG::dec << endmsg;
669  break;
670  }
671  ++payload;
672  }
673  }
674  if (rodErr != L1CaloSubBlock::ERROR_NONE)
675  m_errorTool->rodError(robid, rodErr);
676  }
677 
678  return StatusCode::SUCCESS;
679 }
680 
681 // Find CMM hits for given crate, dataID
682 
684  const int dataID,
685  const CmmHitsMap& cmmHitsMap) const
686 {
687  const LVL1::CMMJetHits* hits = 0;
688  CmmHitsMap::const_iterator mapIter;
689  mapIter = cmmHitsMap.find(crate * 100 + dataID);
690  if (mapIter != cmmHitsMap.end()) hits = mapIter->second;
691  return hits;
692 }
693 
694 // Find CMM energy sums for given crate, module, dataID
695 
697  const int dataID,
698  const CmmSumsMap& cmmEtMap) const
699 {
700  const LVL1::CMMEtSums* sums = 0;
701  CmmSumsMap::const_iterator mapIter;
702  mapIter = cmmEtMap.find(crate * 100 + dataID);
703  if (mapIter != cmmEtMap.end()) sums = mapIter->second;
704  return sums;
705 }
706 
707 // Set up JEM RoIs map
708 
710  const jeCollection,
711  JemRoiMap& roiMap) const
712 {
713  roiMap.clear();
714  if (jeCollection) {
715  JemRoiCollection::const_iterator pos = jeCollection->begin();
716  JemRoiCollection::const_iterator pose = jeCollection->end();
717  for (; pos != pose; ++pos) {
718  const LVL1::JEMRoI* const roi = *pos;
719  const uint32_t key = roi->roiWord();
720  roiMap.insert(std::make_pair(key, roi));
721  }
722  }
723 }
724 
725 // Set up CMM hits map
726 
728  const hitCollection,
729  CmmHitsMap& cmmHitsMap) const
730 {
731  cmmHitsMap.clear();
732  if (hitCollection) {
733  CmmHitsCollection::const_iterator pos = hitCollection->begin();
734  CmmHitsCollection::const_iterator pose = hitCollection->end();
735  for (; pos != pose; ++pos) {
736  const LVL1::CMMJetHits* const hits = *pos;
737  const int crate = hits->crate() - m_crateOffsetSw;
738  const int key = crate * 100 + hits->dataID();
739  cmmHitsMap.insert(std::make_pair(key, hits));
740  }
741  }
742 }
743 
744 // Set up CMM energy sums map
745 
747  const etCollection,
748  CmmSumsMap& cmmEtMap) const
749 {
750  cmmEtMap.clear();
751  if (etCollection) {
752  CmmSumsCollection::const_iterator pos = etCollection->begin();
753  CmmSumsCollection::const_iterator pose = etCollection->end();
754  for (; pos != pose; ++pos) {
755  const LVL1::CMMEtSums* const sums = *pos;
756  const int crate = sums->crate() - m_crateOffsetSw;
757  const int key = crate * 100 + sums->dataID();
758  cmmEtMap.insert(std::make_pair(key, sums));
759  }
760  }
761 }
762 
763 } // end namespace
eformat
Definition: L1CaloBsDecoderUtil.h:11
LVL1BS::JepRoiByteStreamV1Tool::m_slinks
int m_slinks
Property: Number of slinks per crate when writing out bytestream.
Definition: JepRoiByteStreamV1Tool.h:133
LVL1BS::JemRoiSubBlockV1
Sub-Block class for JEM RoI data (neutral format) pre-LS1.
Definition: JemRoiSubBlockV1.h:26
LVL1BS::CmmEnergySubBlock::missingEtSigHits
unsigned int missingEtSigHits(int slice) const
Return Missing-ET-Sig Hits map.
Definition: CmmEnergySubBlock.cxx:187
LVL1BS::CmmEnergySubBlock::setSumEtHits
void setSumEtHits(int slice, unsigned int map)
Store Sum-Et Hits map.
Definition: CmmEnergySubBlock.cxx:263
LVL1BS::CmmSubBlock::cmmType
static CmmFirmwareCode cmmType(uint32_t word)
CMM differentiation (CMM_CP, CMM_JET, or CMM_ENERGY)
Definition: CmmSubBlock.cxx:60
LVL1BS::CmmEnergySubBlock::exError
int exError(int slice, int source) const
Return Ex subsum error for given JEM or source ID.
Definition: CmmEnergySubBlock.cxx:110
LVL1BS::JepRoiByteStreamV1Tool::findCmmHits
const LVL1::CMMJetHits * findCmmHits(int crate, int dataID, const CmmHitsMap &cmmHitsMap) const
Find CMM hits for given crate, data ID.
Definition: JepRoiByteStreamV1Tool.cxx:683
LVL1BS::L1CaloSrcIdMap::minorVersionPreLS1
uint16_t minorVersionPreLS1() const
Return last ROD header minor version for pre-LS1 data.
Definition: L1CaloSrcIdMap.h:64
LVL1::CMMJetHits::LOCAL_FORWARD
@ LOCAL_FORWARD
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMJetHits.h:36
LVL1BS::L1CaloSrcIdMap::slink
int slink(uint32_t code) const
Return slink from unpacked moduleID.
Definition: L1CaloSrcIdMap.cxx:73
et
Extra patterns decribing particle interation process.
LVL1BS::CmmJetSubBlock::TOTAL_MAIN
@ TOTAL_MAIN
Definition: CmmJetSubBlock.h:26
LVL1BS::L1CaloUserHeader
L1Calo User Header class.
Definition: L1CaloUserHeader.h:20
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
sendEI_SPB.ch
ch
Definition: sendEI_SPB.py:35
LVL1::CMMRoI::energyRoiWord2
uint32_t energyRoiWord2() const
Return packed Energy RoI word 2.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:200
LVL1BS::JepRoiByteStreamV1Tool::m_srcIdMap
const L1CaloSrcIdMap m_srcIdMap
Source ID converter.
Definition: JepRoiByteStreamV1Tool.h:145
LVL1BS::CmmSubBlock::RIGHT
@ RIGHT
Definition: CmmSubBlock.h:28
LVL1BS::CmmSubBlock::CMM_JET
@ CMM_JET
Definition: CmmSubBlock.h:25
LVL1BS::CmmEnergySubBlock::et
unsigned int et(int slice, int source) const
Return Et subsum for given JEM or source ID.
Definition: CmmEnergySubBlock.cxx:95
CMMRoI.h
TRTCalib_Extractor.hits
hits
Definition: TRTCalib_Extractor.py:35
LVL1BS::JepRoiByteStreamV1Tool::m_subDetector
const eformat::SubDetector m_subDetector
Sub-detector type.
Definition: JepRoiByteStreamV1Tool.h:143
LVL1::CMMEtSums::SUM_ET_MAP
@ SUM_ET_MAP
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMEtSums.h:37
LVL1BS::L1CaloSubBlock::unpackErrorCode
int unpackErrorCode() const
Return the unpacking error code.
Definition: L1CaloSubBlock.h:343
LVL1BS::JepRoiByteStreamV1Tool::m_crateOffsetHw
int m_crateOffsetHw
Property: Hardware crate number offset.
Definition: JepRoiByteStreamV1Tool.h:121
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
FullEventAssembler
Template class for assembling a full atlas raw event from subfragments.
Definition: FullEventAssembler.h:40
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
LVL1::CMMRoI::exError
int exError() const
Return Ex error flags (bit 0 Overflow, bit 1 Parity)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:170
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
LVL1::CMMRoI::sumEtHits
int sumEtHits() const
Return Sum-ET hits.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:120
LVL1::CMMEtSums
CMMEtSums object stores Et sums from the Energy CMMs.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMEtSums.h:33
LVL1BS::L1CaloSubBlock::ERROR_DUPLICATE_ROB
@ ERROR_DUPLICATE_ROB
Definition: L1CaloSubBlock.h:31
LVL1BS::JepRoiByteStreamV1Tool::m_crateOffsetSw
int m_crateOffsetSw
Property: Software crate number offset.
Definition: JepRoiByteStreamV1Tool.h:123
LVL1BS::JepRoiByteStreamV1Tool::m_crates
const int m_crates
Number of crates.
Definition: JepRoiByteStreamV1Tool.h:129
L1CaloUserHeader.h
LVL1::CMMEtSums::LOCAL
@ LOCAL
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMEtSums.h:36
LVL1BS::JepRoiByteStreamV1Tool::m_crateMin
int m_crateMin
Property: Minimum crate number when writing out bytestream.
Definition: JepRoiByteStreamV1Tool.h:135
LVL1BS::CmmSubBlock::setCmmHeader
void setCmmHeader(int version, int format, int slice, int crate, int summing, int firmware, int position, int timeslices)
Store CMM header.
Definition: CmmSubBlock.cxx:33
LVL1BS::CmmSubBlock::cmmBlock
static bool cmmBlock(uint32_t word)
Determine if header word corresponds to CMM.
Definition: CmmSubBlock.cxx:84
LVL1BS::CmmJetSubBlock::jetEtMap
unsigned int jetEtMap(int slice) const
Return jet ET map.
Definition: CmmJetSubBlock.cxx:88
CMMJetHits.h
LVL1BS::L1CaloUserHeader::header
uint32_t header() const
Return packed header.
Definition: L1CaloUserHeader.h:89
LVL1BS::JepRoiByteStreamV1Tool::m_version
int m_version
Property: Sub_block header version.
Definition: JepRoiByteStreamV1Tool.h:125
LVL1BS::L1CaloSubBlock::write
void write(FullEventAssembler< L1CaloSrcIdMap >::RODDATA *theROD) const
Output complete packed sub-block to ROD vector.
Definition: L1CaloSubBlock.cxx:165
AthCommonMsg< AlgTool >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
LVL1BS::L1CaloSrcIdMap::getRobID
uint32_t getRobID(uint32_t rod_id) const
Make a ROB Source ID from a ROD source ID.
Definition: L1CaloSrcIdMap.cxx:32
LVL1::CMMEtSums::Et
unsigned int Et() const
For triggered time slice.
Definition: CMMEtSums.cxx:90
LVL1BS::JepRoiByteStreamV1Tool::m_dataFormat
int m_dataFormat
Property: Data compression format.
Definition: JepRoiByteStreamV1Tool.h:127
LVL1BS::CmmEnergySubBlock::missingEtHits
unsigned int missingEtHits(int slice) const
Return Missing-ET Hits map.
Definition: CmmEnergySubBlock.cxx:164
LVL1BS::L1CaloSubBlock::read
OFFLINE_FRAGMENTS_NAMESPACE::PointerType read(const OFFLINE_FRAGMENTS_NAMESPACE::PointerType beg, const OFFLINE_FRAGMENTS_NAMESPACE::PointerType end)
Input complete packed sub-block from ROD array.
Definition: L1CaloSubBlock.cxx:118
LVL1BS::L1CaloSubBlock::NEUTRAL
@ NEUTRAL
Definition: L1CaloSubBlock.h:28
CmmJetSubBlock.h
LVL1BS::JepRoiByteStreamV1Tool::~JepRoiByteStreamV1Tool
virtual ~JepRoiByteStreamV1Tool()
Definition: JepRoiByteStreamV1Tool.cxx:86
LVL1BS::JepRoiByteStreamV1Tool::setupJemRoiMap
void setupJemRoiMap(const JemRoiCollection *jeCollection, JemRoiMap &roiMap) const
Set up JEM RoIs map.
Definition: JepRoiByteStreamV1Tool.cxx:709
LVL1BS::JepRoiByteStreamV1Tool::m_errorTool
ToolHandle< LVL1BS::L1CaloErrorByteStreamTool > m_errorTool
Property: Error collection tool.
Definition: JepRoiByteStreamV1Tool.h:99
LVL1::CMMRoI::etError
int etError() const
Return Et error flags (bit 0 Overflow, bit 1 Parity)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:180
LVL1::CMMEtSums::REMOTE
@ REMOTE
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMEtSums.h:36
LVL1BS::JepRoiByteStreamV1Tool::CmmHitsMap
std::map< int, const LVL1::CMMJetHits * > CmmHitsMap
Definition: JepRoiByteStreamV1Tool.h:87
LVL1BS::CmmEnergySubBlock::eyError
int eyError(int slice, int source) const
Return Ey subsum error for given JEM or source ID.
Definition: CmmEnergySubBlock.cxx:128
LVL1::CMMJetHits::TOTAL_MAIN
@ TOTAL_MAIN
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMJetHits.h:35
LVL1BS::CmmEnergySubBlock::TOTAL
@ TOTAL
Definition: CmmEnergySubBlock.h:26
LVL1BS::CmmEnergySubBlock::REMOTE
@ REMOTE
Definition: CmmEnergySubBlock.h:26
LVL1BS::JepRoiByteStreamV1Tool::m_modules
const int m_modules
Number of JEM modules per crate.
Definition: JepRoiByteStreamV1Tool.h:131
LVL1::CMMJetHits::REMOTE_FORWARD
@ REMOTE_FORWARD
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMJetHits.h:36
LVL1BS::L1CaloSubBlock::HEADER
@ HEADER
Definition: L1CaloSubBlock.h:27
LVL1BS::CmmJetSubBlock::LOCAL_FORWARD
@ LOCAL_FORWARD
Definition: CmmJetSubBlock.h:27
LVL1::CMMEtSums::dataID
int dataID() const
returns data ID
Definition: CMMEtSums.cxx:85
LVL1::CMMEtSums::MAXID
@ MAXID
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMEtSums.h:37
LVL1BS::JepRoiByteStreamV1Tool::finalize
virtual StatusCode finalize() override
Definition: JepRoiByteStreamV1Tool.cxx:105
LVL1BS::JepRoiByteStreamV1Tool::m_byteStreamCnvSvc
ServiceHandle< IByteStreamCnvSvc > m_byteStreamCnvSvc
Definition: JepRoiByteStreamV1Tool.h:81
LVL1BS::JepRoiByteStreamV1Tool::m_sourceIDsRoIBProp
std::vector< uint32_t > m_sourceIDsRoIBProp
Property: ROB source IDs for RoIB.
Definition: JepRoiByteStreamV1Tool.h:141
LVL1::CMMRoI::ex
int ex() const
Return Ex.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:135
python.PyAthena.module
module
Definition: PyAthena.py:131
LVL1::CMMRoI::energyRoiWord0
uint32_t energyRoiWord0() const
Return packed Energy RoI word 0.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:190
LVL1BS::JepRoiByteStreamV1Tool::makeSourceIDs
std::vector< uint32_t > makeSourceIDs(bool roiDaq) const
Definition: JepRoiByteStreamV1Tool.cxx:398
LVL1::CMMRoI::jetEtError
int jetEtError() const
Return Jet-ET error flag (bit 1 Parity)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:150
LVL1::CMMEtSums::Ex
unsigned int Ex() const
returns module Ex sum for peak sample
Definition: CMMEtSums.cxx:95
LVL1BS::L1CaloSubBlock::ERROR_ROD_ID
@ ERROR_ROD_ID
Definition: L1CaloSubBlock.h:31
LVL1::CMMEtSums::EyError
int EyError() const
returns module Ey sum error for peak sample
Definition: CMMEtSums.cxx:115
LVL1BS::CmmJetSubBlock::REMOTE_FORWARD
@ REMOTE_FORWARD
Definition: CmmJetSubBlock.h:27
LVL1::CMMRoI::energyRoiWord1
uint32_t energyRoiWord1() const
Return packed Energy RoI word 1.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:195
LVL1BS::L1CaloSubBlock::ERROR_CRATE_NUMBER
@ ERROR_CRATE_NUMBER
Definition: L1CaloSubBlock.h:34
LVL1::JEPRoIBSCollectionV1
Jet/Energy Processor RoI container for writing bytestream pre-LS1.
Definition: JEPRoIBSCollectionV1.h:25
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:93
LVL1BS::CmmJetSubBlock::LOCAL_MAIN
@ LOCAL_MAIN
Definition: CmmJetSubBlock.h:26
LVL1::CMMEtSums::Ey
unsigned int Ey() const
returns module Ey sum for peak sample
Definition: CMMEtSums.cxx:100
perfmonmt-refit.slice
slice
Definition: perfmonmt-refit.py:52
LVL1::JEMRoI::error
int error() const
Return error flags (bit 0 Saturation, bit 1 Parity)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:112
LVL1BS::JepRoiByteStreamV1Tool::JepRoiByteStreamV1Tool
JepRoiByteStreamV1Tool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: JepRoiByteStreamV1Tool.cxx:47
lumiFormat.i
int i
Definition: lumiFormat.py:85
LVL1BS::JepRoiByteStreamV1Tool::initialize
virtual StatusCode initialize() override
Definition: JepRoiByteStreamV1Tool.cxx:93
LVL1::CMMEtSums::EtError
int EtError() const
returns module ET sum error for peak sample
Definition: CMMEtSums.cxx:105
L1CaloSubBlock.h
LVL1::JEMRoI::hits
int hits() const
Return Jet hit map (8 bits Main or 4 bits Forward)
Definition: JEMRoI.cxx:64
LVL1BS::L1CaloSubBlock::ERROR_DUPLICATE_DATA
@ ERROR_DUPLICATE_DATA
Definition: L1CaloSubBlock.h:35
LVL1BS::JepRoiByteStreamV1Tool::m_crateMax
int m_crateMax
Property: Maximum crate number when writing out bytestream.
Definition: JepRoiByteStreamV1Tool.h:137
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
CmmSubBlock.h
LVL1::CMMRoI::sumEtError
int sumEtError() const
Return Sum-ET error flag (bit 1 Parity)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:155
LVL1BS::JepRoiByteStreamV1Tool::JemRoiMap
std::map< uint32_t, const LVL1::JEMRoI * > JemRoiMap
Definition: JepRoiByteStreamV1Tool.h:86
LVL1BS::L1CaloSrcIdMap::crate
int crate(uint32_t code) const
Return crate from unpacked moduleID.
Definition: L1CaloSrcIdMap.cxx:57
LVL1BS::CmmEnergySubBlock::setMissingEtSigHits
void setMissingEtSigHits(int slice, unsigned int map)
Store Missing-ET-Sig Hits map.
Definition: CmmEnergySubBlock.cxx:279
LVL1BS::JepRoiByteStreamV1Tool::ROBPointer
OFFLINE_FRAGMENTS_NAMESPACE::PointerType ROBPointer
Definition: JepRoiByteStreamV1Tool.h:90
LVL1::CMMRoI::jetEtHits
int jetEtHits() const
Return Jet-ET hits.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:115
LVL1::JEPRoIBSCollectionV1::JemRoi
const DataVector< JEMRoI > * JemRoi() const
Return pointer to JEM RoI collection.
Definition: JEPRoIBSCollectionV1.h:55
LVL1::CMMJetHits::MAXID
@ MAXID
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMJetHits.h:37
master.flag
bool flag
Definition: master.py:29
LVL1BS::JepRoiByteStreamV1Tool::setupCmmHitsMap
void setupCmmHitsMap(const CmmHitsCollection *hitCollection, CmmHitsMap &cmmHitsMap) const
Set up CMM hits map.
Definition: JepRoiByteStreamV1Tool.cxx:727
LVL1::CMMJetHits::REMOTE_MAIN
@ REMOTE_MAIN
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMJetHits.h:35
test_pyathena.parent
parent
Definition: test_pyathena.py:15
LVL1::JEPRoIBSCollectionV1::CmmHits
const DataVector< CMMJetHits > * CmmHits() const
Return pointer to CMM hit sums collection.
Definition: JEPRoIBSCollectionV1.h:65
CmmEnergySubBlock.h
LVL1::CMMRoI::ey
int ey() const
Return Ey.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:140
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
LVL1BS::JemRoiSubBlockV1::roi
LVL1::JEMRoI roi(int frame, int forward) const
Return RoI for given frame and forward.
Definition: JemRoiSubBlockV1.cxx:64
LVL1::CMMEtSums::ExError
int ExError() const
returns module Ex sum error for peak sample
Definition: CMMEtSums.cxx:110
LVL1BS::L1CaloUserHeader::setVersion
void setVersion(int minorVersion)
Set version flag.
Definition: L1CaloUserHeader.h:176
LVL1BS::CmmEnergySubBlock::pack
bool pack()
Pack data.
Definition: CmmEnergySubBlock.cxx:295
IROBDataProviderSvc::VROBFRAG
std::vector< const ROBF * > VROBFRAG
Definition: IROBDataProviderSvc.h:27
LVL1BS::L1CaloSubBlock::ERROR_NONE
@ ERROR_NONE
Definition: L1CaloSubBlock.h:31
LVL1BS::CmmEnergySubBlock::sumEtHits
unsigned int sumEtHits(int slice) const
Return Sum-Et Hits map.
Definition: CmmEnergySubBlock.cxx:175
LVL1BS::CmmEnergySubBlock::etError
int etError(int slice, int source) const
Return Et subsum error for given JEM or source ID.
Definition: CmmEnergySubBlock.cxx:146
LVL1::CMMRoI::et
int et() const
Return Et.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:145
LVL1BS::JepRoiByteStreamV1Tool::findCmmSums
const LVL1::CMMEtSums * findCmmSums(int crate, int dataID, const CmmSumsMap &cmmEtMap) const
Find CMM energy sums for given crate, data ID.
Definition: JepRoiByteStreamV1Tool.cxx:696
DataVector< LVL1::JEMRoI >
LVL1BS::L1CaloSubBlock::wordType
static SubBlockWordType wordType(uint32_t word)
Word identification.
Definition: L1CaloSubBlock.cxx:479
FullEventAssembler.h
LVL1BS::JepRoiByteStreamV1Tool::convertBs
StatusCode convertBs(const IROBDataProviderSvc::VROBFRAG &robFrags, DataVector< LVL1::JEMRoI > *jeCollection, LVL1::CMMRoI *cmCollection) const
Convert bytestream to given container type.
Definition: JepRoiByteStreamV1Tool.cxx:452
LVL1::CMMJetHits::ET_MAP
@ ET_MAP
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMJetHits.h:37
LVL1::CMMJetHits::LOCAL_MAIN
@ LOCAL_MAIN
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMJetHits.h:35
LVL1BS::L1CaloSubBlock::unpackErrorMsg
std::string unpackErrorMsg() const
Return the unpacking error message for printing.
Definition: L1CaloSubBlock.cxx:228
LVL1BS::CmmJetSubBlock::TOTAL_FORWARD
@ TOTAL_FORWARD
Definition: CmmJetSubBlock.h:27
LVL1BS::CmmJetSubBlock::unpack
bool unpack()
Unpack data.
Definition: CmmJetSubBlock.cxx:157
LVL1::CMMRoI::missingEtHits
int missingEtHits() const
Return Missing-ET hits.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:125
LVL1BS::JemRoiSubBlockV1::unpack
bool unpack()
Unpack data.
Definition: JemRoiSubBlockV1.cxx:93
LVL1::JEPRoIBSCollectionV1::CmmRoi
const CMMRoI * CmmRoi() const
Return pointer to CMM RoIs.
Definition: JEPRoIBSCollectionV1.h:60
LVL1::JEPRoIBSCollectionV1::CmmSums
const DataVector< CMMEtSums > * CmmSums() const
Return pointer to CMM energy sums collection.
Definition: JEPRoIBSCollectionV1.h:70
LVL1BS::CmmJetSubBlock::setJetHits
void setJetHits(int slice, int source, unsigned int hits, int error)
Store jet hit counts and error for given jem or source ID.
Definition: CmmJetSubBlock.cxx:99
LVL1BS::JemRoiSubBlockV1::fillRoi
void fillRoi(LVL1::JEMRoI roi)
Store RoI.
Definition: JemRoiSubBlockV1.cxx:52
LVL1::JEMRoI::crate
int crate() const
Return crate number (0-1)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:87
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
debug
const bool debug
Definition: MakeUncertaintyPlots.cxx:53
L1CaloErrorByteStreamTool.h
LVL1BS::L1CaloSubBlock::dataWords
int dataWords() const
Return number of data words.
Definition: L1CaloSubBlock.h:233
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
LVL1BS::CmmJetSubBlock::setJetEtMap
void setJetEtMap(int slice, unsigned int map)
Store jet ET map.
Definition: CmmJetSubBlock.cxx:121
JEMRoI.h
LVL1BS::L1CaloUserHeader::words
int words() const
Return number of header words (should be one)
Definition: L1CaloUserHeader.h:94
LVL1BS::JepRoiByteStreamV1Tool::RODPointer
OFFLINE_FRAGMENTS_NAMESPACE::PointerType RODPointer
Definition: JepRoiByteStreamV1Tool.h:91
LVL1::CMMEtSums::crate
int crate() const
Data accessors.
Definition: CMMEtSums.cxx:80
PixelModuleFeMask_create_db.payload
string payload
Definition: PixelModuleFeMask_create_db.py:69
CMMEtSums.h
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
LVL1BS::CmmEnergySubBlock::ex
unsigned int ex(int slice, int source) const
Return Ex subsum for given JEM or source ID.
Definition: CmmEnergySubBlock.cxx:65
JEPRoIBSCollectionV1.h
JepRoiByteStreamV1Tool.h
LVL1::CMMRoI::eyError
int eyError() const
Return Ey error flags (bit 0 Overflow, bit 1 Parity)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:175
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
LVL1BS::L1CaloSrcIdMap::subDet
eformat::SubDetector subDet(uint32_t code) const
Return sub-detector for given ID.
Definition: L1CaloSrcIdMap.cxx:89
LVL1BS::CmmEnergySubBlock::LOCAL
@ LOCAL
Definition: CmmEnergySubBlock.h:26
LVL1BS::CmmSubBlock::SYSTEM
@ SYSTEM
Definition: CmmSubBlock.h:27
LVL1::CMMRoI::jetEtRoiWord
uint32_t jetEtRoiWord() const
Return packed Jet-Et RoI word.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:185
LVL1::CMMJetHits::TOTAL_FORWARD
@ TOTAL_FORWARD
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMJetHits.h:36
LVL1BS::CmmEnergySubBlock::unpack
bool unpack()
Unpack data.
Definition: CmmEnergySubBlock.cxx:317
LVL1BS::CmmJetSubBlock
Sub-Block class for CMM-Jet data.
Definition: CmmJetSubBlock.h:23
LVL1BS::JepRoiByteStreamV1Tool::ROBIterator
IROBDataProviderSvc::VROBFRAG::const_iterator ROBIterator
Definition: JepRoiByteStreamV1Tool.h:89
LVL1::CMMRoI::missingEtSigError
int missingEtSigError() const
Return Missing-ET-Sig error flag (bit 1 Parity)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:165
LVL1BS::CmmEnergySubBlock::setSubsums
void setSubsums(int slice, int source, unsigned int ex, unsigned int ey, unsigned int et, int exError, int eyError, int etError)
Store energy subsums and errors for given JEM or source ID.
Definition: CmmEnergySubBlock.cxx:199
LVL1BS::JemRoiSubBlockV1::pack
bool pack()
Pack data.
Definition: JemRoiSubBlockV1.cxx:74
FullEventAssembler::setRodMinorVersion
void setRodMinorVersion(uint16_t m)
change the ROD minor version
LVL1::CMMEtSums::MISSING_ET_SIG_MAP
@ MISSING_ET_SIG_MAP
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMEtSums.h:37
LVL1BS::CmmSubBlock::CMM_ENERGY
@ CMM_ENERGY
Definition: CmmSubBlock.h:25
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
DEBUG
#define DEBUG
Definition: page_access.h:11
LVL1::JEMRoI::jem
int jem() const
Return JEM number (0-15)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:92
LVL1BS::JepRoiByteStreamV1Tool::setupCmmEtMap
void setupCmmEtMap(const CmmSumsCollection *enCollection, CmmSumsMap &cmmEtMap) const
Set up CMM energy sums map.
Definition: JepRoiByteStreamV1Tool.cxx:746
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
LVL1BS::CmmEnergySubBlock::ey
unsigned int ey(int slice, int source) const
Return Ey subsum for given JEM or source ID.
Definition: CmmEnergySubBlock.cxx:80
LVL1BS
Definition: ZdcModifySlices.h:10
JemRoiSubBlockV1.h
LVL1BS::CmmSubBlock::LEFT
@ LEFT
Definition: CmmSubBlock.h:28
LVL1BS::JepRoiByteStreamV1Tool::m_sourceIDsProp
std::vector< uint32_t > m_sourceIDsProp
Property: ROB source IDs.
Definition: JepRoiByteStreamV1Tool.h:139
LVL1::CMMJetHits
CMMJetHits class stores Jet hit multiplicities received by and read out from the Jet CMMs.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMJetHits.h:32
LVL1::CMMRoI::setRoiWord
bool setRoiWord(uint32_t roiWord)
Set RoI word with ID check.
Definition: CMMRoI.cxx:90
LVL1BS::JepRoiByteStreamV1Tool::convert
StatusCode convert(const IROBDataProviderSvc::VROBFRAG &robFrags, DataVector< LVL1::JEMRoI > *jeCollection) const
Convert ROB fragments to JEM RoIs.
Definition: JepRoiByteStreamV1Tool.cxx:112
LVL1BS::L1CaloSrcIdMap::getRodID
uint32_t getRodID(int crate, int slink, int daqOrRoi, eformat::SubDetector subdet) const
Make a ROD Source ID.
Definition: L1CaloSrcIdMap.cxx:18
LVL1::CMMEtSums::MISSING_ET_MAP
@ MISSING_ET_MAP
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMEtSums.h:37
LVL1::CMMRoI::missingEtError
int missingEtError() const
Return Missing-ET error flag (bit 1 Parity)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:160
LVL1BS::L1CaloSubBlock::ERROR_ROI_TYPE
@ ERROR_ROI_TYPE
Definition: L1CaloSubBlock.h:36
L1CaloSrcIdMap.h
LVL1BS::JepRoiByteStreamV1Tool::sourceIDs
const std::vector< uint32_t > & sourceIDs(const std::string &sgKey) const
Return reference to vector with all possible Source Identifiers.
Definition: JepRoiByteStreamV1Tool.cxx:432
LVL1::JEMRoI
JEM RoI data.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:19
copySelective.source
string source
Definition: copySelective.py:32
FullEventAssembler::RODDATA
std::vector< uint32_t > RODDATA
ROD data as a vector of unsigned int.
Definition: FullEventAssembler.h:54
LVL1BS::CmmEnergySubBlock
Sub-Block class for CMM-Energy data.
Definition: CmmEnergySubBlock.h:23
LVL1BS::CmmJetSubBlock::REMOTE_MAIN
@ REMOTE_MAIN
Definition: CmmJetSubBlock.h:26
LVL1BS::JepRoiByteStreamV1Tool::CmmSumsMap
std::map< int, const LVL1::CMMEtSums * > CmmSumsMap
Definition: JepRoiByteStreamV1Tool.h:88
AthAlgTool
Definition: AthAlgTool.h:26
LVL1BS::JemRoiSubBlockV1::setRoiHeader
void setRoiHeader(int version, int crate, int module)
Store header.
Definition: JemRoiSubBlockV1.cxx:44
LVL1BS::CmmEnergySubBlock::setMissingEtHits
void setMissingEtHits(int slice, unsigned int map)
Store Missing-ET Hits map.
Definition: CmmEnergySubBlock.cxx:247
LVL1::CMMRoI::missingEtSigHits
int missingEtSigHits() const
Return Missing-ET-Sig hits.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:130
LVL1BS::L1CaloSrcIdMap::maxSlinks
int maxSlinks() const
Return the maximum possible number of slinks.
Definition: L1CaloSrcIdMap.cxx:82
LVL1BS::JemRoiSubBlockV1::clear
void clear()
Clear all data.
Definition: JemRoiSubBlockV1.cxx:36
LVL1::CMMEtSums::TOTAL
@ TOTAL
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMEtSums.h:36
LVL1BS::JepRoiByteStreamV1Tool::interfaceID
static const InterfaceID & interfaceID()
AlgTool InterfaceID.
Definition: JepRoiByteStreamV1Tool.cxx:40
LVL1BS::L1CaloUserHeader::isValid
static bool isValid(uint32_t word)
Test for valid header word.
Definition: L1CaloUserHeader.cxx:36
LVL1::JEMRoI::setRoiWord
bool setRoiWord(uint32_t roiWord)
Set RoI word with ID check.
Definition: JEMRoI.cxx:74
LVL1::JEMRoI::roiWord
uint32_t roiWord() const
Return packed RoI word.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:117
LVL1BS::L1CaloSrcIdMap::daqOrRoi
int daqOrRoi(uint32_t code) const
Return daqOrRoi from unpacked moduleID.
Definition: L1CaloSrcIdMap.cxx:65
LVL1BS::L1CaloSubBlock::ERROR_USER_HEADER
@ ERROR_USER_HEADER
Definition: L1CaloSubBlock.h:32
LVL1BS::CmmJetSubBlock::pack
bool pack()
Pack data.
Definition: CmmJetSubBlock.cxx:135
FullEventAssembler::getRodData
RODDATA * getRodData(uint32_t id)
get a block of ROD data
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
LVL1::CMMRoI
CMM RoI data.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:21
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37