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