ATLAS Offline Software
CpByteStreamTool.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 
23 
24 #include "CmmCpSubBlock.h"
25 #include "CmmSubBlock.h"
26 #include "CpmSubBlock.h"
28 #include "L1CaloSrcIdMap.h"
29 #include "L1CaloSubBlock.h"
30 #include "L1CaloUserHeader.h"
31 #include "ModifySlices.h"
32 
33 #include "CpByteStreamTool.h"
34 
35 namespace LVL1BS {
36 
37 // Interface ID
38 
39 static const InterfaceID IID_ICpByteStreamTool("CpByteStreamTool", 1, 1);
40 
41 const InterfaceID& CpByteStreamTool::interfaceID()
42 {
43  return IID_ICpByteStreamTool;
44 }
45 
46 // Constructor
47 
49  const std::string& name,
50  const IInterface* parent)
52  m_cpmMaps("LVL1::CpmMappingTool/CpmMappingTool"),
53  m_errorTool("LVL1BS::L1CaloErrorByteStreamTool/L1CaloErrorByteStreamTool"),
54  m_channels(80), m_crates(4), m_modules(14),
55  m_subDetector(eformat::TDAQ_CALO_CLUSTER_PROC_DAQ)
56 {
57  declareInterface<CpByteStreamTool>(this);
58 
59  declareProperty("CpmMappingTool", m_cpmMaps,
60  "Crate/Module/Channel to Eta/Phi/Layer mapping tool");
61 
62  declareProperty("CrateOffsetHw", m_crateOffsetHw = 8,
63  "Offset of CP crate numbers in bytestream");
64  declareProperty("CrateOffsetSw", m_crateOffsetSw = 0,
65  "Offset of CP crate numbers in RDOs");
66 
67  // Properties for reading bytestream only
68  declareProperty("ROBSourceIDs", m_sourceIDsProp,
69  "ROB fragment source identifiers");
70 
71  // Properties for writing bytestream only
72  declareProperty("DataVersion", m_version = 1,
73  "Format version number in sub-block header");
74  declareProperty("DataFormat", m_dataFormat = 1,
75  "Format identifier (0-1) in sub-block header");
76  declareProperty("SlinksPerCrate", m_slinks = 2,
77  "The number of S-Links per crate");
78  declareProperty("SimulSlices", m_dfltSlices = 1,
79  "The number of slices in the simulation");
80  declareProperty("ForceSlices", m_forceSlices = 0,
81  "If >0, the number of slices in bytestream");
82 
83 }
84 
85 // Destructor
86 
88 {
89 }
90 
91 // Initialize
92 
93 
95 {
96  ATH_MSG_INFO( "Initializing " << name() );
97 
98  ATH_CHECK( m_cpmMaps.retrieve() );
99  ATH_CHECK( m_errorTool.retrieve() );
100  ATH_CHECK( m_byteStreamCnvSvc.retrieve() );
101 
102  return StatusCode::SUCCESS;
103 }
104 
105 // Conversion bytestream to CPM towers
106 
108  const std::string& sgKey,
109  const IROBDataProviderSvc::VROBFRAG& robFrags,
110  DataVector<LVL1::CPMTower>* const ttCollection) const
111 {
112  CpmTowerData data (ttCollection);
113  return convertBs(sgKey, robFrags, data);
114 }
115 
116 // Conversion bytestream to CPM hits
117 
119  const std::string& sgKey,
120  const IROBDataProviderSvc::VROBFRAG& robFrags,
121  DataVector<LVL1::CPMHits>* const hitCollection) const
122 {
123  CpmHitsData data (hitCollection);
124  return convertBs(sgKey, robFrags, data);
125 }
126 
127 // Conversion bytestream to CMM-CP hits
128 
130  const std::string& sgKey,
131  const IROBDataProviderSvc::VROBFRAG& robFrags,
132  DataVector<LVL1::CMMCPHits>* const hitCollection) const
133 {
134  CmmHitsData data (hitCollection);
135  return convertBs(sgKey, robFrags, data);
136 }
137 
138 // Conversion of CP container to bytestream
139 
141 {
142  const bool debug = msgLvl(MSG::DEBUG);
143  if (debug) msg(MSG::DEBUG);
144 
145  // Get the event assembler
146  FullEventAssembler<L1CaloSrcIdMap>* fea = nullptr;
147  ATH_CHECK( m_byteStreamCnvSvc->getFullEventAssembler (fea,
148  "CpByteStream") );
149  const uint16_t minorVersion = m_srcIdMap.minorVersion();
150  fea->setRodMinorVersion(minorVersion);
151 
152  // Pointer to ROD data vector
153 
155 
156  // Set up the container maps
157 
158  LVL1::TriggerTowerKey towerKey;
159 
160  // CPM tower map
161  ConstCpmTowerMap ttMap;
162  setupCpmTowerMap(cp->towers(), ttMap, towerKey);
163 
164  // CPM hits map
165  ConstCpmHitsMap hitsMap;
166  setupCpmHitsMap(cp->hits(), hitsMap);
167 
168  // CMM-CP hits map
169  ConstCmmCpHitsMap cmmHitsMap;
170  setupCmmCpHitsMap(cp->cmmHits(), cmmHitsMap);
171 
172  // Loop over data
173 
174  const bool neutralFormat = m_dataFormat == L1CaloSubBlock::NEUTRAL;
175  const int modulesPerSlink = m_modules / m_slinks;
176  int timeslices = 1;
177  int trigCpm = 0;
178  int timeslicesNew = 1;
179  int trigCpmNew = 0;
180  for (int crate=0; crate < m_crates; ++crate) {
181  const int hwCrate = crate + m_crateOffsetHw;
182 
183  // CPM modules are numbered 1 to m_modules
184  for (int module=1; module <= m_modules; ++module) {
185  const int mod = module - 1;
186 
187  // Pack required number of modules per slink
188 
189  if (mod%modulesPerSlink == 0) {
190  const int daqOrRoi = 0;
191  const int slink = (m_slinks == 2) ? 2*(mod/modulesPerSlink)
192  : mod/modulesPerSlink;
193  if (debug) {
194  msg() << "Treating crate " << hwCrate
195  << " slink " << slink << endmsg;
196  }
197  // Get number of CPM slices and triggered slice offset
198  // for this slink
199  if ( ! slinkSlices(crate, module, modulesPerSlink,
200  timeslices, trigCpm,
201  ttMap,
202  hitsMap,
203  cmmHitsMap,
204  towerKey))
205  {
206  msg(MSG::ERROR) << "Inconsistent number of slices or "
207  << "triggered slice offsets in data for crate "
208  << hwCrate << " slink " << slink << endmsg;
209  return StatusCode::FAILURE;
210  }
211  timeslicesNew = (m_forceSlices) ? m_forceSlices : timeslices;
212  trigCpmNew = ModifySlices::peak(trigCpm, timeslices, timeslicesNew);
213  if (debug) {
214  msg() << "Data Version/Format: " << m_version
215  << " " << m_dataFormat << endmsg
216  << "Slices/offset: " << timeslices << " " << trigCpm;
217  if (timeslices != timeslicesNew) {
218  msg() << " modified to " << timeslicesNew << " " << trigCpmNew;
219  }
220  msg() << endmsg;
221  }
222  L1CaloUserHeader userHeader;
223  userHeader.setCpm(trigCpmNew);
224  const uint32_t rodIdCpm = m_srcIdMap.getRodID(hwCrate, slink, daqOrRoi,
225  m_subDetector);
226  theROD = fea->getRodData(rodIdCpm);
227  theROD->push_back(userHeader.header());
228  }
229  if (debug) msg() << "Module " << module << endmsg;
230 
231  // Create a sub-block for each slice (except Neutral format)
232 
233  // Vector for current CPM sub-blocks
234  DataVector<CpmSubBlock> cpmBlocks;
235 
236  for (int slice = 0; slice < timeslicesNew; ++slice) {
237  CpmSubBlock* const subBlock = new CpmSubBlock();
239  hwCrate, module, timeslicesNew);
240  cpmBlocks.push_back(subBlock);
241  if (neutralFormat) break;
242  }
243 
244  // Find CPM towers corresponding to each eta/phi pair and fill
245  // sub-blocks
246 
247  for (int chan=0; chan < m_channels; ++chan) {
248  double eta = 0.;
249  double phi = 0.;
250  int layer = 0;
251  if (m_cpmMaps->mapping(crate, module, chan, eta, phi, layer)) {
252  const unsigned int key = towerKey.ttKey(phi, eta);
253  const LVL1::CPMTower* const tt = findCpmTower(key, ttMap);
254  if (tt ) {
255  std::vector<int> emData;
256  std::vector<int> hadData;
257  std::vector<int> emError;
258  std::vector<int> hadError;
259  ModifySlices::data(tt->emEnergyVec(), emData, timeslicesNew);
260  ModifySlices::data(tt->hadEnergyVec(), hadData, timeslicesNew);
261  ModifySlices::data(tt->emErrorVec(), emError, timeslicesNew);
262  ModifySlices::data(tt->hadErrorVec(), hadError, timeslicesNew);
263  for (int slice = 0; slice < timeslicesNew; ++slice) {
264  const LVL1::DataError emErrBits(emError[slice]);
265  const LVL1::DataError hadErrBits(hadError[slice]);
266  const int emErr =
267  (emErrBits.get(LVL1::DataError::LinkDown) << 1) |
268  emErrBits.get(LVL1::DataError::Parity);
269  const int hadErr =
270  (hadErrBits.get(LVL1::DataError::LinkDown) << 1) |
271  hadErrBits.get(LVL1::DataError::Parity);
272  const int index = ( neutralFormat ) ? 0 : slice;
273  CpmSubBlock* const subBlock = cpmBlocks[index];
274  subBlock->fillTowerData(slice, chan, emData[slice],
275  hadData[slice], emErr, hadErr);
276  }
277  }
278  }
279  }
280 
281  // Add CPM hits
282 
283  const LVL1::CPMHits* const hits = findCpmHits(crate, module, hitsMap);
284  if (hits) {
285  std::vector<unsigned int> vec0;
286  std::vector<unsigned int> vec1;
287  ModifySlices::data(hits->HitsVec0(), vec0, timeslicesNew);
288  ModifySlices::data(hits->HitsVec1(), vec1, timeslicesNew);
289  for (int slice = 0; slice < timeslicesNew; ++slice) {
290  const int index = ( neutralFormat ) ? 0 : slice;
291  CpmSubBlock* const subBlock = cpmBlocks[index];
292  subBlock->setHits(slice, vec0[slice], vec1[slice]);
293  }
294  }
295 
296  // Pack and write the sub-blocks
297 
299  for (pos = cpmBlocks.begin(); pos != cpmBlocks.end(); ++pos) {
300  CpmSubBlock* const subBlock = *pos;
301  if ( !subBlock->pack()) {
302  msg(MSG::ERROR) << "CPM sub-block packing failed" << endmsg;
303  return StatusCode::FAILURE;
304  }
305  if (debug) {
306  msg() << "CPM sub-block data words: "
307  << subBlock->dataWords() << endmsg;
308  }
309  subBlock->write(theROD);
310  }
311  }
312 
313  // Append CMMs to last S-Link of the crate
314 
315  // Create a sub-block for each slice (except Neutral format)
316 
318  DataVector<CmmCpSubBlock> cmmHit0Blocks;
320  DataVector<CmmCpSubBlock> cmmHit1Blocks;
321 
322  const int summing = (crate == m_crates - 1) ? CmmSubBlock::SYSTEM
324  for (int slice = 0; slice < timeslicesNew; ++slice) {
325  CmmCpSubBlock* const h0Block = new CmmCpSubBlock();
326  h0Block->setCmmHeader(m_version, m_dataFormat, slice, hwCrate,
327  summing, CmmSubBlock::CMM_CP,
328  CmmSubBlock::RIGHT, timeslicesNew);
329  cmmHit0Blocks.push_back(h0Block);
330  CmmCpSubBlock* const h1Block = new CmmCpSubBlock();
331  h1Block->setCmmHeader(m_version, m_dataFormat, slice, hwCrate,
332  summing, CmmSubBlock::CMM_CP,
333  CmmSubBlock::LEFT, timeslicesNew);
334  cmmHit1Blocks.push_back(h1Block);
335  if (neutralFormat) break;
336  }
337 
338  // CMM-CP
339 
340  const int maxDataID = LVL1::CMMCPHits::MAXID;
341  for (int dataID = 1; dataID < maxDataID; ++dataID) {
342  int source = dataID;
343  if (dataID > m_modules) {
344  if (summing == CmmSubBlock::CRATE &&
345  dataID != LVL1::CMMCPHits::LOCAL) continue;
346  switch (dataID) {
349  break;
352  break;
355  break;
358  break;
361  break;
362  default:
363  continue;
364  }
365  }
366  const LVL1::CMMCPHits* const ch = findCmmCpHits(crate, dataID, cmmHitsMap);
367  if ( ch ) {
368  std::vector<unsigned int> hits0;
369  std::vector<unsigned int> hits1;
370  std::vector<int> err0;
371  std::vector<int> err1;
372  ModifySlices::data(ch->HitsVec0(), hits0, timeslicesNew);
373  ModifySlices::data(ch->HitsVec1(), hits1, timeslicesNew);
374  ModifySlices::data(ch->ErrorVec0(), err0, timeslicesNew);
375  ModifySlices::data(ch->ErrorVec1(), err1, timeslicesNew);
376  for (int slice = 0; slice < timeslicesNew; ++slice) {
377  const LVL1::DataError err0Bits(err0[slice]);
378  const LVL1::DataError err1Bits(err1[slice]);
379  const int index = ( neutralFormat ) ? 0 : slice;
380  CmmCpSubBlock* subBlock = cmmHit0Blocks[index];
381  subBlock->setHits(slice, source, hits0[slice],
382  err0Bits.get(LVL1::DataError::Parity));
383  subBlock = cmmHit1Blocks[index];
384  subBlock->setHits(slice, source, hits1[slice],
385  err1Bits.get(LVL1::DataError::Parity));
386  }
387  }
388  }
390  for (; cos != cmmHit0Blocks.end(); ++cos) {
391  CmmCpSubBlock* const subBlock = *cos;
392  if ( !subBlock->pack()) {
393  msg(MSG::ERROR) << "CMM-Cp sub-block packing failed" << endmsg;
394  return StatusCode::FAILURE;
395  }
396  if (debug) {
397  msg() << "CMM-Cp sub-block data words: "
398  << subBlock->dataWords() << endmsg;
399  }
400  subBlock->write(theROD);
401  }
402  cos = cmmHit1Blocks.begin();
403  for (; cos != cmmHit1Blocks.end(); ++cos) {
404  CmmCpSubBlock* const subBlock = *cos;
405  if ( !subBlock->pack()) {
406  msg(MSG::ERROR) << "CMM-Cp sub-block packing failed" << endmsg;
407  return StatusCode::FAILURE;
408  }
409  if (debug) {
410  msg() << "CMM-Cp sub-block data words: "
411  << subBlock->dataWords() << endmsg;
412  }
413  subBlock->write(theROD);
414  }
415  }
416 
417  return StatusCode::SUCCESS;
418 }
419 
420 // Return reference to vector with all possible Source Identifiers
421 
422 std::vector<uint32_t> CpByteStreamTool::makeSourceIDs() const
423 {
424  std::vector<uint32_t> sourceIDs;
425 
426  if (!m_sourceIDsProp.empty()) {
428  }
429  else {
430  const int maxCrates = m_crates + m_crateOffsetHw;
431  const int maxSlinks = m_srcIdMap.maxSlinks();
432  for (int hwCrate = m_crateOffsetHw; hwCrate < maxCrates; ++hwCrate)
433  {
434  for (int slink = 0; slink < maxSlinks; ++slink)
435  {
436  const int daqOrRoi = 0;
437  const uint32_t rodId = m_srcIdMap.getRodID(hwCrate, slink, daqOrRoi,
438  m_subDetector);
439  const uint32_t robId = m_srcIdMap.getRobID(rodId);
440  sourceIDs.push_back(robId);
441  }
442  }
443  }
444  return sourceIDs;
445 }
446 
447 const std::vector<uint32_t>& CpByteStreamTool::sourceIDs() const
448 {
449  static const std::vector<uint32_t> sourceIDs = makeSourceIDs();
450  return sourceIDs;
451 }
452 
453 // Convert bytestream to given container type
454 
456  const std::string& sgKey,
457  const IROBDataProviderSvc::VROBFRAG& robFrags,
458  CpByteStreamToolData& data) const
459 {
460  LocalData ld;
461 
462  // Check if overlap tower channels wanted
463  const static std::string flag("Overlap");
464  const std::string::size_type pos = sgKey.find(flag);
465  ld.coreOverlap =
466  (pos == std::string::npos || pos != sgKey.length() - flag.length()) ? 0 : 1;
467 
468  const bool debug = msgLvl(MSG::DEBUG);
469  if (debug) msg(MSG::DEBUG);
470 
471  // Loop over ROB fragments
472 
473  CmmCpSubBlock cmmCpSubBlock;
474  CpmSubBlock cpmSubBlock;
475 
476  int robCount = 0;
477  std::set<uint32_t> dupCheck;
478  ROBIterator rob = robFrags.begin();
479  ROBIterator robEnd = robFrags.end();
480  for (; rob != robEnd; ++rob) {
481 
482  if (debug) {
483  ++robCount;
484  msg() << "Treating ROB fragment " << robCount << endmsg;
485  }
486 
487  // Skip fragments with ROB status errors
488 
489  uint32_t robid = (*rob)->source_id();
490  if ((*rob)->nstatus() > 0) {
491  ROBPointer robData;
492  (*rob)->status(robData);
493  if (*robData != 0) {
494  m_errorTool->robError(robid, *robData);
495  if (debug) msg() << "ROB status error - skipping fragment" << endmsg;
496  continue;
497  }
498  }
499 
500  // Skip duplicate fragments
501 
502  if (!dupCheck.insert(robid).second) {
504  if (debug) msg() << "Skipping duplicate ROB fragment" << endmsg;
505  continue;
506  }
507 
508  // Unpack ROD data (slinks)
509 
510  RODPointer payloadBeg;
512  RODPointer payloadEnd;
513  (*rob)->rod_data(payloadBeg);
514  payloadEnd = payloadBeg + (*rob)->rod_ndata();
515  payload = payloadBeg;
516  if (payload == payloadEnd) {
517  if (debug) msg() << "ROB fragment empty" << endmsg;
518  continue;
519  }
520 
521  // Check identifier
522  const uint32_t sourceID = (*rob)->rod_source_id();
523  if (m_srcIdMap.getRobID(sourceID) != robid ||
524  m_srcIdMap.subDet(sourceID) != m_subDetector ||
525  m_srcIdMap.daqOrRoi(sourceID) != 0 ||
526  (m_srcIdMap.slink(sourceID) != 0 && m_srcIdMap.slink(sourceID) != 2) ||
527  m_srcIdMap.crate(sourceID) < m_crateOffsetHw ||
528  m_srcIdMap.crate(sourceID) >= m_crateOffsetHw + m_crates) {
529  m_errorTool->rodError(robid, L1CaloSubBlock::ERROR_ROD_ID);
530  if (debug) {
531  msg() << "Wrong source identifier in data: ROD "
532  << MSG::hex << sourceID << " ROB " << robid
533  << MSG::dec << endmsg;
534  }
535  continue;
536  }
537  const int rodCrate = m_srcIdMap.crate(sourceID);
538  if (debug) {
539  msg() << "Treating crate " << rodCrate
540  << " slink " << m_srcIdMap.slink(sourceID) << endmsg;
541  }
542 
543  // First word should be User Header
546  if (debug) msg() << "Invalid or missing user header" << endmsg;
547  continue;
548  }
549  L1CaloUserHeader userHeader(*payload);
550  const int minorVersion = (*rob)->rod_version() & 0xffff;
551  userHeader.setVersion(minorVersion);
552  const int headerWords = userHeader.words();
553  if (headerWords != 1) {
555  if (debug) msg() << "Unexpected number of user header words: "
556  << headerWords << endmsg;
557  continue;
558  }
559  for (int i = 0; i < headerWords; ++i) ++payload;
560  // triggered slice offsets
561  int trigCpm = userHeader.cpm();
562  int trigCmm = userHeader.cpCmm();
563  if (debug) {
564  msg() << "Minor format version number: " << MSG::hex
565  << minorVersion << MSG::dec << endmsg
566  << "CPM triggered slice offset: " << trigCpm << endmsg
567  << "CMM triggered slice offset: " << trigCmm << endmsg;
568  }
569  if (trigCpm != trigCmm) {
570  const int newTrig = (trigCpm > trigCmm) ? trigCpm : trigCmm;
571  trigCpm = newTrig;
572  trigCmm = newTrig;
573  if (debug) msg() << "Changed both offsets to " << newTrig << endmsg;
574  }
575 
576  // Loop over sub-blocks
577 
579  while (payload != payloadEnd) {
580 
582  if (debug) msg() << "Unexpected data sequence" << endmsg;
584  break;
585  }
587  // CMM
589  cmmCpSubBlock.clear();
590  payload = cmmCpSubBlock.read(payload, payloadEnd);
591  if (cmmCpSubBlock.crate() != rodCrate) {
592  if (debug) msg() << "Inconsistent crate number in ROD source ID"
593  << endmsg;
595  break;
596  }
597  if (data.m_collection == CMM_CP_HITS) {
598  decodeCmmCp(&cmmCpSubBlock, trigCmm, static_cast<CmmHitsData&>(data),
599  ld);
600  if (ld.rodErr != L1CaloSubBlock::ERROR_NONE) {
601  if (debug) msg() << "decodeCmmCp failed" << endmsg;
602  break;
603  }
604  }
605  } else {
606  if (debug) msg() << "Invalid CMM type in module field" << endmsg;
608  break;
609  }
610  } else {
611  // CPM
612  CpmSubBlock subBlock;
613  cpmSubBlock.clear();
614  payload = cpmSubBlock.read(payload, payloadEnd);
615  if (cpmSubBlock.crate() != rodCrate) {
616  if (debug) msg() << "Inconsistent crate number in ROD source ID"
617  << endmsg;
619  break;
620  }
621  if (data.m_collection == CPM_TOWERS || data.m_collection == CPM_HITS) {
622  decodeCpm(&cpmSubBlock, trigCpm, data, ld);
623  if (ld.rodErr != L1CaloSubBlock::ERROR_NONE) {
624  if (debug) msg() << "decodeCpm failed" << endmsg;
625  break;
626  }
627  }
628  }
629  }
630  if (ld.rodErr != L1CaloSubBlock::ERROR_NONE)
631  m_errorTool->rodError(robid, ld.rodErr);
632  }
633 
634  return StatusCode::SUCCESS;
635 }
636 
637 // Unpack CMM-CP sub-block
638 
639 void CpByteStreamTool::decodeCmmCp(CmmCpSubBlock* subBlock, int trigCmm,
640  CmmHitsData& data,
641  LocalData& ld) const
642 {
643  const bool debug = msgLvl(MSG::DEBUG);
644  if (debug) msg(MSG::DEBUG);
645 
646  const int hwCrate = subBlock->crate();
647  const int module = subBlock->cmmPosition();
648  const int firmware = subBlock->cmmFirmware();
649  const int summing = subBlock->cmmSumming();
650  const int timeslices = subBlock->timeslices();
651  const int sliceNum = subBlock->slice();
652  if (debug) {
653  msg() << "CMM-CP: Crate " << hwCrate
654  << " Module " << module
655  << " Firmware " << firmware
656  << " Summing " << summing
657  << " Total slices " << timeslices
658  << " Slice " << sliceNum << endmsg;
659  }
660  if (timeslices <= trigCmm) {
661  if (debug) msg() << "Triggered CMM slice from header "
662  << "inconsistent with number of slices: "
663  << trigCmm << ", " << timeslices << endmsg;
665  return;
666  }
667  if (timeslices <= sliceNum) {
668  if (debug) msg() << "Total slices inconsistent with slice number: "
669  << timeslices << ", " << sliceNum << endmsg;
671  return;
672  }
673  // Unpack sub-block
674  if (subBlock->dataWords() && !subBlock->unpack()) {
675  if (debug) {
676  std::string errMsg(subBlock->unpackErrorMsg());
677  msg() << "CMM-CP sub-block unpacking failed: " << errMsg << endmsg;
678  }
679  ld.rodErr = subBlock->unpackErrorCode();
680  return;
681  }
682 
683  // Retrieve required data
684 
685  const bool neutralFormat = subBlock->format() == L1CaloSubBlock::NEUTRAL;
686  const uint32_t subStatus = subBlock->subStatus();
687  const int crate = hwCrate - m_crateOffsetHw;
688  const int swCrate = crate + m_crateOffsetSw;
689  const int maxSid = CmmCpSubBlock::MAX_SOURCE_ID;
690  const int sliceBeg = ( neutralFormat ) ? 0 : sliceNum;
691  const int sliceEnd = ( neutralFormat ) ? timeslices : sliceNum + 1;
692  for (int slice = sliceBeg; slice < sliceEnd; ++slice) {
693 
694  // Jet hit counts
695 
696  for (int source = 1; source < maxSid; ++source) {
697  int dataID = source;
698  if (source > m_modules) {
699  if (summing == CmmSubBlock::CRATE &&
700  source != CmmCpSubBlock::LOCAL) continue;
701  switch (source) {
703  dataID = LVL1::CMMCPHits::LOCAL;
704  break;
706  dataID = LVL1::CMMCPHits::REMOTE_0;
707  break;
709  dataID = LVL1::CMMCPHits::REMOTE_1;
710  break;
712  dataID = LVL1::CMMCPHits::REMOTE_2;
713  break;
715  dataID = LVL1::CMMCPHits::TOTAL;
716  break;
717  default:
718  continue;
719  }
720  }
721  const unsigned int hits = subBlock->hits(slice, source);
722  int err = subBlock->hitsError(slice, source);
723  LVL1::DataError errorBits;
724  errorBits.set(LVL1::DataError::Parity, err & 0x1);
725  errorBits.set(LVL1::DataError::SubStatusWord, subStatus);
726  err = errorBits.error();
727  if (hits || err) {
728  LVL1::CMMCPHits* ch = findCmmCpHits(data, crate, dataID);
729  if ( ! ch ) { // create new CMM hits
730  ld.hitsVec0.assign(timeslices, 0);
731  ld.hitsVec1.assign(timeslices, 0);
732  ld.errVec0.assign(timeslices, 0);
733  ld.errVec1.assign(timeslices, 0);
734  if (module == CmmSubBlock::RIGHT) {
735  ld.hitsVec0[slice] = hits;
736  ld.errVec0[slice] = err;
737  } else {
738  ld.hitsVec1[slice] = hits;
739  ld.errVec1[slice] = err;
740  }
741  auto chp =
742  std::make_unique<LVL1::CMMCPHits>(swCrate, dataID, ld.hitsVec0, ld.hitsVec1,
743  ld.errVec0, ld.errVec1, trigCmm);
744  const int key = crate*100 + dataID;
745  data.m_cmmHitsMap.insert(std::make_pair(key, chp.get()));
746  data.m_cmmHitCollection->push_back(std::move(chp));
747  } else {
748  ld.hitsVec0 = ch->HitsVec0();
749  ld.hitsVec1 = ch->HitsVec1();
750  ld.errVec0 = ch->ErrorVec0();
751  ld.errVec1 = ch->ErrorVec1();
752  const int nsl = ld.hitsVec0.size();
753  if (timeslices != nsl) {
754  if (debug) msg() << "Inconsistent number of slices in sub-blocks"
755  << endmsg;
757  return;
758  }
759  if ((module == CmmSubBlock::RIGHT && (ld.hitsVec0[slice] != 0 ||
760  ld.errVec0[slice] != 0)) || (module == CmmSubBlock::LEFT &&
761  (ld.hitsVec1[slice] != 0 || ld.errVec1[slice] != 0))) {
762  if (debug) msg() << "Duplicate data for slice " << slice << endmsg;
764  return;
765  }
766  if (module == CmmSubBlock::RIGHT) {
767  ld.hitsVec0[slice] = hits;
768  ld.errVec0[slice] = err;
769  } else {
770  ld.hitsVec1[slice] = hits;
771  ld.errVec1[slice] = err;
772  }
773  ch->addHits(ld.hitsVec0, ld.hitsVec1, ld.errVec0, ld.errVec1);
774  }
775  }
776  }
777  }
778 
779  return;
780 }
781 
782 // Unpack CPM sub-block
783 
785  int trigCpm, CpByteStreamToolData& data,
786  LocalData& ld) const
787 {
788  const bool debug = msgLvl(MSG::DEBUG);
789  const bool verbose = msgLvl(MSG::VERBOSE);
790  if (debug) msg(MSG::DEBUG);
791 
792  const int hwCrate = subBlock->crate();
793  const int module = subBlock->module();
794  const int timeslices = subBlock->timeslices();
795  const int sliceNum = subBlock->slice();
796  if (debug) {
797  msg() << "CPM: Crate " << hwCrate
798  << " Module " << module
799  << " Total slices " << timeslices
800  << " Slice " << sliceNum << endmsg;
801  }
802  if (module < 1 || module > m_modules) {
803  if (debug) msg() << "Unexpected module number: " << module << endmsg;
805  return;
806  }
807  if (timeslices <= trigCpm) {
808  if (debug) msg() << "Triggered CPM slice from header "
809  << "inconsistent with number of slices: "
810  << trigCpm << ", " << timeslices << endmsg;
812  return;
813  }
814  if (timeslices <= sliceNum) {
815  if (debug) msg() << "Total slices inconsistent with slice number: "
816  << timeslices << ", " << sliceNum << endmsg;
818  return;
819  }
820  // Unpack sub-block
821  if (subBlock->dataWords() && !subBlock->unpack()) {
822  if (debug) {
823  std::string errMsg(subBlock->unpackErrorMsg());
824  msg() << "CPM sub-block unpacking failed: " << errMsg << endmsg;
825  }
826  ld.rodErr = subBlock->unpackErrorCode();
827  return;
828  }
829 
830  // Retrieve required data
831 
832  const bool neutralFormat = subBlock->format() == L1CaloSubBlock::NEUTRAL;
833  LVL1::DataError dErr;
834  dErr.set(LVL1::DataError::SubStatusWord, subBlock->subStatus());
835  const int ssError = dErr.error();
836  const int crate = hwCrate - m_crateOffsetHw;
837  const int swCrate = crate + m_crateOffsetSw;
838  const int sliceBeg = ( neutralFormat ) ? 0 : sliceNum;
839  const int sliceEnd = ( neutralFormat ) ? timeslices : sliceNum + 1;
840  for (int slice = sliceBeg; slice < sliceEnd; ++slice) {
841 
842  if (data.m_collection == CPM_TOWERS) {
843  CpmTowerData& tdata = static_cast<CpmTowerData&> (data);
844 
845  // Loop over tower channels and fill CPM towers
846 
847  for (int chan = 0; chan < m_channels; ++chan) {
848  if (!ssError && !subBlock->anyTowerData(chan)) continue;
849  const int em = subBlock->emData(slice, chan);
850  const int had = subBlock->hadData(slice, chan);
851  const int emErr = subBlock->emError(slice, chan);
852  const int hadErr = subBlock->hadError(slice, chan);
853  int emErr1 = ssError;
854  if (emErr) {
855  LVL1::DataError emErrBits(emErr1);
856  emErrBits.set(LVL1::DataError::Parity, emErr & 0x1);
857  emErrBits.set(LVL1::DataError::LinkDown, (emErr >> 1) & 0x1);
858  emErr1 = emErrBits.error();
859  }
860  int hadErr1 = ssError;
861  if (hadErr) {
862  LVL1::DataError hadErrBits(hadErr1);
863  hadErrBits.set(LVL1::DataError::Parity, hadErr & 0x1);
864  hadErrBits.set(LVL1::DataError::LinkDown, (hadErr >> 1) & 0x1);
865  hadErr1 = hadErrBits.error();
866  }
867  if (em || had || emErr1 || hadErr1) {
868  double eta = 0.;
869  double phi = 0.;
870  int layer = 0;
871  if (m_cpmMaps->mapping(crate, module, chan, eta, phi, layer)) {
872  if (layer == ld.coreOverlap) {
873  const unsigned int key = ld.towerKey->ttKey(phi, eta);
874  LVL1::CPMTower* tt = findCpmTower(tdata, key);
875  if ( ! tt ) { // create new CPM tower
876  ld.emVec.assign(timeslices, 0);
877  ld.hadVec.assign(timeslices, 0);
878  ld.emErrVec.assign(timeslices, 0);
879  ld.hadErrVec.assign(timeslices, 0);
880  ld.emVec[slice] = em;
881  ld.hadVec[slice] = had;
882  ld.emErrVec[slice] = emErr1;
883  ld.hadErrVec[slice] = hadErr1;
884  auto ttp =
885  std::make_unique<LVL1::CPMTower>(phi, eta, ld.emVec, ld.emErrVec,
886  ld.hadVec, ld.hadErrVec, trigCpm);
887  tdata.m_ttMap.insert(std::make_pair(key, ttp.get()));
888  tdata.m_ttCollection->push_back(std::move(ttp));
889  } else {
890  ld.emVec = tt->emEnergyVec();
891  ld.hadVec = tt->hadEnergyVec();
892  ld.emErrVec = tt->emErrorVec();
893  ld.hadErrVec = tt->hadErrorVec();
894  const int nsl = ld.emVec.size();
895  if (timeslices != nsl) {
896  if (debug) {
897  msg() << "Inconsistent number of slices in sub-blocks"
898  << endmsg;
899  }
901  return;
902  }
903  if (ld.emVec[slice] != 0 || ld.hadVec[slice] != 0 ||
904  ld.emErrVec[slice] != 0 || ld.hadErrVec[slice] != 0) {
905  if (debug) msg() << "Duplicate data for slice "
906  << slice << endmsg;
908  return;
909  }
910  ld.emVec[slice] = em;
911  ld.hadVec[slice] = had;
912  ld.emErrVec[slice] = emErr1;
913  ld.hadErrVec[slice] = hadErr1;
914  tt->fill(ld.emVec, ld.emErrVec, ld.hadVec, ld.hadErrVec, trigCpm);
915  }
916  }
917  } else if (verbose && (em || had || emErr || hadErr)) {
918  msg(MSG::VERBOSE) << "Non-zero data but no channel mapping for channel "
919  << chan << endmsg;
920  msg(MSG::DEBUG);
921  }
922  } else if (verbose) {
923  msg(MSG::VERBOSE) << "No CPM tower data for channel "
924  << chan << " slice " << slice << endmsg;
925  msg(MSG::DEBUG);
926  }
927  }
928  } else if (data.m_collection == CPM_HITS) {
929  CpmHitsData& hdata = static_cast<CpmHitsData&> (data);
930 
931  // Get CPM hits
932 
933  const unsigned int hits0 = subBlock->hits0(slice);
934  const unsigned int hits1 = subBlock->hits1(slice);
935  if (hits0 || hits1) {
936  LVL1::CPMHits* ch = findCpmHits(hdata, crate, module);
937  if ( ! ch ) { // create new CPM hits
938  ld.hitsVec0.assign(timeslices, 0);
939  ld.hitsVec1.assign(timeslices, 0);
940  ld.hitsVec0[slice] = hits0;
941  ld.hitsVec1[slice] = hits1;
942  auto chp =
943  std::make_unique<LVL1::CPMHits>(swCrate, module, ld.hitsVec0, ld.hitsVec1, trigCpm);
944  hdata.m_hitsMap.insert(std::make_pair(crate*m_modules+module-1, chp.get()));
945  hdata.m_hitCollection->push_back(std::move(chp));
946  } else {
947  ld.hitsVec0 = ch->HitsVec0();
948  ld.hitsVec1 = ch->HitsVec1();
949  const int nsl = ld.hitsVec0.size();
950  if (timeslices != nsl) {
951  if (debug) msg() << "Inconsistent number of slices in sub-blocks"
952  << endmsg;
954  return;
955  }
956  if (ld.hitsVec0[slice] != 0 || ld.hitsVec1[slice] != 0) {
957  if (debug) msg() << "Duplicate data for slice " << slice << endmsg;
959  return;
960  }
961  ld.hitsVec0[slice] = hits0;
962  ld.hitsVec1[slice] = hits1;
963  ch->addHits(ld.hitsVec0, ld.hitsVec1);
964  }
965  } else if (verbose) {
966  msg(MSG::VERBOSE) << "No CPM hits data for crate/module/slice "
967  << hwCrate << "/" << module << "/" << slice
968  << endmsg;
969  msg(MSG::DEBUG);
970  }
971  }
972  }
973  return;
974 }
975 
976 // Find a CPM tower for given key
977 
978 const
980  const ConstCpmTowerMap& ttMap) const
981 {
982  ConstCpmTowerMap::const_iterator mapIter = ttMap.find(key);
983  if (mapIter != ttMap.end()) return mapIter->second;
984  return nullptr;
985 }
986 
988  const unsigned int key) const
989 {
990  CpmTowerMap::const_iterator mapIter = data.m_ttMap.find(key);
991  if (mapIter != data.m_ttMap.end()) return mapIter->second;
992  return nullptr;
993 }
994 
995 // Find CPM hits for given crate, module
996 
997 const
999  const int module,
1000  const ConstCpmHitsMap& hitsMap) const
1001 {
1002  ConstCpmHitsMap::const_iterator mapIter =
1003  hitsMap.find(crate*m_modules + module - 1);
1004  if (mapIter != hitsMap.end()) return mapIter->second;
1005  return nullptr;
1006 }
1007 
1009  const int crate, const int module) const
1010 {
1011  CpmHitsMap::const_iterator mapIter =
1012  data.m_hitsMap.find(crate*m_modules + module - 1);
1013  if (mapIter != data.m_hitsMap.end()) return mapIter->second;
1014  return nullptr;
1015 }
1016 
1017 // Find CMM-CP hits for given crate, dataID
1018 
1019 const
1021  const int dataID,
1022  const ConstCmmCpHitsMap& cmmHitsMap) const
1023 {
1024  ConstCmmCpHitsMap::const_iterator mapIter = cmmHitsMap.find(crate*100 + dataID);
1025  if (mapIter != cmmHitsMap.end()) return mapIter->second;
1026  return nullptr;
1027 }
1028 
1030  const int crate,
1031  const int dataID) const
1032 {
1033  CmmCpHitsMap::const_iterator mapIter = data.m_cmmHitsMap.find(crate*100 + dataID);
1034  if (mapIter != data.m_cmmHitsMap.end()) return mapIter->second;
1035  return nullptr;
1036 }
1037 
1038 // Set up CPM tower map
1039 
1041  const ttCollection,
1042  ConstCpmTowerMap& ttMap,
1043  LVL1::TriggerTowerKey& towerKey) const
1044 {
1045  ttMap.clear();
1046  if (ttCollection) {
1047  CpmTowerCollection::const_iterator pos = ttCollection->begin();
1048  CpmTowerCollection::const_iterator pose = ttCollection->end();
1049  for (; pos != pose; ++pos) {
1050  const LVL1::CPMTower* const tt = *pos;
1051  const unsigned int key = towerKey.ttKey(tt->phi(), tt->eta());
1052  ttMap.insert(std::make_pair(key, tt));
1053  }
1054  }
1055 }
1056 
1057 // Set up CPM hits map
1058 
1060  const hitCollection,
1061  ConstCpmHitsMap& hitsMap) const
1062 {
1063  hitsMap.clear();
1064  if (hitCollection) {
1065  CpmHitsCollection::const_iterator pos = hitCollection->begin();
1066  CpmHitsCollection::const_iterator pose = hitCollection->end();
1067  for (; pos != pose; ++pos) {
1068  const LVL1::CPMHits* const hits = *pos;
1069  const int crate = hits->crate() - m_crateOffsetSw;
1070  const int key = m_modules * crate + hits->module() - 1;
1071  hitsMap.insert(std::make_pair(key, hits));
1072  }
1073  }
1074 }
1075 
1076 // Set up CMM-CP hits map
1077 
1079  const hitCollection,
1080  ConstCmmCpHitsMap& cmmHitsMap) const
1081 {
1082  cmmHitsMap.clear();
1083  if (hitCollection) {
1084  CmmCpHitsCollection::const_iterator pos = hitCollection->begin();
1085  CmmCpHitsCollection::const_iterator pose = hitCollection->end();
1086  for (; pos != pose; ++pos) {
1087  const LVL1::CMMCPHits* const hits = *pos;
1088  const int crate = hits->crate() - m_crateOffsetSw;
1089  const int key = crate*100 + hits->dataID();
1090  cmmHitsMap.insert(std::make_pair(key, hits));
1091  }
1092  }
1093 }
1094 
1095 // Get number of slices and triggered slice offset for next slink
1096 
1097 bool CpByteStreamTool::slinkSlices(const int crate, const int module,
1098  const int modulesPerSlink,
1099  int& timeslices,
1100  int& trigCpm,
1101  const ConstCpmTowerMap& ttMap,
1102  const ConstCpmHitsMap& hitsMap,
1103  const ConstCmmCpHitsMap& cmmHitsMap,
1104  LVL1::TriggerTowerKey& towerKey) const
1105 {
1106  int slices = -1;
1107  int trigC = m_dfltSlices/2;
1108  for (int mod = module; mod < module + modulesPerSlink; ++mod) {
1109  for (int chan = 0; chan < m_channels; ++chan) {
1110  double eta = 0.;
1111  double phi = 0.;
1112  int layer = 0;
1113  if ( !m_cpmMaps->mapping(crate, mod, chan, eta, phi, layer)) continue;
1114  const unsigned int key = towerKey.ttKey(phi, eta);
1115  const LVL1::CPMTower* const tt = findCpmTower(key, ttMap);
1116  if ( !tt ) continue;
1117  const int numdat = 4;
1118  std::vector<int> sums(numdat);
1119  std::vector<int> sizes(numdat);
1120  sums[0] = std::accumulate((tt->emEnergyVec()).begin(),
1121  (tt->emEnergyVec()).end(), 0);
1122  sums[1] = std::accumulate((tt->hadEnergyVec()).begin(),
1123  (tt->hadEnergyVec()).end(), 0);
1124  sums[2] = std::accumulate((tt->emErrorVec()).begin(),
1125  (tt->emErrorVec()).end(), 0);
1126  sums[3] = std::accumulate((tt->hadErrorVec()).begin(),
1127  (tt->hadErrorVec()).end(), 0);
1128  sizes[0] = (tt->emEnergyVec()).size();
1129  sizes[1] = (tt->hadEnergyVec()).size();
1130  sizes[2] = (tt->emErrorVec()).size();
1131  sizes[3] = (tt->hadErrorVec()).size();
1132  const int peak = tt->peak();
1133  for (int i = 0; i < numdat; ++i) {
1134  if (sums[i] == 0) continue;
1135  if (slices < 0) {
1136  slices = sizes[i];
1137  trigC = peak;
1138  } else if (slices != sizes[i] || trigC != peak) return false;
1139  }
1140  }
1141  const LVL1::CPMHits* const hits = findCpmHits(crate, mod, hitsMap);
1142  if (hits) {
1143  const int numdat = 2;
1144  std::vector<unsigned int> sums(numdat);
1145  std::vector<int> sizes(numdat);
1146  sums[0] = std::accumulate((hits->HitsVec0()).begin(),
1147  (hits->HitsVec0()).end(), 0);
1148  sums[1] = std::accumulate((hits->HitsVec1()).begin(),
1149  (hits->HitsVec1()).end(), 0);
1150  sizes[0] = (hits->HitsVec0()).size();
1151  sizes[1] = (hits->HitsVec1()).size();
1152  const int peak = hits->peak();
1153  for (int i = 0; i < numdat; ++i) {
1154  if (sums[i] == 0) continue;
1155  if (slices < 0) {
1156  slices = sizes[i];
1157  trigC = peak;
1158  } else if (slices != sizes[i] || trigC != peak) return false;
1159  }
1160  }
1161  }
1162  // CMM last slink of crate
1163  if (module/modulesPerSlink == m_slinks - 1) {
1164  const int maxDataID = LVL1::CMMCPHits::MAXID;
1165  for (int dataID = 0; dataID < maxDataID; ++dataID) {
1166  const int numdat = 4;
1167  std::vector<unsigned int> sums(numdat);
1168  std::vector<int> sizes(numdat);
1169  const LVL1::CMMCPHits* const hits = findCmmCpHits(crate, dataID, cmmHitsMap);
1170  if (hits) {
1171  sums[0] = std::accumulate((hits->HitsVec0()).begin(),
1172  (hits->HitsVec0()).end(), 0);
1173  sums[1] = std::accumulate((hits->HitsVec1()).begin(),
1174  (hits->HitsVec1()).end(), 0);
1175  sums[2] = std::accumulate((hits->ErrorVec0()).begin(),
1176  (hits->ErrorVec0()).end(), 0);
1177  sums[3] = std::accumulate((hits->ErrorVec1()).begin(),
1178  (hits->ErrorVec1()).end(), 0);
1179  sizes[0] = (hits->HitsVec0()).size();
1180  sizes[1] = (hits->HitsVec1()).size();
1181  sizes[2] = (hits->ErrorVec0()).size();
1182  sizes[3] = (hits->ErrorVec1()).size();
1183  const int peak = hits->peak();
1184  for (int i = 0; i < numdat; ++i) {
1185  if (sums[i] == 0) continue;
1186  if (slices < 0) {
1187  slices = sizes[i];
1188  trigC = peak;
1189  } else if (slices != sizes[i] || trigC != peak) return false;
1190  }
1191  }
1192  }
1193  }
1194  if (slices < 0) slices = m_dfltSlices;
1195  timeslices = slices;
1196  trigCpm = trigC;
1197  return true;
1198 }
1199 
1200 } // end namespace
LVL1BS::CpByteStreamTool::CmmHitsData
Definition: CpByteStreamTool.h:150
CPMHits.h
eformat
Definition: L1CaloBsDecoderUtil.h:11
LVL1BS::CpmSubBlock::hadData
int hadData(int slice, int channel) const
Return Had data for given channel.
Definition: CpmSubBlock.cxx:140
LVL1BS::CmmSubBlock::cmmType
static CmmFirmwareCode cmmType(uint32_t word)
CMM differentiation (CMM_CP, CMM_JET, or CMM_ENERGY)
Definition: CmmSubBlock.cxx:60
LVL1BS::CmmCpSubBlock::REMOTE_2
@ REMOTE_2
Definition: CmmCpSubBlock.h:28
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:216
LVL1BS::CpByteStreamTool::m_crates
const int m_crates
Number of crates.
Definition: CpByteStreamTool.h:220
LVL1BS::CpByteStreamTool::LocalData
Definition: CpByteStreamTool.h:89
LVL1BS::CpByteStreamTool::CpByteStreamToolData
Definition: CpByteStreamTool.h:130
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
LVL1BS::L1CaloSrcIdMap::slink
int slink(uint32_t code) const
Return slink from unpacked moduleID.
Definition: L1CaloSrcIdMap.cxx:73
LVL1::DataError::LinkDown
@ LinkDown
Definition: DataError.h:31
LVL1BS::L1CaloUserHeader
L1Calo User Header class.
Definition: L1CaloUserHeader.h:20
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
LVL1BS::CpmSubBlock::anyTowerData
bool anyTowerData(int channel) const
Return true if there is tower data for given channel.
Definition: CpmSubBlock.h:134
sendEI_SPB.ch
ch
Definition: sendEI_SPB.py:35
LVL1BS::CmmSubBlock::RIGHT
@ RIGHT
Definition: CmmSubBlock.h:28
LVL1BS::L1CaloSubBlock::ERROR_MISSING_HEADER
@ ERROR_MISSING_HEADER
Definition: L1CaloSubBlock.h:33
TRTCalib_Extractor.hits
hits
Definition: TRTCalib_Extractor.py:35
LVL1::DataError
Error data.
Definition: DataError.h:27
LVL1BS::L1CaloSubBlock::unpackErrorCode
int unpackErrorCode() const
Return the unpacking error code.
Definition: L1CaloSubBlock.h:343
LVL1BS::CpByteStreamTool::ConstCpmTowerMap
std::map< unsigned int, const LVL1::CPMTower * > ConstCpmTowerMap
Definition: CpByteStreamTool.h:120
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
LVL1BS::CmmSubBlock::CRATE
@ CRATE
Definition: CmmSubBlock.h:27
LVL1BS::CpByteStreamTool::CpByteStreamTool
CpByteStreamTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: CpByteStreamTool.cxx:48
LVL1::CPBSCollection
Cluster Processor container for writing bytestream.
Definition: CPBSCollection.h:24
LVL1BS::CpByteStreamTool::m_slinks
int m_slinks
Property: Number of slinks per crate when writing out bytestream.
Definition: CpByteStreamTool.h:224
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
LVL1BS::CmmCpSubBlock
Sub-Block class for CMM-CP data.
Definition: CmmCpSubBlock.h:23
LVL1BS::ModifySlices::peak
static int peak(int oldPeak, int oldSlices, int newSlices)
Return new triggered slice offset.
Definition: ModifySlices.cxx:12
index
Definition: index.py:1
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
LVL1BS::CpByteStreamTool::m_dfltSlices
int m_dfltSlices
Property: Default number of slices in simulation.
Definition: CpByteStreamTool.h:226
LVL1BS::CpByteStreamTool::initialize
virtual StatusCode initialize() override
Definition: CpByteStreamTool.cxx:94
LVL1BS::CmmCpSubBlock::hits
unsigned int hits(int slice, int source) const
Return hit counts for given CPM or source ID.
Definition: CmmCpSubBlock.cxx:49
LVL1BS::L1CaloSubBlock::ERROR_DUPLICATE_ROB
@ ERROR_DUPLICATE_ROB
Definition: L1CaloSubBlock.h:31
LVL1BS::CmmCpSubBlock::setHits
void setHits(int slice, int source, unsigned int hits, int error)
Store hit counts for given CPM or source ID.
Definition: CmmCpSubBlock.cxx:76
LVL1BS::CpByteStreamTool::sourceIDs
const std::vector< uint32_t > & sourceIDs() const
Return reference to vector with all possible Source Identifiers.
Definition: CpByteStreamTool.cxx:447
accumulate
bool accumulate(AccumulateMap &map, std::vector< module_t > const &modules, FPGATrackSimMatrixAccumulator const &acc)
Accumulates an accumulator (e.g.
Definition: FPGATrackSimMatrixAccumulator.cxx:22
L1CaloUserHeader.h
LVL1BS::CpmSubBlock::emData
int emData(int slice, int channel) const
Return Em data for given channel.
Definition: CpmSubBlock.cxx:133
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::L1CaloUserHeader::header
uint32_t header() const
Return packed header.
Definition: L1CaloUserHeader.h:89
TriggerTowerKey.h
LVL1BS::L1CaloUserHeader::cpm
int cpm() const
Definition: L1CaloUserHeader.h:116
LVL1BS::CpByteStreamTool::m_subDetector
const eformat::SubDetector m_subDetector
Sub-detector type.
Definition: CpByteStreamTool.h:232
LVL1BS::L1CaloUserHeader::cpCmm
int cpCmm() const
Definition: L1CaloUserHeader.h:105
LVL1BS::L1CaloSubBlock::write
void write(FullEventAssembler< L1CaloSrcIdMap >::RODDATA *theROD) const
Output complete packed sub-block to ROD vector.
Definition: L1CaloSubBlock.cxx:165
LVL1BS::CpByteStreamTool::setupCpmHitsMap
void setupCpmHitsMap(const CpmHitsCollection *hitCollection, ConstCpmHitsMap &hitsMap) const
Set up CPM hits map.
Definition: CpByteStreamTool.cxx:1059
LVL1BS::CmmSubBlock::timeslices
int timeslices() const
Definition: CmmSubBlock.cxx:48
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::CPMHits
The CPMHits object contains the hit data produced by a given Cluster Processor Module,...
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMHits.h:35
LVL1BS::CpByteStreamTool::CpmTowerData
Definition: CpByteStreamTool.h:136
ModifySlices.h
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
LVL1BS::CmmCpSubBlock::REMOTE_0
@ REMOTE_0
Definition: CmmCpSubBlock.h:28
CpmSubBlock.h
CmmCpSubBlock.h
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
LVL1BS::CmmCpSubBlock::hitsError
int hitsError(int slice, int source) const
Return hit error for given CPM or source ID.
Definition: CmmCpSubBlock.cxx:62
LVL1BS::CpByteStreamTool::decodeCpm
void decodeCpm(CpmSubBlock *subBlock, int trigCpm, CpByteStreamToolData &data, LocalData &ld) const
Unpack CPM sub-block.
Definition: CpByteStreamTool.cxx:784
LVL1BS::CpByteStreamTool::m_sourceIDsProp
std::vector< uint32_t > m_sourceIDsProp
Property: ROB source IDs.
Definition: CpByteStreamTool.h:230
LVL1BS::L1CaloSubBlock::slice
int slice() const
Definition: L1CaloSubBlock.h:258
LVL1BS::CpmSubBlock::hits0
unsigned int hits0(int slice) const
Return e/gamma hit counts.
Definition: CpmSubBlock.cxx:161
LVL1BS::CpmSubBlock::hadError
int hadError(int slice, int channel) const
Return Had error for given channel.
Definition: CpmSubBlock.cxx:154
LVL1BS::L1CaloSubBlock::HEADER
@ HEADER
Definition: L1CaloSubBlock.h:27
LVL1BS::L1CaloSubBlock::crate
int crate() const
Definition: L1CaloSubBlock.h:263
LVL1BS::CpmSubBlock::setHits
void setHits(int slice, unsigned int hit0, unsigned int hit1)
Store hit counts.
Definition: CpmSubBlock.cxx:112
LVL1::DataError::SubStatusWord
@ SubStatusWord
Definition: DataError.h:44
LVL1BS::CpByteStreamTool::CpmTowerData::m_ttMap
CpmTowerMap m_ttMap
Definition: CpByteStreamTool.h:140
LVL1::CMMCPHits::REMOTE_0
@ REMOTE_0
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMCPHits.h:33
LVL1BS::CpByteStreamTool::CpmHitsData::m_hitsMap
CpmHitsMap m_hitsMap
Definition: CpByteStreamTool.h:147
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
LVL1BS::CpByteStreamTool::m_channels
const int m_channels
Number of channels per module.
Definition: CpByteStreamTool.h:218
python.PyAthena.module
module
Definition: PyAthena.py:131
LVL1BS::CpmSubBlock::timeslices
int timeslices() const
Return number of timeslices.
Definition: CpmSubBlock.cxx:175
LVL1BS::CmmCpSubBlock::pack
bool pack()
Pack data.
Definition: CmmCpSubBlock.cxx:94
LVL1BS::CpByteStreamTool::convertBs
StatusCode convertBs(const std::string &sgKey, const IROBDataProviderSvc::VROBFRAG &robFrags, CpByteStreamToolData &data) const
Convert bytestream to given container type.
Definition: CpByteStreamTool.cxx:455
LVL1BS::CpByteStreamTool::slinkSlices
bool slinkSlices(int crate, int module, int modulesPerSlink, int &timeslices, int &trigJem, const ConstCpmTowerMap &ttMap, const ConstCpmHitsMap &hitsMap, const ConstCmmCpHitsMap &cmmHitsMap, LVL1::TriggerTowerKey &towerKey) const
Get number of slices and triggered slice offset for next slink.
Definition: CpByteStreamTool.cxx:1097
LVL1BS::CpByteStreamTool::CMM_CP_HITS
@ CMM_CP_HITS
Definition: CpByteStreamTool.h:114
LVL1::CPMTower
The CPMTower class contains the TriggerTower information received by the Cluster Processor Modules.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMTower.h:36
LVL1BS::CpByteStreamTool::m_crateOffsetSw
int m_crateOffsetSw
Property: Software crate number offset.
Definition: CpByteStreamTool.h:212
LVL1BS::CpByteStreamTool::findCmmCpHits
const LVL1::CMMCPHits * findCmmCpHits(int crate, int dataID, const ConstCmmCpHitsMap &cmmHitsMap) const
Find CMM-CP hits for given crate, data ID.
Definition: CpByteStreamTool.cxx:1020
LVL1BS::L1CaloSubBlock::ERROR_ROD_ID
@ ERROR_ROD_ID
Definition: L1CaloSubBlock.h:31
LVL1BS::CmmCpSubBlock::unpack
bool unpack()
Unpack data.
Definition: CmmCpSubBlock.cxx:116
LVL1BS::ModifySlices::data
static void data(const std::vector< int > &oldVec, std::vector< int > &newVec, int newSlices)
Return modified data vector<int>
Definition: ModifySlices.cxx:20
maskDeadModules.mod
mod
Definition: maskDeadModules.py:36
LVL1BS::CpByteStreamTool::CpmTowerData::m_ttCollection
CpmTowerCollection *const m_ttCollection
Definition: CpByteStreamTool.h:139
LVL1BS::L1CaloSubBlock::ERROR_CRATE_NUMBER
@ ERROR_CRATE_NUMBER
Definition: L1CaloSubBlock.h:34
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:93
LVL1BS::CpByteStreamTool::m_cpmMaps
ToolHandle< LVL1::IL1CaloMappingTool > m_cpmMaps
Property: Channel mapping tool.
Definition: CpByteStreamTool.h:205
dqt_zlumi_pandas.err
err
Definition: dqt_zlumi_pandas.py:182
perfmonmt-refit.slice
slice
Definition: perfmonmt-refit.py:52
DataModel_detail::iterator
(Non-const) Iterator class for DataVector/DataList.
Definition: DVLIterator.h:184
lumiFormat.i
int i
Definition: lumiFormat.py:85
LVL1BS::CpmSubBlock::pack
bool pack()
Pack data.
Definition: CpmSubBlock.cxx:187
ReadCellNoiseFromCool.chan
chan
Definition: ReadCellNoiseFromCool.py:52
L1CaloSubBlock.h
LVL1BS::L1CaloSubBlock::ERROR_DUPLICATE_DATA
@ ERROR_DUPLICATE_DATA
Definition: L1CaloSubBlock.h:35
LVL1BS::CmmSubBlock::cmmFirmware
int cmmFirmware() const
Definition: CmmSubBlock.h:68
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
LVL1::CMMCPHits::MAXID
@ MAXID
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMCPHits.h:33
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
CmmSubBlock.h
LVL1::CMMCPHits
Summary of CP (EM/tau) hits received by the merger modules.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMCPHits.h:30
LVL1::DataError::set
void set(ErrorBit bit, int value=1)
Set an error bit or data.
Definition: DataError.cxx:28
LVL1BS::CpByteStreamTool::CPM_TOWERS
@ CPM_TOWERS
Definition: CpByteStreamTool.h:114
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
LVL1::CMMCPHits::LOCAL
@ LOCAL
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMCPHits.h:33
LVL1BS::L1CaloSrcIdMap::crate
int crate(uint32_t code) const
Return crate from unpacked moduleID.
Definition: L1CaloSrcIdMap.cxx:57
LVL1BS::CpmSubBlock
Sub-Block class for CPM data.
Definition: CpmSubBlock.h:23
LVL1BS::CpmSubBlock::clear
void clear()
Clear all data.
Definition: CpmSubBlock.cxx:55
master.flag
bool flag
Definition: master.py:29
LVL1BS::CmmCpSubBlock::TOTAL
@ TOTAL
Definition: CmmCpSubBlock.h:29
LVL1BS::L1CaloSubBlock::format
int format() const
Definition: L1CaloSubBlock.h:248
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
LVL1BS::L1CaloUserHeader::setVersion
void setVersion(int minorVersion)
Set version flag.
Definition: L1CaloUserHeader.h:176
LVL1BS::CmmCpSubBlock::LOCAL
@ LOCAL
Definition: CmmCpSubBlock.h:29
LVL1BS::CpByteStreamTool::convert
StatusCode convert(const std::string &sgKey, const IROBDataProviderSvc::VROBFRAG &robFrags, DataVector< LVL1::CPMTower > *ttCollection) const
Convert ROB fragments to CPM towers.
Definition: CpByteStreamTool.cxx:107
IROBDataProviderSvc::VROBFRAG
std::vector< const ROBF * > VROBFRAG
Definition: IROBDataProviderSvc.h:27
LVL1BS::CpByteStreamTool::setupCpmTowerMap
void setupCpmTowerMap(const CpmTowerCollection *ttCollection, ConstCpmTowerMap &ttMap, LVL1::TriggerTowerKey &towerKey) const
Set up CPM tower map.
Definition: CpByteStreamTool.cxx:1040
LVL1BS::L1CaloSubBlock::ERROR_NONE
@ ERROR_NONE
Definition: L1CaloSubBlock.h:31
LVL1BS::CpByteStreamTool::m_dataFormat
int m_dataFormat
Property: Data compression format.
Definition: CpByteStreamTool.h:216
LVL1::DataError::Parity
@ Parity
Definition: DataError.h:31
DataVector< LVL1::CPMTower >
LVL1BS::CpByteStreamTool::RODPointer
OFFLINE_FRAGMENTS_NAMESPACE::PointerType RODPointer
Definition: CpByteStreamTool.h:127
LVL1BS::L1CaloSubBlock::wordType
static SubBlockWordType wordType(uint32_t word)
Word identification.
Definition: L1CaloSubBlock.cxx:479
FullEventAssembler.h
DataError.h
LVL1::CMMCPHits::TOTAL
@ TOTAL
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMCPHits.h:33
LVL1::DataError::error
int error() const
Return the full error word.
Definition: DataError.h:78
LVL1BS::L1CaloSubBlock::unpackErrorMsg
std::string unpackErrorMsg() const
Return the unpacking error message for printing.
Definition: L1CaloSubBlock.cxx:228
CMMCPHits.h
LVL1BS::CpByteStreamTool::m_srcIdMap
const L1CaloSrcIdMap m_srcIdMap
Source ID converter.
Definition: CpByteStreamTool.h:234
LVL1BS::CpmSubBlock::hits1
unsigned int hits1(int slice) const
Return tau hit counts.
Definition: CpmSubBlock.cxx:168
LVL1BS::CpByteStreamTool::m_byteStreamCnvSvc
ServiceHandle< IByteStreamCnvSvc > m_byteStreamCnvSvc
Definition: CpByteStreamTool.h:86
LVL1BS::CpByteStreamTool::CpmHitsData::m_hitCollection
CpmHitsCollection *const m_hitCollection
Definition: CpByteStreamTool.h:146
LVL1BS::L1CaloSrcIdMap::minorVersion
uint16_t minorVersion() const
Return ROD header minor version to use when writing BS.
Definition: L1CaloSrcIdMap.h:61
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
debug
const bool debug
Definition: MakeUncertaintyPlots.cxx:53
CPMTower.h
LVL1BS::CpByteStreamTool::makeSourceIDs
std::vector< uint32_t > makeSourceIDs() const
Create list of all source IDs.
Definition: CpByteStreamTool.cxx:422
L1CaloErrorByteStreamTool.h
LVL1BS::L1CaloSubBlock::dataWords
int dataWords() const
Return number of data words.
Definition: L1CaloSubBlock.h:233
LVL1BS::L1CaloSubBlock::subStatus
uint32_t subStatus() const
Return Sub-status word.
Definition: L1CaloSubBlock.h:323
IL1CaloMappingTool.h
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
LVL1BS::CpByteStreamTool::ConstCmmCpHitsMap
std::map< int, const LVL1::CMMCPHits * > ConstCmmCpHitsMap
Definition: CpByteStreamTool.h:124
LVL1BS::L1CaloUserHeader::setCpm
void setCpm(int offset)
Definition: L1CaloUserHeader.h:154
CPBSCollection.h
LVL1BS::L1CaloUserHeader::words
int words() const
Return number of header words (should be one)
Definition: L1CaloUserHeader.h:94
LArNewCalib_PedestalAutoCorr.cp
cp
Definition: LArNewCalib_PedestalAutoCorr.py:188
LVL1BS::CmmCpSubBlock::MAX_SOURCE_ID
@ MAX_SOURCE_ID
Definition: CmmCpSubBlock.h:29
PixelModuleFeMask_create_db.payload
string payload
Definition: PixelModuleFeMask_create_db.py:69
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
LVL1BS::CmmCpSubBlock::clear
void clear()
Clear all data.
Definition: CmmCpSubBlock.cxx:41
LVL1BS::L1CaloSubBlock::module
int module() const
Definition: L1CaloSubBlock.h:268
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::CmmSubBlock::cmmPosition
int cmmPosition() const
Definition: CmmSubBlock.h:73
LVL1BS::CpByteStreamTool::m_crateOffsetHw
int m_crateOffsetHw
Property: Hardware crate number offset.
Definition: CpByteStreamTool.h:210
LVL1BS::CpByteStreamTool::decodeCmmCp
void decodeCmmCp(CmmCpSubBlock *subBlock, int trigCmm, CmmHitsData &data, LocalData &ld) const
Unpack CMM-CP sub-block.
Definition: CpByteStreamTool.cxx:639
LVL1BS::CmmSubBlock::SYSTEM
@ SYSTEM
Definition: CmmSubBlock.h:27
LVL1BS::CpByteStreamTool::m_modules
const int m_modules
Number of CPM modules per crate.
Definition: CpByteStreamTool.h:222
DeMoScan.index
string index
Definition: DeMoScan.py:364
CpByteStreamTool.h
LVL1BS::CpByteStreamTool::ROBPointer
OFFLINE_FRAGMENTS_NAMESPACE::PointerType ROBPointer
Definition: CpByteStreamTool.h:126
FullEventAssembler::setRodMinorVersion
void setRodMinorVersion(uint16_t m)
change the ROD minor version
LVL1BS::CpByteStreamTool::ConstCpmHitsMap
std::map< int, const LVL1::CPMHits * > ConstCpmHitsMap
Definition: CpByteStreamTool.h:122
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
LVL1::CMMCPHits::REMOTE_2
@ REMOTE_2
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMCPHits.h:33
LVL1BS::L1CaloSubBlock::ERROR_SLICES
@ ERROR_SLICES
Definition: L1CaloSubBlock.h:35
python.TriggerHandler.verbose
verbose
Definition: TriggerHandler.py:297
DEBUG
#define DEBUG
Definition: page_access.h:11
LVL1BS::CpByteStreamTool::CPM_HITS
@ CPM_HITS
Definition: CpByteStreamTool.h:114
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
LVL1BS
Definition: ZdcModifySlices.h:10
LVL1BS::CmmSubBlock::LEFT
@ LEFT
Definition: CmmSubBlock.h:28
LVL1BS::CpByteStreamTool::ROBIterator
IROBDataProviderSvc::VROBFRAG::const_iterator ROBIterator
Definition: CpByteStreamTool.h:125
LVL1BS::CpmSubBlock::fillTowerData
void fillTowerData(int slice, int channel, int em, int had, int emErr, int hadErr)
Store trigger tower data.
Definition: CpmSubBlock.cxx:74
LVL1BS::L1CaloSubBlock::ERROR_MODULE_NUMBER
@ ERROR_MODULE_NUMBER
Definition: L1CaloSubBlock.h:34
LVL1BS::CpByteStreamTool::setupCmmCpHitsMap
void setupCmmCpHitsMap(const CmmCpHitsCollection *hitCollection, ConstCmmCpHitsMap &cmmHitsMap) const
Set up CMM-CP hits map.
Definition: CpByteStreamTool.cxx:1078
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
L1CaloSrcIdMap.h
LVL1BS::CpmSubBlock::emError
int emError(int slice, int channel) const
Return Em error for given channel.
Definition: CpmSubBlock.cxx:147
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
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:14
LVL1BS::CpByteStreamTool::interfaceID
static const InterfaceID & interfaceID()
AlgTool InterfaceID.
Definition: CpByteStreamTool.cxx:41
AthAlgTool
Definition: AthAlgTool.h:26
LVL1::DataError::get
int get(ErrorBit bit) const
Return an error bit or data.
Definition: DataError.cxx:48
LVL1::CMMCPHits::REMOTE_1
@ REMOTE_1
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMCPHits.h:33
LVL1::TriggerTowerKey::ttKey
virtual unsigned int ttKey(const TriggerTower &tower)
returns the key of the passed tower
Definition: TriggerTowerKey.cxx:143
LVL1BS::L1CaloSrcIdMap::maxSlinks
int maxSlinks() const
Return the maximum possible number of slinks.
Definition: L1CaloSrcIdMap.cxx:82
LVL1BS::CpByteStreamTool::findCpmTower
const LVL1::CPMTower * findCpmTower(unsigned int key, const ConstCpmTowerMap &ttMap) const
Find a CPM tower for given key.
Definition: CpByteStreamTool.cxx:979
LVL1BS::CpByteStreamTool::~CpByteStreamTool
virtual ~CpByteStreamTool()
Definition: CpByteStreamTool.cxx:87
LVL1BS::CmmSubBlock::cmmSumming
int cmmSumming() const
Definition: CmmSubBlock.h:63
LVL1BS::L1CaloUserHeader::isValid
static bool isValid(uint32_t word)
Test for valid header word.
Definition: L1CaloUserHeader.cxx:36
LVL1BS::CmmCpSubBlock::REMOTE_1
@ REMOTE_1
Definition: CmmCpSubBlock.h:28
TileDCSDataPlotter.tt
tt
Definition: TileDCSDataPlotter.py:874
LVL1BS::L1CaloSrcIdMap::daqOrRoi
int daqOrRoi(uint32_t code) const
Return daqOrRoi from unpacked moduleID.
Definition: L1CaloSrcIdMap.cxx:65
LVL1BS::CpmSubBlock::setCpmHeader
void setCpmHeader(int version, int format, int slice, int crate, int module, int timeslices)
Store CPM header.
Definition: CpmSubBlock.cxx:65
geometry_dat_to_json.ld
ld
Definition: geometry_dat_to_json.py:32
LVL1BS::CpByteStreamTool::CpmHitsData
Definition: CpByteStreamTool.h:143
LVL1::TriggerTowerKey
The TriggerTowerKey object provides the key for each trigger tower depending on its eta-phi coords.
Definition: TriggerTowerKey.h:56
LVL1BS::L1CaloSubBlock::ERROR_USER_HEADER
@ ERROR_USER_HEADER
Definition: L1CaloSubBlock.h:32
LVL1BS::CpByteStreamTool::m_forceSlices
int m_forceSlices
Property: Force number of slices in bytestream.
Definition: CpByteStreamTool.h:228
LVL1BS::CmmSubBlock::CMM_CP
@ CMM_CP
Definition: CmmSubBlock.h:25
LVL1BS::CpByteStreamTool::m_version
int m_version
Property: Sub_block header version.
Definition: CpByteStreamTool.h:214
FullEventAssembler::getRodData
RODDATA * getRodData(uint32_t id)
get a block of ROD data
LVL1BS::CpmSubBlock::unpack
bool unpack()
Unpack data.
Definition: CpmSubBlock.cxx:209
keylayer_zslicemap.slices
slices
Definition: keylayer_zslicemap.py:112
LVL1BS::CpByteStreamTool::m_errorTool
ToolHandle< LVL1BS::L1CaloErrorByteStreamTool > m_errorTool
Error collection tool.
Definition: CpByteStreamTool.h:207
LVL1BS::CpByteStreamTool::findCpmHits
const LVL1::CPMHits * findCpmHits(int crate, int module, const ConstCpmHitsMap &hitsMap) const
Find CPM hits for given crate, module.
Definition: CpByteStreamTool.cxx:998
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37