ATLAS Offline Software
PpmByteStreamV1Tool.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 #include "StoreGate/SegMemSvc.h"
14 
16 
21 
22 #include "CmmSubBlock.h"
24 #include "L1CaloSrcIdMap.h"
25 #include "L1CaloSubBlock.h"
26 #include "L1CaloUserHeader.h"
27 #include "ModifySlices.h"
28 
29 #include "PpmByteStreamV1Tool.h"
30 
32 
33 namespace LVL1BS
34 {
35 
40 
41 // Interface ID
42 
43 static const InterfaceID IID_IPpmByteStreamV1Tool("PpmByteStreamV1Tool", 1, 1);
44 
46 {
47  return IID_IPpmByteStreamV1Tool;
48 }
49 
50 // Constructor
51 
53  const std::string &name,
54  const IInterface *parent)
56  m_ppmMaps("LVL1::PpmMappingTool/PpmMappingTool"),
57  m_errorTool("LVL1BS::L1CaloErrorByteStreamTool/L1CaloErrorByteStreamTool"),
58  m_sms("SegMemSvc/SegMemSvc", name),
59  m_version(1), m_compVers(4),
60  m_subDetector(eformat::TDAQ_CALO_PREPROC)
61 {
62  declareInterface<PpmByteStreamV1Tool>(this);
63 
64  declareProperty("PpmMappingTool", m_ppmMaps,
65  "Crate/Module/Channel to Eta/Phi/Layer mapping tool");
66  declareProperty("ErrorTool", m_errorTool,
67  "Tool to collect errors for monitoring");
68 
69  declareProperty("PrintCompStats", m_printCompStats = 0,
70  "Print compressed format statistics");
71  declareProperty("SlinksPerCrate", m_slinks = 4,
72  "The number of S-Links per crate");
73 
74  // Properties for reading bytestream only
75  declareProperty("ZeroSuppress", m_zeroSuppress = 0,
76  "Only make trigger towers with non-zero EM or Had energy");
77  declareProperty("ROBSourceIDs", m_sourceIDsProp,
78  "ROB fragment source identifiers");
79  declareProperty("PedestalValue", m_pedestal = 10,
80  "Pedestal value - needed for compressed formats 0,1 only");
81 
82  // Properties for writing bytestream only
83  declareProperty("DataFormat", m_dataFormat = 1,
84  "Format identifier (0-3) in sub-block header");
85  declareProperty("FADCBaseline", m_fadcBaseline = 0,
86  "FADC baseline lower bound for compressed formats");
87  declareProperty("FADCThreshold", m_fadcThreshold = 1,
88  "FADC threshold for super-compressed format");
89  declareProperty("SimulSlicesLUT", m_dfltSlicesLut = 1,
90  "The number of LUT slices in the simulation");
91  declareProperty("SimulSlicesFADC", m_dfltSlicesFadc = 7,
92  "The number of FADC slices in the simulation");
93  declareProperty("ForceSlicesLUT", m_forceSlicesLut = 0,
94  "If >0, the number of LUT slices in bytestream");
95  declareProperty("ForceSlicesFADC", m_forceSlicesFadc = 0,
96  "If >0, the number of FADC slices in bytestream");
97  declareProperty("CrateMin", m_crateMin = 0,
98  "Minimum crate number, allows partial output");
99  declareProperty("CrateMax", m_crateMax = s_crates - 1,
100  "Maximum crate number, allows partial output");
101 
102 }
103 
104 // Destructor
105 
107 {
108 }
109 
110 // Initialize
111 
112 
114 {
115  ATH_MSG_INFO ( "Initializing " << name() );
116 
117  ATH_CHECK( m_ppmMaps.retrieve() );
118  ATH_CHECK( m_errorTool.retrieve() );
119  ATH_CHECK( m_sms.retrieve() );
120 
121  return StatusCode::SUCCESS;
122 }
123 
124 // Finalize
125 
127 {
128  if (m_printCompStats && msgLvl(MSG::INFO))
129  {
130  msg(MSG::INFO);
131  printCompStats();
132  }
133  return StatusCode::SUCCESS;
134 }
135 
136 
137 // Conversion bytestream to trigger towers
138 
140  const std::string& sgKey,
141  const IROBDataProviderSvc::VROBFRAG &robFrags,
142  DataVector<LVL1::TriggerTower> *const ttCollection) const
143 {
144  const bool debug = msgLvl(MSG::DEBUG);
145  const bool verbose = msgLvl(MSG::VERBOSE);
146  if (debug) msg(MSG::DEBUG);
147 
148  const std::string flag("Spare");
149  const std::string::size_type pos = sgKey.find(flag);
150  bool spareChannels =
151  (pos != std::string::npos && pos == (sgKey.length() - flag.length()));
152  const std::string flag2("Muon");
153  const std::string::size_type pos2 = sgKey.find(flag2);
154  bool muonChannels =
155  (pos2 != std::string::npos && pos2 == (sgKey.length() - flag2.length()));
156  bool dataChannels = (!spareChannels && !muonChannels);
157 
158  // Set up TriggerTower pool and mappings
159  // (NB. This assumes mappings won't change during the course of a job)
160  const int maxChannels = s_crates * s_modules * s_channels;
161  const int chanBitVecSize = maxChannels / 32;
162 
163  SlotData& sd = *m_slotData;
164  std::lock_guard guard (sd.m_mutex);
165 
166  if (sd.m_ttData.empty())
167  {
168  const int spareSize = maxChannels - 2 * s_dataSize;
169  const int muonSize = 2 * s_channels;
170  const int modBitVecSize = (s_crates * s_modules) / 32;
171  sd.m_ttData.reserve(s_dataSize);
172  sd.m_ttSpare.reserve(spareSize);
173  sd.m_ttMuon.reserve(muonSize);
174  sd.m_ttPos.resize(maxChannels);
175  sd.m_chanLayer.resize(chanBitVecSize);
176  sd.m_dataChan.resize(chanBitVecSize);
177  sd.m_spareChan.resize(chanBitVecSize);
178  sd.m_muonChan.resize(chanBitVecSize);
179  sd.m_dataMod.resize(modBitVecSize);
180  sd.m_spareMod.resize(modBitVecSize);
181  sd.m_muonMod.resize(modBitVecSize);
182  TriggerTowerMap ttMap;
184  std::vector<int> dummyS;
185  std::vector<int> dummyL(1);
186  std::vector<int> dummyF(5);
187  int dataCount = 0;
188  int spareCount = 0;
189  for (int crate = 0; crate < s_crates; ++crate)
190  {
191  for (int module = 0; module < s_modules; ++module)
192  {
193  const int index2 = (crate << 4) + module;
194  const int word2 = index2 / 32;
195  const int bit2 = index2 % 32;
196  for (int channel = 0; channel < s_channels; ++channel)
197  {
198  const int index = (crate << 10) + (module << 6) + channel;
199  const int word = index / 32;
200  const int bit = index % 32;
201  double eta = 0.;
202  double phi = 0.;
203  int layer = 0;
204  unsigned int key = 0;
205  if (m_ppmMaps->mapping(crate, module, channel, eta, phi, layer))
206  {
207  // Data channels
208  key = sd.m_towerKey.ttKey(phi, eta);
209  itt = ttMap.find(key);
210  if (itt == ttMap.end())
211  {
213  new (m_sms->allocate<LVL1::TriggerTower>(SegMemSvc::JOB))
214  LVL1::TriggerTower(phi, eta, key,
215  dummyF, dummyL, dummyF, dummyL, 0, 0, 0,
216  dummyF, dummyL, dummyF, dummyL, 0, 0, 0);
217  sd.m_ttData.push_back(tt);
218  const int count = dataCount++;
219  sd.m_ttPos[index] = count;
220  ttMap.insert(std::make_pair(key, count));
221  }
222  else
223  {
224  sd.m_ttPos[index] = itt->second;
225  }
226  sd.m_chanLayer[word] |= (layer << bit);
227  sd.m_dataChan[word] |= (1 << bit);
228  sd.m_dataMod[word2] |= (1 << bit2);
229  }
230  else
231  {
232  // Spare channels
233  const int pin = channel % 16;
234  const int asic = channel / 16;
235  eta = 16 * crate + module;
236  phi = 4 * pin + asic;
237  layer = 0;
238  const int type = 1;
239  key = (crate << 24) | (type << 20) | (module << 16) | (pin << 8) | asic; // CoolID
241  new (m_sms->allocate<LVL1::TriggerTower>(SegMemSvc::JOB))
242  LVL1::TriggerTower(phi, eta, key,
243  dummyF, dummyL, dummyF, dummyL, 0, 0, 0,
244  dummyS, dummyS, dummyS, dummyS, 0, 0, 0);
245  sd.m_ttSpare.push_back(tt);
246  sd.m_ttPos[index] = spareCount++;
247  sd.m_chanLayer[word] |= (layer << bit);
248  sd.m_spareChan[word] |= (1 << bit);
249  sd.m_spareMod[word2] |= (1 << bit2);
250  if ((crate == 2 || crate == 3) && (module == 0))
251  {
252  sd.m_ttMuon.push_back(tt);
253  sd.m_muonChan[word] |= (1 << bit);
254  sd.m_muonMod[word2] |= (1 << bit2);
255  }
256  }
257  }
258  }
259  }
260  }
261 
262  // Set up according to the collection we want
263 
264  TriggerTowerVector &ttCol(dataChannels ? sd.m_ttData
265  : spareChannels
266  ? sd.m_ttSpare
267  : sd.m_ttMuon);
268  TriggerTowerVector &ttColRef(dataChannels ? sd.m_ttData
269  : sd.m_ttSpare);
270  const ChannelBitVector &colChan(dataChannels ? sd.m_dataChan
271  : spareChannels
272  ? sd.m_spareChan
273  : sd.m_muonChan);
274  const ChannelBitVector &colMod(dataChannels ? sd.m_dataMod
275  : spareChannels
276  ? sd.m_spareMod
277  : sd.m_muonMod);
278  const int colSize = dataChannels ? 2 * ttCol.size()
279  : ttCol.size();
280  sd.m_foundChan.assign(chanBitVecSize, 0);
281  int ttCount = 0;
282 
283  // Vectors to unpack into
284  std::vector<int> lut;
285  std::vector<int> fadc;
286  std::vector<int> bcidLut;
287  std::vector<int> bcidFadc;
288 
289  // Loop over ROB fragments
290 
291  int fadcBaseline = m_fadcBaseline;
292 
293  int robCount = 0;
294  std::set<uint32_t> dupCheck;
295  ROBIterator rob = robFrags.begin();
296  ROBIterator robEnd = robFrags.end();
297  for (; rob != robEnd; ++rob)
298  {
299 
300  if (debug)
301  {
302  ++robCount;
303  msg() << "Treating ROB fragment " << robCount << endmsg;
304  }
305 
306  // Skip fragments with ROB status errors
307 
308  uint32_t robid = (*rob)->source_id();
309  if ((*rob)->nstatus() > 0)
310  {
311  ROBPointer robData;
312  (*rob)->status(robData);
313  if (*robData != 0)
314  {
315  m_errorTool->robError(robid, *robData);
316  if (debug) msg() << "ROB status error - skipping fragment" << endmsg;
317  continue;
318  }
319  }
320 
321  // Skip duplicate fragments
322 
323  if (!dupCheck.insert(robid).second)
324  {
326  if (debug) msg() << "Skipping duplicate ROB fragment" << endmsg;
327  continue;
328  }
329 
330  // Unpack ROD data (slinks)
331 
332  RODPointer payloadBeg;
334  RODPointer payloadEnd;
335  (*rob)->rod_data(payloadBeg);
336  payloadEnd = payloadBeg + (*rob)->rod_ndata();
337  payload = payloadBeg;
338  if (payload == payloadEnd)
339  {
340  if (debug) msg() << "ROB fragment empty" << endmsg;
341  continue;
342  }
343 
344  // Check identifier
345  const uint32_t sourceID = (*rob)->rod_source_id();
346  if (m_srcIdMap.getRobID(sourceID) != robid ||
347  m_srcIdMap.subDet(sourceID) != m_subDetector ||
348  m_srcIdMap.daqOrRoi(sourceID) != 0 ||
349  m_srcIdMap.slink(sourceID) >= m_slinks ||
350  m_srcIdMap.crate(sourceID) >= s_crates)
351  {
352  m_errorTool->rodError(robid, L1CaloSubBlock::ERROR_ROD_ID);
353  if (debug)
354  {
355  msg() << "Wrong source identifier in data: ROD "
356  << MSG::hex << sourceID << " ROB " << robid
357  << MSG::dec << endmsg;
358  }
359  continue;
360  }
361 
362  // Check minor version
363  const int minorVersion = (*rob)->rod_version() & 0xffff;
364  if (minorVersion > m_srcIdMap.minorVersionPreLS1())
365  {
366  if (debug) msg() << "Skipping post-LS1 data" << endmsg;
367  continue;
368  }
369  const int rodCrate = m_srcIdMap.crate(sourceID);
370  if (debug)
371  {
372  msg() << "Treating crate " << rodCrate
373  << " slink " << m_srcIdMap.slink(sourceID) << endmsg;
374  }
375 
376  // First word should be User Header
378  {
380  if (debug) msg() << "Invalid or missing user header" << endmsg;
381  continue;
382  }
383  L1CaloUserHeader userHeader(*payload);
384  userHeader.setVersion(minorVersion);
385  const int headerWords = userHeader.words();
386  if (headerWords != 1)
387  {
389  if (debug)
390  {
391  msg() << "Unexpected number of user header words: "
392  << headerWords << endmsg;
393  }
394  continue;
395  }
396  for (int i = 0; i < headerWords; ++i) ++payload;
397  // triggered slice offsets
398  const int trigLut = userHeader.ppmLut();
399  const int trigFadc = userHeader.ppmFadc();
400  // FADC baseline lower bound
401  fadcBaseline = userHeader.lowerBound();
402  if (debug)
403  {
404  msg() << "Minor format version number: "
405  << MSG::hex << minorVersion << MSG::dec << endmsg
406  << "LUT triggered slice offset: " << trigLut << endmsg
407  << "FADC triggered slice offset: " << trigFadc << endmsg
408  << "FADC baseline lower bound: " << fadcBaseline << endmsg;
409  }
410  const int runNumber = (*rob)->rod_run_no() & 0xffffff;
411 
412  // Find the number of channels per sub-block
413 
414  int chanPerSubBlock = 0;
415  bool firstBlock = false;
416  uint32_t firstWord = 0;
417  RODPointer payloadFirst;
418  if (payload != payloadEnd)
419  {
422  {
424  if (debug) msg() << "Missing Sub-block header" << endmsg;
425  continue;
426  }
427  firstBlock = true;
428  firstWord = *payload;
429  if (sd.m_ppmBlocks.empty())
430  {
431  sd.m_ppmBlocks.push_back(new PpmSubBlockV1());
432  }
433  PpmSubBlockV1 *const subBlock = sd.m_ppmBlocks[0];
434  subBlock->clear();
435  payloadFirst = subBlock->read(payload, payloadEnd);
436  chanPerSubBlock = subBlock->channelsPerSubBlock();
437  if (chanPerSubBlock == 0)
438  {
439  m_errorTool->rodError(robid, subBlock->unpackErrorCode());
440  if (debug) msg() << "Unsupported version/data format: "
441  << subBlock->version() << "/"
442  << subBlock->format() << endmsg;
443  continue;
444  }
445  if (debug) msg() << "Channels per sub-block: "
446  << chanPerSubBlock << endmsg;
447  }
448  else
449  {
450  if (debug) msg() << "ROB fragment contains user header only" << endmsg;
451  continue;
452  }
453  const int numSubBlocks = s_channels / chanPerSubBlock;
454  const int size = sd.m_ppmBlocks.size();
455  if (numSubBlocks > size)
456  {
457  for (int i = size; i < numSubBlocks; ++i)
458  {
459  sd.m_ppmBlocks.push_back(new PpmSubBlockV1());
460  }
461  }
462 
463  // Loop over PPMs
464 
465  payload = payloadBeg;
466  for (int i = 0; i < headerWords; ++i) ++payload;
467  unsigned int rodErr = L1CaloSubBlock::ERROR_NONE;
468  while (payload != payloadEnd)
469  {
470 
471  // Get all sub-blocks for one PPM (first already read in above)
472 
473  int crate = 0;
474  int module = 0;
475  int nPpmBlocks = 0;
476  for (int block = 0; block < numSubBlocks; ++block)
477  {
478  const uint32_t word = (firstBlock) ? firstWord : *payload;
480  || CmmSubBlock::cmmBlock(word)
481  || PpmSubBlockV1::errorBlock(word))
482  {
483  if (debug) msg() << "Unexpected data sequence" << endmsg;
485  break;
486  }
487  if (chanPerSubBlock != s_channels &&
488  L1CaloSubBlock::seqno(word) != block * chanPerSubBlock)
489  {
490  if (debug)
491  {
492  msg() << "Unexpected channel sequence number: "
493  << L1CaloSubBlock::seqno(word) << " expected "
494  << block *chanPerSubBlock << endmsg;
495  }
497  break;
498  }
499  PpmSubBlockV1 *const subBlock = sd.m_ppmBlocks[block];
500  nPpmBlocks++;
501  if (firstBlock)
502  {
503  payload = payloadFirst;
504  firstBlock = false;
505  }
506  else
507  {
508  subBlock->clear();
509  payload = subBlock->read(payload, payloadEnd);
510  }
511  if (block == 0)
512  {
513  crate = subBlock->crate();
514  module = subBlock->module();
515  if (debug)
516  {
517  msg() << "Crate " << crate << " Module " << module << endmsg;
518  }
519  if (crate != rodCrate)
520  {
521  if (debug)
522  {
523  msg() << "Inconsistent crate number in ROD source ID" << endmsg;
524  }
526  break;
527  }
528  }
529  else
530  {
531  if (subBlock->crate() != crate)
532  {
533  if (debug) msg() << "Inconsistent crate number in sub-blocks"
534  << endmsg;
536  break;
537  }
538  if (subBlock->module() != module)
539  {
540  if (debug) msg() << "Inconsistent module number in sub-blocks"
541  << endmsg;
543  break;
544  }
545  }
546  if (payload == payloadEnd && block != numSubBlocks - 1)
547  {
548  if (debug) msg() << "Premature end of data" << endmsg;
550  break;
551  }
552  }
553  if (rodErr != L1CaloSubBlock::ERROR_NONE) break;
554 
555  // Is there an error block?
556 
557  bool isErrBlock = false;
558  if (payload != payloadEnd)
559  {
563  {
564  if (debug) msg() << "Error block found" << endmsg;
565  sd.m_errorBlock.clear();
566  isErrBlock = true;
567  payload = sd.m_errorBlock.read(payload, payloadEnd);
568  if (sd.m_errorBlock.crate() != crate)
569  {
570  if (debug) msg() << "Inconsistent crate number in error block"
571  << endmsg;
573  break;
574  }
575  if (sd.m_errorBlock.module() != module)
576  {
577  if (debug) msg() << "Inconsistent module number in error block"
578  << endmsg;
580  break;
581  }
582  if (sd.m_errorBlock.dataWords() && !sd.m_errorBlock.unpack())
583  {
584  if (debug)
585  {
586  std::string errMsg(sd.m_errorBlock.unpackErrorMsg());
587  msg() << "Unpacking error block failed: " << errMsg << endmsg;
588  }
589  rodErr = sd.m_errorBlock.unpackErrorCode();
590  break;
591  }
592  }
593  }
594 
595  // Don't bother unpacking modules that aren't used for required collection
596 
597  const int index2 = (crate << 4) + module;
598  const int word2 = index2 / 32;
599  const int bit2 = index2 % 32;
600  if (!((colMod[word2] >> bit2) & 1)) continue;
601 
602  // Loop over sub-blocks and fill trigger towers
603 
604  for (int block = 0; block < nPpmBlocks; ++block)
605  {
606  PpmSubBlockV1 *const subBlock = sd.m_ppmBlocks[block];
607  subBlock->setLutOffset(trigLut);
608  subBlock->setFadcOffset(trigFadc);
609  subBlock->setPedestal(m_pedestal);
610  subBlock->setFadcBaseline(fadcBaseline);
611  subBlock->setRunNumber(runNumber);
612  if (debug)
613  {
614  msg() << "Unpacking sub-block version/format/seqno: "
615  << subBlock->version() << "/" << subBlock->format() << "/"
616  << subBlock->seqno() << endmsg;
617  }
618  if (subBlock->dataWords() && !subBlock->unpack())
619  {
620  if (debug)
621  {
622  std::string errMsg(subBlock->unpackErrorMsg());
623  msg() << "Unpacking PPM sub-block failed: " << errMsg << endmsg;
624  }
625  rodErr = subBlock->unpackErrorCode();
626  break;
627  }
628  if (m_printCompStats) addCompStats(subBlock->compStats());
629  for (int chan = 0; chan < chanPerSubBlock; ++chan)
630  {
631  const int channel = block * chanPerSubBlock + chan;
632  const int index = (crate << 10) + (module << 6) + channel;
633  const int word = index / 32;
634  const int bit = index % 32;
635  if (!((colChan[word] >> bit) & 1)) continue; // skip unwanted channels
636  if (((sd.m_foundChan[word] >> bit) & 1))
637  {
638  if (debug) msg() << "Duplicate data for crate/module/channel: "
639  << crate << "/" << module << "/" << channel
640  << endmsg;
642  break;
643  }
644  lut.clear();
645  fadc.clear();
646  bcidLut.clear();
647  bcidFadc.clear();
648  subBlock->ppmData(channel, lut, fadc, bcidLut, bcidFadc);
649  if (lut.size() < size_t(trigLut + 1))
650  {
651  if (debug)
652  {
653  msg() << "Triggered LUT slice from header "
654  << "inconsistent with number of slices: "
655  << trigLut << ", " << lut.size() << endmsg;
656  }
658  break;
659  }
660  if (fadc.size() < size_t(trigFadc + 1))
661  {
662  if (debug)
663  {
664  msg() << "Triggered FADC slice from header "
665  << "inconsistent with number of slices: "
666  << trigFadc << ", " << fadc.size() << endmsg;
667  }
669  break;
670  }
671  LVL1::DataError errorBits(0);
672  if (isErrBlock)
673  {
675  sd.m_errorBlock.ppmError(channel));
677  sd.m_errorBlock.subStatus());
678  }
679  else
680  {
682  subBlock->ppmError(channel));
683  const PpmSubBlockV1 *const lastBlock =
684  sd.m_ppmBlocks[nPpmBlocks - 1];
686  lastBlock->subStatus());
687  }
688  // Wrong bit set for compressed formats 1.01 to 1.03
689  if (subBlock->format() > 1 && subBlock->seqno() < 4)
690  {
692  (errorBits.error() >> (LVL1::DataError::ModuleError + 1)) & 0x1);
693  }
694  const int error = errorBits.error();
695 
696  // Save to TriggerTower
697 
698  if (verbose)
699  {
700  msg(MSG::VERBOSE) << "channel/LUT/FADC/bcidLUT/bcidFADC/error: "
701  << channel << "/";
702  printVec(lut);
703  printVec(fadc);
704  printVec(bcidLut);
705  printVec(bcidFadc);
706  msg() << MSG::hex << error << MSG::dec << "/";
707  }
708  sd.m_foundChan[word] |= (1 << bit);
709  ++ttCount;
710  LVL1::TriggerTower *tt = ttColRef[sd.m_ttPos[index]];
711  const int layer = ((sd.m_chanLayer[word] >> bit) & 1);
712  if (layer == 0) // EM
713  {
714  tt->addEM(fadc, lut, bcidFadc, bcidLut, error, trigLut, trigFadc);
715  }
716  else // Had
717  {
718  tt->addHad(fadc, lut, bcidFadc, bcidLut, error, trigLut, trigFadc);
719  }
720  }
721  if (rodErr != L1CaloSubBlock::ERROR_NONE) break;
722  }
723  if (rodErr != L1CaloSubBlock::ERROR_NONE) break;
724  }
725  if (rodErr != L1CaloSubBlock::ERROR_NONE)
726  m_errorTool->rodError(robid, rodErr);
727  }
728 
729  // Reset any missing channels (should be rare)
730 
731  if (ttCount != colSize)
732  {
733  if (debug)
734  {
735  msg() << "Found " << ttCount << " channels, expected " << colSize << endmsg;
736  }
737  std::vector<int> dummy(1);
738  for (int word = 0; word < chanBitVecSize; ++word)
739  {
740  if (sd.m_foundChan[word] != colChan[word])
741  {
742  for (int bit = 0; bit < 32; ++bit)
743  {
744  if (((sd.m_foundChan[word] >> bit) & 1) != ((colChan[word] >> bit) & 1))
745  {
746  const int index = word * 32 + bit;
747  LVL1::TriggerTower *tt = ttColRef[sd.m_ttPos[index]];
748  const int layer = ((sd.m_chanLayer[word] >> bit) & 1);
749  if (layer == 0) // EM
750  {
751  tt->addEM(dummy, dummy, dummy, dummy, 0, 0, 0);
752  }
753  else if (dataChannels) // Had
754  {
755  tt->addHad(dummy, dummy, dummy, dummy, 0, 0, 0);
756  }
757  }
758  }
759  }
760  }
761  }
762 
763  // And copy into output collection
764 
765  if (m_zeroSuppress)
766  {
767  TriggerTowerVector::iterator itr = ttCol.begin();
768  TriggerTowerVector::iterator itrE = ttCol.end();
769  for (; itr != itrE; ++itr)
770  {
771  if ((*itr)->emEnergy() || (dataChannels && (*itr)->hadEnergy()))
772  {
773  ttCollection->push_back(*itr);
774  }
775  }
776  }
777  else
778  {
779  ttCollection->assign(ttCol.begin(), ttCol.end());
780  }
781 
782  return StatusCode::SUCCESS;
783 }
784 
785 // Conversion of trigger towers to bytestream
786 
788  const DataVector<LVL1::TriggerTower> *const ttCollection,
789  RawEventWrite *const re) const
790 {
791  const bool debug = msgLvl(MSG::DEBUG);
792  if (debug) msg(MSG::DEBUG);
793 
794  // Clear the event assembler
796  fea.clear();
797  const uint16_t minorVersion = m_srcIdMap.minorVersionPreLS1();
798  fea.setRodMinorVersion(minorVersion);
799 
800  // Pointer to ROD data vector
801 
803 
804  LVL1::TriggerTowerKey towerKey;
805 
806  // Set up trigger tower maps
807 
808  // Trigger tower map for conversion EM to bytestream
809  TriggerTowerMapConst ttEmMap;
810  // Trigger tower map for conversion Had to bytestream
811  TriggerTowerMapConst ttHadMap;
812  setupTTMaps(ttCollection, ttEmMap, ttHadMap, towerKey);
813 
814  // Create the sub-blocks to do the packing
815 
816  PpmSubBlockV1 subBlock;
817  const int chanPerSubBlock = subBlock.channelsPerSubBlock(m_version,
818  m_dataFormat);
819  if (chanPerSubBlock == 0)
820  {
821  msg(MSG::ERROR) << "Unsupported version/data format: "
822  << m_version << "/" << m_dataFormat << endmsg;
823  return StatusCode::FAILURE;
824  }
825  PpmSubBlockV1 errorBlock;
826 
827  int slicesLut = 1;
828  int slicesFadc = 1;
829  int trigLut = 0;
830  int trigFadc = 0;
831  int slicesLutNew = 1;
832  int slicesFadcNew = 1;
833  int trigLutNew = 0;
834  int trigFadcNew = 0;
835  const int modulesPerSlink = s_modules / m_slinks;
836  for (int crate = m_crateMin; crate <= m_crateMax; ++crate)
837  {
838  for (int module = 0; module < s_modules; ++module)
839  {
840 
841  // Pack required number of modules per slink
842 
843  if (module % modulesPerSlink == 0)
844  {
845  const int daqOrRoi = 0;
846  const int slink = module / modulesPerSlink;
847  if (debug)
848  {
849  msg() << "Treating crate " << crate << " slink " << slink << endmsg;
850  }
851  // Get number of slices and triggered slice offsets
852  // for this slink
853  if ( ! slinkSlices(crate, module, modulesPerSlink,
854  slicesLut, slicesFadc, trigLut, trigFadc,
855  ttEmMap, ttHadMap,
856  towerKey))
857  {
858  msg(MSG::ERROR) << "Inconsistent number of slices or "
859  << "triggered slice offsets in data for crate "
860  << crate << " slink " << slink << endmsg;
861  return StatusCode::FAILURE;
862  }
863  slicesLutNew = (m_forceSlicesLut) ? m_forceSlicesLut : slicesLut;
864  slicesFadcNew = (m_forceSlicesFadc) ? m_forceSlicesFadc : slicesFadc;
865  trigLutNew = ModifySlices::peak(trigLut, slicesLut, slicesLutNew);
866  trigFadcNew = ModifySlices::peak(trigFadc, slicesFadc, slicesFadcNew);
867  if (debug)
868  {
869  msg() << "Data Version/Format: " << m_version
870  << " " << m_dataFormat << endmsg
871  << "LUT slices/offset: " << slicesLut << " " << trigLut;
872  if (slicesLut != slicesLutNew)
873  {
874  msg() << " modified to " << slicesLutNew << " " << trigLutNew;
875  }
876  msg() << endmsg
877  << "FADC slices/offset: " << slicesFadc << " " << trigFadc;
878  if (slicesFadc != slicesFadcNew)
879  {
880  msg() << " modified to " << slicesFadcNew << " " << trigFadcNew;
881  }
882  msg() << endmsg;
883  }
884  L1CaloUserHeader userHeader;
885  userHeader.setPpmLut(trigLutNew);
886  userHeader.setPpmFadc(trigFadcNew);
887  userHeader.setLowerBound(m_fadcBaseline);
888  const uint32_t rodIdPpm = m_srcIdMap.getRodID(crate, slink, daqOrRoi,
889  m_subDetector);
890  theROD = fea.getRodData(rodIdPpm);
891  theROD->push_back(userHeader.header());
892  }
893  if (debug) msg() << "Module " << module << endmsg;
894 
895  // Find trigger towers corresponding to each eta/phi pair and fill
896  // sub-blocks
897 
898  bool upstreamError = false;
899  for (int channel = 0; channel < s_channels; ++channel)
900  {
901  const int chan = channel % chanPerSubBlock;
903  {
904  errorBlock.clear();
905  errorBlock.setPpmErrorHeader(m_version, m_dataFormat, crate,
906  module, slicesFadcNew, slicesLutNew);
907  }
908  if (chan == 0)
909  {
910  subBlock.clear();
912  {
913  subBlock.setPpmHeader(m_version, m_dataFormat, m_compVers, crate,
914  module, slicesFadcNew, slicesLutNew);
915  }
916  else
917  {
918  subBlock.setPpmHeader(m_version, m_dataFormat, channel, crate,
919  module, slicesFadcNew, slicesLutNew);
920  }
921  subBlock.setLutOffset(trigLutNew);
922  subBlock.setFadcOffset(trigFadcNew);
925  }
926  const LVL1::TriggerTower *tt = 0;
927  double eta = 0.;
928  double phi = 0.;
929  int layer = 0;
930  if (m_ppmMaps->mapping(crate, module, channel, eta, phi, layer))
931  {
932  tt = findLayerTriggerTower(eta, phi, layer, ttEmMap, ttHadMap, towerKey);
933  }
934  if (tt )
935  {
936  int err = 0;
937  std::vector<int> lut;
938  std::vector<int> fadc;
939  std::vector<int> bcidLut;
940  std::vector<int> bcidFadc;
941  if (layer == 0) // em
942  {
943  ModifySlices::data(tt->emLUT(), lut, slicesLutNew);
944  ModifySlices::data(tt->emADC(), fadc, slicesFadcNew);
945  ModifySlices::data(tt->emBCIDvec(), bcidLut, slicesLutNew);
946  ModifySlices::data(tt->emBCIDext(), bcidFadc, slicesFadcNew);
947  err = tt->emError();
948  }
949  else // had
950  {
951  ModifySlices::data(tt->hadLUT(), lut, slicesLutNew);
952  ModifySlices::data(tt->hadADC(), fadc, slicesFadcNew);
953  ModifySlices::data(tt->hadBCIDvec(), bcidLut, slicesLutNew);
954  ModifySlices::data(tt->hadBCIDext(), bcidFadc, slicesFadcNew);
955  err = tt->hadError();
956  }
957  subBlock.fillPpmData(channel, lut, fadc, bcidLut, bcidFadc);
958  if (err)
959  {
960  const LVL1::DataError errorBits(err);
961  const int errpp = errorBits.get(LVL1::DataError::PPMErrorWord);
963  {
964  errorBlock.fillPpmError(channel, errpp);
965  }
966  else subBlock.fillPpmError(channel, errpp);
967  if (errpp >> 2) upstreamError = true;
968  }
969  }
970  if (chan == chanPerSubBlock - 1)
971  {
972  // output the packed sub-block
973  if ( !subBlock.pack())
974  {
975  msg(MSG::ERROR) << "PPM sub-block packing failed" << endmsg;
976  return StatusCode::FAILURE;
977  }
978  if (m_printCompStats) addCompStats(subBlock.compStats());
979  if (channel != s_channels - 1)
980  {
981  // Only put errors in last sub-block
982  subBlock.setStatus(0, false, false, false, false,
983  false, false, false);
984  if (debug)
985  {
986  msg() << "PPM sub-block data words: "
987  << subBlock.dataWords() << endmsg;
988  }
989  subBlock.write(theROD);
990  }
991  else
992  {
993  // Last sub-block - write error block
994  bool glinkTimeout = false;
995  bool daqOverflow = false;
996  bool bcnMismatch = false;
997  bool glinkParity = false;
999  {
1000  glinkTimeout = errorBlock.mcmAbsent() ||
1001  errorBlock.timeout();
1002  daqOverflow = errorBlock.asicFull() ||
1003  errorBlock.fpgaCorrupt();
1004  bcnMismatch = errorBlock.eventMismatch() ||
1005  errorBlock.bunchMismatch();
1006  glinkParity = errorBlock.glinkPinParity();
1007  }
1008  else
1009  {
1010  glinkTimeout = subBlock.mcmAbsent() ||
1011  subBlock.timeout();
1012  daqOverflow = subBlock.asicFull() ||
1013  subBlock.fpgaCorrupt();
1014  bcnMismatch = subBlock.eventMismatch() ||
1015  subBlock.bunchMismatch();
1016  glinkParity = subBlock.glinkPinParity();
1017  }
1018  subBlock.setStatus(0, glinkTimeout, false, upstreamError,
1019  daqOverflow, bcnMismatch, false, glinkParity);
1020  if (debug)
1021  {
1022  msg() << "PPM sub-block data words: "
1023  << subBlock.dataWords() << endmsg;
1024  }
1025  subBlock.write(theROD);
1026  // Only uncompressed format has a separate error block
1028  {
1029  if ( ! errorBlock.pack())
1030  {
1031  msg(MSG::ERROR) << "PPM error block packing failed" << endmsg;
1032  return StatusCode::FAILURE;
1033  }
1034  errorBlock.setStatus(0, glinkTimeout, false, upstreamError,
1035  daqOverflow, bcnMismatch, false, glinkParity);
1036  errorBlock.write(theROD);
1037  if (debug)
1038  {
1039  msg() << "PPM error block data words: "
1040  << errorBlock.dataWords() << endmsg;
1041  }
1042  }
1043  }
1044  }
1045  }
1046  }
1047  }
1048 
1049  // Fill the raw event
1050 
1051  fea.fill(re, msg());
1052 
1053  return StatusCode::SUCCESS;
1054 }
1055 
1056 // Add compression stats to totals
1057 
1058 void PpmByteStreamV1Tool::addCompStats(const std::vector<uint32_t> &stats) const
1059 {
1060  if (stats.empty()) return;
1061  const int n = std::min (stats.size(), static_cast<size_t>(MAXFORMATS));
1062  for (int i = 0; i < n; ++i) {
1063  std::atomic<uint32_t>& stat ATLAS_THREAD_SAFE =
1064  const_cast<std::atomic<uint32_t>&> (m_compStats[i]);
1065  stat += stats[i];
1066  }
1067 }
1068 
1069 // Print compression stats
1070 
1072 {
1073  msg() << "Compression stats format/count: ";
1074  for (unsigned int i = 0; i < MAXFORMATS; ++i)
1075  {
1076  msg() << " " << i << "/" << m_compStats[i];
1077  }
1078  msg() << endmsg;
1079 }
1080 
1081 // Find a trigger tower using separate layer maps
1082 
1084  const double eta, const double phi, const int layer,
1085  const TriggerTowerMapConst& ttEmMap,
1086  const TriggerTowerMapConst& ttHadMap,
1087  LVL1::TriggerTowerKey& towerKey) const
1088 {
1089  const LVL1::TriggerTower *tt = 0;
1090  const unsigned int key = towerKey.ttKey(phi, eta);
1091  TriggerTowerMapConst::const_iterator mapIter;
1092  if (layer == 0)
1093  {
1094  mapIter = ttEmMap.find(key);
1095  if (mapIter != ttEmMap.end()) tt = mapIter->second;
1096  }
1097  else
1098  {
1099  mapIter = ttHadMap.find(key);
1100  if (mapIter != ttHadMap.end()) tt = mapIter->second;
1101  }
1102  return tt;
1103 }
1104 
1105 // Set up trigger tower maps
1106 
1108  const ttCollection,
1109  TriggerTowerMapConst& ttEmMap,
1110  TriggerTowerMapConst& ttHadMap,
1111  LVL1::TriggerTowerKey& towerKey) const
1112 {
1113  using std::accumulate;
1114 
1115  ttEmMap.clear();
1116  ttHadMap.clear();
1118  TriggerTowerCollection::const_iterator pose = ttCollection->end();
1119  for (; pos != pose; ++pos)
1120  {
1121  const LVL1::TriggerTower *tt = *pos;
1122  const unsigned int key = towerKey.ttKey(tt->phi(), tt->eta());
1123  // Ignore any with zero data
1124  // EM
1125  if (accumulate((tt->emLUT()).begin(), (tt->emLUT()).end(), 0) ||
1126  accumulate((tt->emADC()).begin(), (tt->emADC()).end(), 0) ||
1127  accumulate((tt->emBCIDvec()).begin(), (tt->emBCIDvec()).end(), 0) ||
1128  accumulate((tt->emBCIDext()).begin(), (tt->emBCIDext()).end(), 0) ||
1129  tt->emError())
1130  {
1131  ttEmMap.insert(std::make_pair(key, tt));
1132  }
1133  // Had
1134  if (accumulate((tt->hadLUT()).begin(), (tt->hadLUT()).end(), 0) ||
1135  accumulate((tt->hadADC()).begin(), (tt->hadADC()).end(), 0) ||
1136  accumulate((tt->hadBCIDvec()).begin(), (tt->hadBCIDvec()).end(), 0) ||
1137  accumulate((tt->hadBCIDext()).begin(), (tt->hadBCIDext()).end(), 0) ||
1138  tt->hadError())
1139  {
1140  ttHadMap.insert(std::make_pair(key, tt));
1141  }
1142  }
1143 }
1144 
1145 // Get number of slices and triggered slice offsets for next slink
1146 
1147 bool PpmByteStreamV1Tool::slinkSlices(const int crate, const int module,
1148  const int modulesPerSlink, int &slicesLut, int &slicesFadc,
1149  int &trigLut, int &trigFadc,
1150  const TriggerTowerMapConst& ttEmMap,
1151  const TriggerTowerMapConst& ttHadMap,
1152  LVL1::TriggerTowerKey& towerKey) const
1153 {
1154  int sliceL = -1;
1155  int sliceF = m_dfltSlicesFadc;
1156  int trigL = m_dfltSlicesLut / 2;
1157  int trigF = m_dfltSlicesFadc / 2;
1158  for (int mod = module; mod < module + modulesPerSlink; ++mod)
1159  {
1160  for (int chan = 0; chan < s_channels; ++chan)
1161  {
1162  double eta = 0.;
1163  double phi = 0.;
1164  int layer = 0;
1165  if (!m_ppmMaps->mapping(crate, mod, chan,
1166  eta, phi, layer)) continue;
1168  eta, phi, layer, ttEmMap, ttHadMap,
1169  towerKey);
1170  if ( !tt ) continue;
1171  if (layer == 0)
1172  {
1173  if (sliceL < 0) // initialise
1174  {
1175  sliceL = (tt->emLUT()).size();
1176  sliceF = (tt->emADC()).size();
1177  trigL = tt->emPeak();
1178  trigF = tt->emADCPeak();
1179  }
1180  else // check consistent
1181  {
1182  if ((tt->emLUT()).size() != size_t(sliceL) ||
1183  (tt->emADC()).size() != size_t(sliceF) ||
1184  tt->emPeak() != trigL || tt->emADCPeak() != trigF)
1185  {
1186  return false;
1187  }
1188  }
1189  }
1190  else
1191  {
1192  if (sliceL < 0)
1193  {
1194  sliceL = (tt->hadLUT()).size();
1195  sliceF = (tt->hadADC()).size();
1196  trigL = tt->hadPeak();
1197  trigF = tt->hadADCPeak();
1198  }
1199  else
1200  {
1201  if ((tt->hadLUT()).size() != size_t(sliceL) ||
1202  (tt->hadADC()).size() != size_t(sliceF) ||
1203  tt->hadPeak() != trigL || tt->hadADCPeak() != trigF)
1204  {
1205  return false;
1206  }
1207  }
1208  }
1209  }
1210  }
1211  if (sliceL < 0) sliceL = m_dfltSlicesLut;
1212  slicesLut = sliceL;
1213  slicesFadc = sliceF;
1214  trigLut = trigL;
1215  trigFadc = trigF;
1216  return true;
1217 }
1218 
1219 // Return reference to vector with all possible Source Identifiers
1220 
1221 std::vector<uint32_t>
1222 PpmByteStreamV1Tool::makeSourceIDs (bool spareChannels, bool muonChannels) const
1223 {
1224  std::vector<uint32_t> robIds;
1225 
1226  if (!spareChannels && !muonChannels) {
1227  robIds = m_sourceIDsProp;
1228  }
1229 
1230  if (robIds.empty()) {
1231  const int maxlinks = m_srcIdMap.maxSlinks();
1232  for (int crate = 0; crate < s_crates; ++crate)
1233  {
1234  for (int slink = 0; slink < maxlinks; ++slink)
1235  {
1236  const int daqOrRoi = 0;
1237  const uint32_t rodId = m_srcIdMap.getRodID(crate, slink, daqOrRoi,
1238  m_subDetector);
1239  const uint32_t robId = m_srcIdMap.getRobID(rodId);
1240 
1241  if (spareChannels && !(crate > 1 && crate < 6)) {
1242  continue;
1243  }
1244 
1245  if (muonChannels && !(crate > 1 && crate < 4 && slink == 0)) {
1246  continue;
1247  }
1248 
1249  robIds.push_back (robId);
1250  }
1251  }
1252  }
1253  return robIds;
1254 }
1255 
1256 const std::vector<uint32_t> &PpmByteStreamV1Tool::sourceIDs(
1257  const std::string &sgKey) const
1258 {
1259  // Check if spare channels wanted
1260  const std::string flag("Spare");
1261  const std::string::size_type pos = sgKey.find(flag);
1262  bool spareChannels =
1263  (pos != std::string::npos && pos == (sgKey.length() - flag.length()));
1264  // Check if Tile Muon channels wanted
1265  const std::string flag2("Muon");
1266  const std::string::size_type pos2 = sgKey.find(flag2);
1267  bool muonChannels =
1268  (pos2 != std::string::npos && pos2 == (sgKey.length() - flag2.length()));
1269 
1270  if (spareChannels) {
1271  static const std::vector<uint32_t> sourceIDsSpare =
1272  makeSourceIDs (true, false);
1273  return sourceIDsSpare;
1274  }
1275 
1276  if (muonChannels) {
1277  static const std::vector<uint32_t> sourceIDsMuon =
1278  makeSourceIDs (false, true);
1279  return sourceIDsMuon;
1280  }
1281 
1282  static const std::vector<uint32_t> sourceIDs =
1283  makeSourceIDs (false, false);
1284  return sourceIDs;
1285 }
1286 
1287 // Print a vector
1288 
1289 void PpmByteStreamV1Tool::printVec(const std::vector<int> &vec) const
1290 {
1291  std::vector<int>::const_iterator pos;
1292  for (pos = vec.begin(); pos != vec.end(); ++pos)
1293  {
1294  if (pos != vec.begin()) msg() << ",";
1295  msg() << *pos;
1296  }
1297  msg() << "/";
1298 }
1299 
1300 
1301 } // end namespace
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
eformat
Definition: L1CaloBsDecoderUtil.h:11
LVL1BS::PpmByteStreamV1Tool::m_dfltSlicesLut
int m_dfltSlicesLut
Property: Default number of LUT slices in simulation.
Definition: PpmByteStreamV1Tool.h:168
LVL1BS::PpmSubBlockV1::fillPpmError
void fillPpmError(int chan, int errorWord)
Store an error word corresponding to a data channel.
Definition: PpmSubBlockV1.cxx:181
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:216
LVL1BS::L1CaloSrcIdMap::minorVersionPreLS1
uint16_t minorVersionPreLS1() const
Return last ROD header minor version for pre-LS1 data.
Definition: L1CaloSrcIdMap.h:64
RawEventWrite
OFFLINE_FRAGMENTS_NAMESPACE_WRITE::FullEventFragment RawEventWrite
data type for writing raw event
Definition: RawEvent.h:39
LVL1BS::L1CaloSrcIdMap::slink
int slink(uint32_t code) const
Return slink from unpacked moduleID.
Definition: L1CaloSrcIdMap.cxx:73
LVL1BS::PpmByteStreamV1Tool::TriggerTowerMapConst
std::map< unsigned int, const LVL1::TriggerTower * > TriggerTowerMapConst
Definition: PpmByteStreamV1Tool.h:87
LVL1BS::PpmByteStreamV1Tool::printCompStats
void printCompStats() const
Print compression stats.
Definition: PpmByteStreamV1Tool.cxx:1071
LVL1BS::PpmSubBlockV1::timeout
bool timeout(int chan) const
Definition: PpmSubBlockV1.h:223
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::L1CaloSubBlock::ERROR_MISSING_HEADER
@ ERROR_MISSING_HEADER
Definition: L1CaloSubBlock.h:33
LVL1BS::PpmByteStreamV1Tool::slinkSlices
bool slinkSlices(int crate, int module, int modulesPerSlink, int &slicesLut, int &slicesFadc, int &trigLut, int &trigFadc, const TriggerTowerMapConst &ttEmMap, const TriggerTowerMapConst &ttHadMap, LVL1::TriggerTowerKey &towerKey) const
Get number of slices and triggered slice offsets for next slink.
Definition: PpmByteStreamV1Tool.cxx:1147
LVL1::DataError
Error data.
Definition: DataError.h:27
LVL1BS::L1CaloSubBlock::unpackErrorCode
int unpackErrorCode() const
Return the unpacking error code.
Definition: L1CaloSubBlock.h:343
plotting.yearwise_efficiency.channel
channel
Definition: yearwise_efficiency.py:24
LVL1BS::PpmByteStreamV1Tool::makeSourceIDs
std::vector< uint32_t > makeSourceIDs(bool spareChannels, bool muonChannels) const
Definition: PpmByteStreamV1Tool.cxx:1222
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
LVL1BS::PpmByteStreamV1Tool::m_ppmMaps
ToolHandle< LVL1::IL1CaloMappingTool > m_ppmMaps
Property: Channel mapping tool.
Definition: PpmByteStreamV1Tool.h:151
FullEventAssembler
Template class for assembling a full atlas raw event from subfragments.
Definition: FullEventAssembler.h:40
LVL1BS::L1CaloUserHeader::lowerBound
int lowerBound() const
Return FADC lower bound.
Definition: L1CaloUserHeader.h:133
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
LVL1BS::PpmByteStreamV1Tool::m_sms
ServiceHandle< SegMemSvc > m_sms
Memory pool service.
Definition: PpmByteStreamV1Tool.h:155
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::PpmByteStreamV1Tool::MAXFORMATS
static constexpr unsigned int MAXFORMATS
Vector for compression statistics.
Definition: PpmByteStreamV1Tool.h:194
LVL1BS::PpmByteStreamV1Tool::m_forceSlicesFadc
int m_forceSlicesFadc
Property: Force number of FADC slices in bytestream.
Definition: PpmByteStreamV1Tool.h:174
LVL1::DataError::ModuleError
@ ModuleError
Definition: DataError.h:41
LVL1BS::PpmByteStreamV1Tool::m_compStats
std::atomic< uint32_t > m_compStats[MAXFORMATS]
Definition: PpmByteStreamV1Tool.h:195
LVL1BS::L1CaloSubBlock::ERROR_DUPLICATE_ROB
@ ERROR_DUPLICATE_ROB
Definition: L1CaloSubBlock.h:31
min
constexpr double min()
Definition: ap_fixedTest.cxx:26
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::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::PpmByteStreamV1Tool::findLayerTriggerTower
const LVL1::TriggerTower * findLayerTriggerTower(double eta, double phi, int layer, const TriggerTowerMapConst &ttEmMap, const TriggerTowerMapConst &ttHadMap, LVL1::TriggerTowerKey &towerKey) const
Find a trigger tower using separate layer maps.
Definition: PpmByteStreamV1Tool.cxx:1083
LVL1BS::PpmByteStreamV1Tool::sourceIDs
const std::vector< uint32_t > & sourceIDs(const std::string &sgKey) const
Return reference to vector with all possible Source Identifiers.
Definition: PpmByteStreamV1Tool.cxx:1256
LVL1BS::L1CaloSubBlock::write
void write(FullEventAssembler< L1CaloSrcIdMap >::RODDATA *theROD) const
Output complete packed sub-block to ROD vector.
Definition: L1CaloSubBlock.cxx:165
AthCommonMsg< AlgTool >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
LVL1BS::L1CaloSrcIdMap::getRobID
uint32_t getRobID(uint32_t rod_id) const
Make a ROB Source ID from a ROD source ID.
Definition: L1CaloSrcIdMap.cxx:32
ModifySlices.h
LVL1BS::PpmSubBlockV1::setRunNumber
void setRunNumber(int run)
Definition: PpmSubBlockV1.h:338
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
vec
std::vector< size_t > vec
Definition: CombinationsGeneratorTest.cxx:12
LVL1BS::PpmByteStreamV1Tool::~PpmByteStreamV1Tool
virtual ~PpmByteStreamV1Tool()
Definition: PpmByteStreamV1Tool.cxx:106
LVL1BS::PpmByteStreamV1Tool::m_dfltSlicesFadc
int m_dfltSlicesFadc
Property: Default number of FADC slices in simulation.
Definition: PpmByteStreamV1Tool.h:170
trigbs_dumpHLTContentInBS.stats
stats
Definition: trigbs_dumpHLTContentInBS.py:91
LVL1BS::PpmByteStreamV1Tool::PpmByteStreamV1Tool
PpmByteStreamV1Tool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: PpmByteStreamV1Tool.cxx:52
LVL1BS::PpmByteStreamV1Tool::TriggerTowerMap
std::map< unsigned int, int > TriggerTowerMap
Definition: PpmByteStreamV1Tool.h:85
LVL1BS::PpmByteStreamV1Tool::m_pedestal
int m_pedestal
Property: Pedestal value.
Definition: PpmByteStreamV1Tool.h:180
XMLtoHeader.count
count
Definition: XMLtoHeader.py:85
LVL1BS::PpmSubBlockV1::pack
bool pack()
Pack data.
Definition: PpmSubBlockV1.cxx:236
ITkPixEncoding::lut
constexpr auto lut(Generator &&f)
Definition: ITkPixQCoreEncodingLUT.h:19
LVL1BS::L1CaloSubBlock::HEADER
@ HEADER
Definition: L1CaloSubBlock.h:27
SegMemSvc::JOB
@ JOB
Definition: SegMemSvc.h:37
LVL1BS::L1CaloSubBlock::crate
int crate() const
Definition: L1CaloSubBlock.h:263
python.selector.AtlRunQuerySelectorLhcOlc.sd
sd
Definition: AtlRunQuerySelectorLhcOlc.py:612
LVL1::DataError::SubStatusWord
@ SubStatusWord
Definition: DataError.h:44
DataVector::assign
void assign(InputIterator first, InputIterator last)
Assign from iterators.
LVL1BS::L1CaloUserHeader::setPpmFadc
void setPpmFadc(int offset)
Definition: L1CaloUserHeader.h:165
LVL1BS::PpmByteStreamV1Tool::m_sourceIDsProp
std::vector< uint32_t > m_sourceIDsProp
Property: ROB source IDs.
Definition: PpmByteStreamV1Tool.h:188
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
python.PyAthena.module
module
Definition: PyAthena.py:131
LVL1BS::PpmSubBlockV1::setPedestal
void setPedestal(int pedval)
Definition: PpmSubBlockV1.h:323
LVL1BS::PpmByteStreamV1Tool::m_crateMax
int m_crateMax
Property: Maximum crate number when writing out bytestream.
Definition: PpmByteStreamV1Tool.h:178
LVL1BS::PpmByteStreamV1Tool::s_channels
static const int s_channels
Definition: PpmByteStreamV1Tool.h:199
LVL1BS::PpmByteStreamV1Tool::s_crates
static const int s_crates
Definition: PpmByteStreamV1Tool.h:197
LVL1BS::L1CaloUserHeader::ppmFadc
int ppmFadc() const
Definition: L1CaloUserHeader.h:127
LVL1BS::PpmSubBlockV1::setPpmErrorHeader
void setPpmErrorHeader(int version, int format, int crate, int module, int slicesFadc, int slicesLut)
Store PPM error block header.
Definition: PpmSubBlockV1.cxx:79
LVL1BS::L1CaloSubBlock::ERROR_ROD_ID
@ ERROR_ROD_ID
Definition: L1CaloSubBlock.h:31
LVL1BS::PpmByteStreamV1Tool::m_fadcBaseline
int m_fadcBaseline
Property: FADC baseline lower bound.
Definition: PpmByteStreamV1Tool.h:182
LVL1BS::PpmByteStreamV1Tool::finalize
virtual StatusCode finalize() override
Definition: PpmByteStreamV1Tool.cxx:126
LVL1BS::PpmSubBlockV1::ppmError
int ppmError(int chan) const
Return the error word for a data channel.
Definition: PpmSubBlockV1.cxx:206
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::L1CaloSubBlock::ERROR_CRATE_NUMBER
@ ERROR_CRATE_NUMBER
Definition: L1CaloSubBlock.h:34
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:93
dqt_zlumi_pandas.err
err
Definition: dqt_zlumi_pandas.py:182
lumiFormat.i
int i
Definition: lumiFormat.py:85
LVL1BS::PpmSubBlockV1::bunchMismatch
bool bunchMismatch(int chan) const
Definition: PpmSubBlockV1.h:208
ReadCellNoiseFromCool.chan
chan
Definition: ReadCellNoiseFromCool.py:52
L1CaloSubBlock.h
LVL1BS::L1CaloUserHeader::ppmLut
int ppmLut() const
Definition: L1CaloUserHeader.h:121
LVL1BS::L1CaloSubBlock::ERROR_DUPLICATE_DATA
@ ERROR_DUPLICATE_DATA
Definition: L1CaloSubBlock.h:35
LVL1BS::PpmByteStreamV1Tool::addCompStats
void addCompStats(const std::vector< uint32_t > &stats) const
Add compression stats to totals.
Definition: PpmByteStreamV1Tool.cxx:1058
beamspotman.n
n
Definition: beamspotman.py:731
LVL1BS::PpmByteStreamV1Tool::m_version
const int m_version
Sub_block header version.
Definition: PpmByteStreamV1Tool.h:158
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::DataError::set
void set(ErrorBit bit, int value=1)
Set an error bit or data.
Definition: DataError.cxx:28
LVL1BS::PpmByteStreamV1Tool::m_subDetector
const eformat::SubDetector m_subDetector
Sub-detector type.
Definition: PpmByteStreamV1Tool.h:190
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
LVL1BS::L1CaloSrcIdMap::crate
int crate(uint32_t code) const
Return crate from unpacked moduleID.
Definition: L1CaloSrcIdMap.cxx:57
master.flag
bool flag
Definition: master.py:29
LVL1BS::PpmByteStreamV1Tool::m_zeroSuppress
int m_zeroSuppress
Property: Zero suppression on input.
Definition: PpmByteStreamV1Tool.h:186
LVL1BS::PpmByteStreamV1Tool::ATLAS_THREAD_SAFE
SG::SlotSpecificObj< SlotData > m_slotData ATLAS_THREAD_SAFE
Definition: PpmByteStreamV1Tool.h:147
LVL1BS::PpmByteStreamV1Tool::RODPointer
OFFLINE_FRAGMENTS_NAMESPACE::PointerType RODPointer
Definition: PpmByteStreamV1Tool.h:91
LVL1BS::PpmSubBlockV1::mcmAbsent
bool mcmAbsent(int chan) const
Definition: PpmSubBlockV1.h:228
LVL1BS::PpmByteStreamV1Tool::printVec
void printVec(const std::vector< int > &vec) const
Print a vector.
Definition: PpmByteStreamV1Tool.cxx:1289
LVL1BS::L1CaloUserHeader::setLowerBound
void setLowerBound(int bound)
Set FADC lower bound.
Definition: L1CaloUserHeader.h:171
LVL1BS::L1CaloSubBlock::format
int format() const
Definition: L1CaloSubBlock.h:248
test_pyathena.parent
parent
Definition: test_pyathena.py:15
python.xAODType.dummy
dummy
Definition: xAODType.py:4
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
LVL1BS::L1CaloUserHeader::setVersion
void setVersion(int minorVersion)
Set version flag.
Definition: L1CaloUserHeader.h:176
LVL1BS::PpmByteStreamV1Tool::m_srcIdMap
const L1CaloSrcIdMap m_srcIdMap
Source ID converter.
Definition: PpmByteStreamV1Tool.h:192
IROBDataProviderSvc::VROBFRAG
std::vector< const ROBF * > VROBFRAG
Definition: IROBDataProviderSvc.h:27
LVL1BS::PpmSubBlockV1::compStats
const std::vector< uint32_t > & compStats() const
Return reference to compression stats.
Definition: PpmSubBlockV1.h:373
LVL1BS::L1CaloSubBlock::ERROR_NONE
@ ERROR_NONE
Definition: L1CaloSubBlock.h:31
DataVector< LVL1::TriggerTower >
LVL1BS::PpmByteStreamV1Tool::m_printCompStats
int m_printCompStats
Property: Compression statistics print flag.
Definition: PpmByteStreamV1Tool.h:164
LVL1BS::PpmSubBlockV1::asicFull
bool asicFull(int chan) const
Definition: PpmSubBlockV1.h:218
beamspotman.stat
stat
Definition: beamspotman.py:266
LVL1BS::L1CaloSubBlock::wordType
static SubBlockWordType wordType(uint32_t word)
Word identification.
Definition: L1CaloSubBlock.cxx:479
FullEventAssembler.h
DataError.h
LVL1::DataError::error
int error() const
Return the full error word.
Definition: DataError.h:78
LVL1BS::L1CaloSubBlock::COMPRESSED
@ COMPRESSED
Definition: L1CaloSubBlock.h:28
LVL1BS::PpmByteStreamV1Tool::ROBIterator
IROBDataProviderSvc::VROBFRAG::const_iterator ROBIterator
Definition: PpmByteStreamV1Tool.h:89
LVL1BS::PpmSubBlockV1::eventMismatch
bool eventMismatch(int chan) const
Definition: PpmSubBlockV1.h:213
LVL1BS::PpmSubBlockV1::setPpmHeader
void setPpmHeader(int version, int format, int seqno, int crate, int module, int slicesFadc, int slicesLut)
Store PPM header.
Definition: PpmSubBlockV1.cxx:68
LVL1BS::L1CaloSubBlock::unpackErrorMsg
std::string unpackErrorMsg() const
Return the unpacking error message for printing.
Definition: L1CaloSubBlock.cxx:228
LVL1BS::PpmByteStreamV1Tool::interfaceID
static const InterfaceID & interfaceID()
AlgTool InterfaceID.
Definition: PpmByteStreamV1Tool.cxx:45
LVL1BS::PpmSubBlockV1
Sub-Block class for PPM data.
Definition: PpmSubBlockV1.h:20
FullEventAssembler::clear
void clear()
Clear internal stack.
LVL1BS::L1CaloSubBlock::version
int version() const
Definition: L1CaloSubBlock.h:243
LVL1::TriggerTower
Trigger towers are the inputs to all other parts of the calorimeter trigger.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/TriggerTower.h:45
LVL1BS::PpmSubBlockV1::clear
void clear()
Clear all data.
Definition: PpmSubBlockV1.cxx:56
LVL1BS::PpmSubBlockV1::setFadcOffset
void setFadcOffset(int offset)
Definition: PpmSubBlockV1.h:318
Trk::index2
@ index2
Definition: BoundarySurfaceFace.h:49
LVL1BS::PpmSubBlockV1::channelsPerSubBlock
int channelsPerSubBlock(int version, int format)
Return the number of channels per sub-block.
Definition: PpmSubBlockV1.cxx:457
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
debug
const bool debug
Definition: MakeUncertaintyPlots.cxx:53
LVL1BS::PpmByteStreamV1Tool::s_dataSize
static const int s_dataSize
Definition: PpmByteStreamV1Tool.h:200
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::PpmSubBlockV1::errorBlock
static bool errorBlock(uint32_t word)
Check if a header word is for an error block.
Definition: PpmSubBlockV1.cxx:490
LVL1BS::L1CaloUserHeader::words
int words() const
Return number of header words (should be one)
Definition: L1CaloUserHeader.h:94
LVL1BS::PpmByteStreamV1Tool::TriggerTowerVector
std::vector< LVL1::TriggerTower * > TriggerTowerVector
Definition: PpmByteStreamV1Tool.h:84
PixelModuleFeMask_create_db.payload
string payload
Definition: PixelModuleFeMask_create_db.py:69
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
LVL1BS::PpmSubBlockV1::setLutOffset
void setLutOffset(int offset)
Definition: PpmSubBlockV1.h:313
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::L1CaloSubBlock::ERROR_MISSING_SUBBLOCK
@ ERROR_MISSING_SUBBLOCK
Definition: L1CaloSubBlock.h:33
DeMoAtlasDataLoss.runNumber
string runNumber
Definition: DeMoAtlasDataLoss.py:64
LVL1BS::PpmByteStreamV1Tool::m_slinks
int m_slinks
Property: Number of slinks per crate when writing out bytestream.
Definition: PpmByteStreamV1Tool.h:166
DeMoScan.index
string index
Definition: DeMoScan.py:364
LVL1BS::PpmSubBlockV1::glinkPinParity
bool glinkPinParity(int chan) const
Definition: PpmSubBlockV1.h:198
LVL1BS::PpmSubBlockV1::fpgaCorrupt
bool fpgaCorrupt(int chan) const
Definition: PpmSubBlockV1.h:203
LVL1::DataError::PPMErrorWord
@ PPMErrorWord
Definition: DataError.h:44
FullEventAssembler::setRodMinorVersion
void setRodMinorVersion(uint16_t m)
change the ROD minor version
LVL1BS::PpmSubBlockV1::setFadcThreshold
void setFadcThreshold(int threshold)
Definition: PpmSubBlockV1.h:333
LVL1BS::PpmByteStreamV1Tool::ChannelBitVector
std::vector< uint32_t > ChannelBitVector
Definition: PpmByteStreamV1Tool.h:88
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
LVL1BS::L1CaloSubBlock::ERROR_SLICES
@ ERROR_SLICES
Definition: L1CaloSubBlock.h:35
python.TriggerHandler.verbose
verbose
Definition: TriggerHandler.py:297
re
const boost::regex re(r_e)
DEBUG
#define DEBUG
Definition: page_access.h:11
PpmByteStreamV1Tool.h
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
LVL1BS
Definition: ZdcModifySlices.h:10
LVL1BS::PpmSubBlockV1::ppmData
void ppmData(int chan, std::vector< int > &lut, std::vector< int > &fadc, std::vector< int > &bcidLut, std::vector< int > &bcidFadc)
Return unpacked data for given channel.
Definition: PpmSubBlockV1.cxx:144
SegMemSvc.h
LVL1BS::PpmSubBlockV1::unpack
bool unpack()
Unpack data.
Definition: PpmSubBlockV1.cxx:269
LVL1BS::L1CaloSubBlock::ERROR_MODULE_NUMBER
@ ERROR_MODULE_NUMBER
Definition: L1CaloSubBlock.h:34
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
LVL1BS::PpmByteStreamV1Tool::convert
StatusCode convert(const std::string &sgKey, const IROBDataProviderSvc::VROBFRAG &robFrags, DataVector< LVL1::TriggerTower > *ttCollection) const
Convert ROB fragments to trigger towers.
Definition: PpmByteStreamV1Tool.cxx:139
L1CaloSrcIdMap.h
LVL1BS::PpmSubBlockV1::fillPpmData
void fillPpmData(int chan, const std::vector< int > &lut, const std::vector< int > &fadc, const std::vector< int > &bcidLut, const std::vector< int > &bcidFadc)
Store PPM data for later packing.
Definition: PpmSubBlockV1.cxx:110
FullEventAssembler::RODDATA
std::vector< uint32_t > RODDATA
ROD data as a vector of unsigned int.
Definition: FullEventAssembler.h:54
LVL1BS::PpmByteStreamV1Tool::initialize
virtual StatusCode initialize() override
Definition: PpmByteStreamV1Tool.cxx:113
LVL1BS::PpmByteStreamV1Tool::m_crateMin
int m_crateMin
Property: Minimum crate number when writing out bytestream.
Definition: PpmByteStreamV1Tool.h:176
LVL1BS::PpmByteStreamV1Tool::m_fadcThreshold
int m_fadcThreshold
Property: FADC threshold for super-compressed format.
Definition: PpmByteStreamV1Tool.h:184
LVL1BS::PpmByteStreamV1Tool::m_forceSlicesLut
int m_forceSlicesLut
Property: Force number of LUT slices in bytestream.
Definition: PpmByteStreamV1Tool.h:172
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:14
AthAlgTool
Definition: AthAlgTool.h:26
LVL1::DataError::get
int get(ErrorBit bit) const
Return an error bit or data.
Definition: DataError.cxx:48
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::L1CaloSubBlock::seqno
int seqno() const
Definition: L1CaloSubBlock.h:253
LVL1BS::PpmByteStreamV1Tool::ROBPointer
OFFLINE_FRAGMENTS_NAMESPACE::PointerType ROBPointer
Definition: PpmByteStreamV1Tool.h:90
LVL1BS::PpmByteStreamV1Tool::SlotData
Definition: PpmByteStreamV1Tool.h:124
checker_macros.h
Define macros for attributes used to control the static checker.
LVL1BS::PpmByteStreamV1Tool::setupTTMaps
void setupTTMaps(const TriggerTowerCollection *ttCollection, TriggerTowerMapConst &ttEmMap, TriggerTowerMapConst &ttHadMap, LVL1::TriggerTowerKey &towerKey) const
Set up separate Em and Had trigger tower maps.
Definition: PpmByteStreamV1Tool.cxx:1107
error
Definition: IImpactPoint3dEstimator.h:70
LVL1BS::L1CaloUserHeader::isValid
static bool isValid(uint32_t word)
Test for valid header word.
Definition: L1CaloUserHeader.cxx:36
TileDCSDataPlotter.tt
tt
Definition: TileDCSDataPlotter.py:874
TriggerTower.h
LVL1BS::L1CaloSubBlock::setStatus
void setStatus(uint32_t failingBCN, bool glinkTimeout, bool glinkDown, bool upstreamError, bool daqOverflow, bool bcnMismatch, bool glinkProtocol, bool glinkParity)
Store error status trailer.
Definition: L1CaloSubBlock.cxx:179
LVL1BS::L1CaloSrcIdMap::daqOrRoi
int daqOrRoi(uint32_t code) const
Return daqOrRoi from unpacked moduleID.
Definition: L1CaloSrcIdMap.cxx:65
LVL1BS::PpmByteStreamV1Tool::m_dataFormat
int m_dataFormat
Property: Data compression format.
Definition: PpmByteStreamV1Tool.h:160
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::L1CaloUserHeader::setPpmLut
void setPpmLut(int offset)
Definition: L1CaloUserHeader.h:159
LVL1BS::PpmByteStreamV1Tool::s_modules
static const int s_modules
Definition: PpmByteStreamV1Tool.h:198
FullEventAssembler::getRodData
RODDATA * getRodData(uint32_t id)
get a block of ROD data
LVL1BS::PpmSubBlockV1::setFadcBaseline
void setFadcBaseline(int baseline)
Definition: PpmSubBlockV1.h:328
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
FullEventAssembler::fill
void fill(RawEventWrite *re, MsgStream &log)
Fill the FullEventFragment with all the ROD data stored in this.
xAOD::TriggerTower
TriggerTower_v2 TriggerTower
Define the latest version of the TriggerTower class.
Definition: Event/xAOD/xAODTrigL1Calo/xAODTrigL1Calo/TriggerTower.h:16
LVL1BS::L1CaloSubBlock::UNCOMPRESSED
@ UNCOMPRESSED
Definition: L1CaloSubBlock.h:28
LVL1BS::PpmByteStreamV1Tool::m_compVers
const int m_compVers
Compression version.
Definition: PpmByteStreamV1Tool.h:162
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
LVL1BS::PpmByteStreamV1Tool::m_errorTool
ToolHandle< LVL1BS::L1CaloErrorByteStreamTool > m_errorTool
Property: Error collection tool.
Definition: PpmByteStreamV1Tool.h:153