ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
ZdcByteStreamTool Class Reference

Tool to perform ROB fragments to ZdcDigits and from ZdcDigits to raw data conversions. More...

#include <ZdcByteStreamTool.h>

Inheritance diagram for ZdcByteStreamTool:
Collaboration diagram for ZdcByteStreamTool:

Public Member Functions

 ZdcByteStreamTool (const std::string &type, const std::string &name, const IInterface *parent)
 
virtual StatusCode initialize () override
 
virtual StatusCode finalize () override
 
StatusCode convert (const IROBDataProviderSvc::VROBFRAG &robFrags, ZdcDigitsCollection *ttCollection)
 Convert ROB fragments to ZdcCollection. More...
 
const std::vector< uint32_t > & sourceIDs ()
 Return reference to vector with all possible Source Identifiers. More...
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Static Public Member Functions

static const InterfaceID & interfaceID ()
 AlgTool InterfaceID. More...
 
static StatusCode convert (const ZdcDigitsCollection *ttCollection, RawEventWrite *re)
 Convert ZdcCollection to ROB fragments. More...
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Private Types

typedef std::map< unsigned int, ZdcDigits * > ZdcDigitsMap
 
typedef std::map< unsigned int, const ZdcDigits * > ZdcDigitsMapConst
 
typedef IROBDataProviderSvc::VROBFRAG::const_iterator ROBIterator
 
typedef OFFLINE_FRAGMENTS_NAMESPACE::PointerType RODPointer
 
typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

void addCompStats (const std::vector< uint32_t > &stats)
 Add compression stats to totals. More...
 
void printCompStats () const
 Print compression stats. More...
 
void printVec (const std::vector< int > &vec) const
 Print a vector. More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

int m_dataFormat
 Sub_block header version. More...
 
int m_printCompStats
 Compression version. More...
 
int m_channels
 Number of channels per module (may not all be used) More...
 
int m_crates
 Number of crates. More...
 
int m_slinks
 Number of modules per crate (may not all exist) More...
 
int m_dfltSlicesLut
 Default number of LUT slices in simulation. More...
 
int m_dfltSlicesFadc
 Default number of FADC slices in simulation. More...
 
int m_forceSlicesLut
 Force number of LUT slices in bytestream. More...
 
int m_forceSlicesFadc
 Force number of FADC slices in bytestream. More...
 
int m_pedestal
 Pedestal value. More...
 
int m_fadcBaseline
 FADC baseline lower bound. More...
 
int m_fadcThreshold
 FADC threshold for super-compressed format. More...
 
int m_zeroSuppress
 Zero suppression on input. More...
 
std::vector< uint32_t > m_sourceIDs
 ROB source IDs. More...
 
eformat::SubDetector m_subDetector
 Sub-detector type. More...
 
ZdcSrcIdMapm_srcIdMap
 Source ID converter. More...
 
ZdcPpmSubBlockm_errorBlock {}
 Trigger tower key provider. More...
 
DataVector< ZdcPpmSubBlockm_ppmBlocks
 Vector for current PPM sub-blocks. More...
 
std::vector< uint32_t > m_compStats
 Vector for compression statistics. More...
 
std::vector< uint32_t > * m_rodStatus
 ROD Status words. More...
 
std::map< uint32_t, std::vector< uint32_t > * > m_rodStatusMap
 ROD status map. More...
 
const ZdcIDm_zdcID {}
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

Tool to perform ROB fragments to ZdcDigits and from ZdcDigits to raw data conversions.

Based on ROD Tool from Level1 from Peter Faulkner

Definition at line 53 of file ZdcByteStreamTool.h.

Member Typedef Documentation

◆ ROBIterator

typedef IROBDataProviderSvc::VROBFRAG::const_iterator ZdcByteStreamTool::ROBIterator
private

Definition at line 82 of file ZdcByteStreamTool.h.

◆ RODPointer

Definition at line 83 of file ZdcByteStreamTool.h.

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

◆ ZdcDigitsMap

typedef std::map<unsigned int, ZdcDigits*> ZdcByteStreamTool::ZdcDigitsMap
private

Definition at line 80 of file ZdcByteStreamTool.h.

◆ ZdcDigitsMapConst

typedef std::map<unsigned int, const ZdcDigits*> ZdcByteStreamTool::ZdcDigitsMapConst
private

Definition at line 81 of file ZdcByteStreamTool.h.

Constructor & Destructor Documentation

◆ ZdcByteStreamTool()

ZdcByteStreamTool::ZdcByteStreamTool ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

Definition at line 46 of file ZdcByteStreamTool.cxx.

48  :
50  //m_version(1),
51  //m_compVers(4),
52  m_channels(64),
53  m_crates(8),
54  //m_modules(16),
55  m_subDetector(eformat::FORWARD_ZDC),
56  m_srcIdMap(nullptr),
57  //m_towerKey(0),
58  //m_errorBlock(0),
59  m_rodStatus(nullptr)
60 
61 {
62  declareInterface<ZdcByteStreamTool> (this);
63 
64  declareProperty("PrintCompStats", m_printCompStats = 0, "Print compressed format statistics");
65 
66  // Properties for reading bytestream only
67  declareProperty("ZeroSuppress", m_zeroSuppress = 0,
68  "Only make trigger towers with non-zero EM or Had energy");
69  declareProperty("ROBSourceIDs", m_sourceIDs, "ROB fragment source identifiers");
70  declareProperty("PedestalValue", m_pedestal = 10,
71  "Pedestal value - needed for compressed formats 0,1 only");
72 
73  // Properties for writing bytestream only
74  declareProperty("DataFormat", m_dataFormat = 1, "Format identifier (0-3) in sub-block header");
75  declareProperty("FADCBaseline", m_fadcBaseline = 0,
76  "FADC baseline lower bound for compressed formats");
77  declareProperty("FADCThreshold", m_fadcThreshold = 1,
78  "FADC threshold for super-compressed format");
79  declareProperty("SlinksPerCrate", m_slinks = 4, "The number of S-Links per crate");
80  declareProperty("SimulSlicesLUT", m_dfltSlicesLut = 1,
81  "The number of LUT slices in the simulation");
82  declareProperty("SimulSlicesFADC", m_dfltSlicesFadc = 7,
83  "The number of FADC slices in the simulation");
84  declareProperty("ForceSlicesLUT", m_forceSlicesLut = 0,
85  "If >0, the number of LUT slices in bytestream");
86  declareProperty("ForceSlicesFADC", m_forceSlicesFadc = 0,
87  "If >0, the number of FADC slices in bytestream");
88 
89 }

Member Function Documentation

◆ addCompStats()

void ZdcByteStreamTool::addCompStats ( const std::vector< uint32_t > &  stats)
private

Add compression stats to totals.

Definition at line 576 of file ZdcByteStreamTool.cxx.

577 {
578  if (stats.empty()) return;
579  const int n = stats.size();
580  if (m_compStats.empty()) m_compStats.resize(n);
581  for (int i = 0; i < n; ++i)
582  m_compStats[i] += stats[i];
583 }

◆ convert() [1/2]

StatusCode ZdcByteStreamTool::convert ( const IROBDataProviderSvc::VROBFRAG robFrags,
ZdcDigitsCollection ttCollection 
)

Convert ROB fragments to ZdcCollection.

Definition at line 143 of file ZdcByteStreamTool.cxx.

145 {
146 
147  const bool debug = msgLvl(MSG::DEBUG);
148  //const bool debug = 1;
149  const bool verbose = msgLvl(MSG::VERBOSE);
150 
151 
152  if (debug) msg(MSG::DEBUG);
153  if (verbose) msg(MSG::VERBOSE);
154 
155  // Clear trigger tower map
156 
157  typedef std::map<uint32_t,ZdcDigits*> hashmapType;
158  hashmapType digits_map;
159 
160  // Loop over ROB fragments
161  //msg(MSG::INFO) << "ZDC: Inside EVENT !" << endmsg;
162  int robCount = 0;
163  ROBIterator rob = robFrags.begin();
164  ROBIterator robEnd = robFrags.end();
165  for (; rob != robEnd; ++rob)
166  {
167 
168  ++robCount;
169  if (debug)
170  {
171  msg() << "ZDC: Treating ROB fragment " << robCount << endmsg;
172  }
173 
174  // Unpack ROD data (slinks)
175 
176  RODPointer payloadBeg;
178  RODPointer payloadEnd;
179  (*rob)->rod_data(payloadBeg);
180  payloadEnd = payloadBeg + (*rob)->rod_ndata();
181  payload = payloadBeg;
182  if (payload == payloadEnd)
183  {
184  if (debug) msg() << "ZDC: ROB fragment empty" << endmsg;
185  continue;
186  }
187 
188  // Check identifier
189  const uint32_t sourceID = (*rob)->rod_source_id();
190  if (debug)
191  {
192  if (ZdcSrcIdMap::subDet(sourceID) != m_subDetector || ZdcSrcIdMap::daqOrRoi(sourceID)
193  != 0)
194  {
195  msg() << "ZDC: Wrong source identifier in data: " << MSG::hex << sourceID << MSG::dec
196  << endmsg;
197  }
198  }
199  const int rodCrate = ZdcSrcIdMap::crate(sourceID);
200  if (debug)
201  {
202  msg() << "ZDC: Treating crate " << rodCrate << " slink " << ZdcSrcIdMap::slink(sourceID)
203  << "From SubDetectorID " << ZdcSrcIdMap::subDet(sourceID) << endmsg;
204  }
205 
206  /* Comment out - this needs adaptation as there are too much L1 dialect in here
207  * for now I wnat ot compile/run the bytestream to esd convertion, as I know how
208  * to unpack the ppm data
209  *
210  */
211  // First word is User Header
212  ZdcUserHeader userHeader(*payload);
213  const int minorVersion = (*rob)->rod_version() & 0xffff;
214  userHeader.setVersion(minorVersion);
215  const int headerWords = userHeader.words();
216  if (headerWords != 1 && debug)
217  {
218  msg() << "ZDC: Unexpected number of user header words: " << headerWords << endmsg;
219  }
220  // Does this makes sense??? Look above headerWords == 1
221  for (int i = 0; i < headerWords; ++i)
222  ++payload;
223  // triggered slice offsets
224  const int trigLut = userHeader.ppmLut();
225  const int trigFadc = userHeader.ppmFadc();
226  // FADC baseline lower bound
227  m_fadcBaseline = userHeader.lowerBound();
228  if (debug)
229  {
230  msg() << "ZDC: Minor format version number: " << MSG::hex << minorVersion << MSG::dec
231  << endmsg << "ZDC: LUT triggered slice offset: " << trigLut << endmsg
232  << "ZDC: FADC triggered slice offset: " << trigFadc << endmsg
233  << "ZDC: FADC baseline lower bound: " << m_fadcBaseline << endmsg;
234  }
235  const int runNumber = (*rob)->rod_run_no() & 0xffffff;
236 
237  // Find the number of channels per sub-block
238  int chanPerSubBlock = 0;
239  if (payload != payloadEnd)
240  {
242  {
243  msg(MSG::ERROR) << "Missing Sub-block header" << endmsg;
244  return StatusCode::FAILURE;
245  }
246  ZdcPpmSubBlock testBlock;
247  //Fix coverity CID 19251
248  //payload = testBlock.read(payload, payloadEnd);
249  testBlock.read(payload, payloadEnd);
250  chanPerSubBlock = testBlock.channelsPerSubBlock();
251  if (chanPerSubBlock == 0)
252  {
253  msg(MSG::ERROR) << "Unsupported version/data format: " << testBlock.version()
254  << "/" << testBlock.format() << endmsg;
255  return StatusCode::FAILURE;
256  }
257  if (m_channels % chanPerSubBlock != 0)
258  {
259  msg(MSG::ERROR) << "Invalid channels per sub-block: " << chanPerSubBlock << endmsg;
260  return StatusCode::FAILURE;
261  }
262  if (debug) msg() << "Channels per sub-block: " << chanPerSubBlock << endmsg;
263  }
264  else
265  {
266  if (debug) msg() << "ROB fragment contains user header only" << endmsg;
267  continue;
268  }
269  const int numSubBlocks = m_channels / chanPerSubBlock;
270 
271  // Loop over PPMs
272 
273  payload = payloadBeg;
274  for (int i = 0; i < headerWords; ++i)
275  ++payload;
276  while (payload != payloadEnd)
277  {
278 
279  // Get all sub-blocks for one PPM
280 
281  int crate = 0;
282  int module = 0;
283  m_ppmBlocks.clear();
284  for (int block = 0; block < numSubBlocks; ++block)
285  {
288  {
289  msg(MSG::ERROR) << "Unexpected data sequence" << endmsg;
290  return StatusCode::FAILURE;
291  }
292  if (chanPerSubBlock != m_channels && ZdcSubBlock::seqno(*payload) != block
293  * chanPerSubBlock)
294  {
295  if (debug)
296  {
297  msg() << "Unexpected channel sequence number: "
298  << ZdcSubBlock::seqno(*payload) << " expected " << block
299  * chanPerSubBlock << endmsg;
300  }
301  if (!m_ppmBlocks.empty()) break;
302  else
303  {
304  if (!debug)
305  {
306  msg(MSG::ERROR) << "Unexpected channel sequence number" << endmsg;
307  }
308  return StatusCode::FAILURE;
309  }
310  }
311  ZdcPpmSubBlock* const subBlock = new ZdcPpmSubBlock();
312  m_ppmBlocks.push_back(subBlock);
313  payload = subBlock->read(payload, payloadEnd);
314  if (block == 0)
315  {
316  crate = subBlock->crate();
317  module = subBlock->module();
318  if (debug)
319  {
320  msg() << "Module " << module << endmsg;
321  if (crate != rodCrate)
322  {
323  msg() << "Inconsistent crate number in ROD source ID" << endmsg;
324  }
325  }
326  }
327  else
328  {
329  if (subBlock->crate() != crate)
330  {
331  msg(MSG::ERROR) << "Inconsistent crate number in sub-blocks" << endmsg;
332  return StatusCode::FAILURE;
333  }
334  if (subBlock->module() != module)
335  {
336  msg(MSG::ERROR) << "Inconsistent module number in sub-blocks" << endmsg;
337  return StatusCode::FAILURE;
338  }
339  }
340  if (payload == payloadEnd && block != numSubBlocks - 1)
341  {
342  if (debug) msg() << "Premature end of data" << endmsg;
343  break;
344  }
345  }
346 
347  // Is there an error block?
348 
349  //delete m_errorBlock;
350  //m_errorBlock = 0;
351  m_errorBlock->clear();
352  if (payload != payloadEnd)
353  {
356  {
357  if (debug) msg() << "Error block found" << endmsg;
358  //m_errorBlock = new ZdcPpmSubBlock();
359  payload = m_errorBlock->read(payload, payloadEnd);
360  if (m_errorBlock->crate() != crate)
361  {
362  msg(MSG::ERROR) << "Inconsistent crate number in error block" << endmsg;
363  return StatusCode::FAILURE;
364  }
365  if (m_errorBlock->module() != module)
366  {
367  msg(MSG::ERROR) << "Inconsistent module number in error block" << endmsg;
368  return StatusCode::FAILURE;
369  }
371  {
372  if (debug)
373  {
374  std::string errMsg(m_errorBlock->unpackErrorMsg());
375  msg() << "Unpacking error block failed: " << errMsg << endmsg;
376  }
377  }
378  //delete m_errorBlock;
379  }
380  }
381 
382  // Loop over sub-blocks and fill trigger towers
383 
384  const int actualSubBlocks = m_ppmBlocks.size();
385  for (int block = 0; block < actualSubBlocks; ++block)
386  {
387  ZdcPpmSubBlock* const subBlock = m_ppmBlocks[block];
388  subBlock->setLutOffset(trigLut);
389  subBlock->setFadcOffset(trigFadc);
390  subBlock->setPedestal(m_pedestal);
391  subBlock->setFadcBaseline(m_fadcBaseline);
392  subBlock->setRunNumber(runNumber);
393  if (debug)
394  {
395  msg() << "Unpacking sub-block version/format/seqno: " << subBlock->version()
396  << "/" << subBlock->format() << "/" << subBlock->seqno() << endmsg;
397  }
398  if (subBlock->dataWords() && !subBlock->unpack())
399  {
400  if (debug)
401  {
402  std::string errMsg(subBlock->unpackErrorMsg());
403  msg() << "Unpacking PPM sub-block failed: " << errMsg << endmsg;
404  }
405  }
406  if (m_printCompStats) addCompStats(subBlock->compStats());
407  for (int chan = 0; chan < chanPerSubBlock; ++chan)
408  {
409  const int channel = block * chanPerSubBlock + chan;
410  std::vector<int> lut;
411  std::vector<int> fadc;
412  std::vector<int> bcidLut;
413  std::vector<int> bcidFadc;
414  subBlock->ppmData(channel, lut, fadc, bcidLut, bcidFadc);
415 // int trigLutKeep = trigLut;
416 // int trigFadcKeep = trigFadc;
417  if (lut.size() < size_t(trigLut + 1))
418  {
419  if (debug)
420  {
421  msg() << "Triggered LUT slice from header "
422  << "inconsistent with number of slices: " << trigLut << ", "
423  << lut.size() << ", reset to 0" << endmsg;
424  }
425 // trigLutKeep = 0;
426  }
427  if (fadc.size() < size_t(trigFadc + 1))
428  {
429  if (debug)
430  {
431  msg() << "Triggered FADC slice from header "
432  << "inconsistent with number of slices: " << trigFadc << ", "
433  << fadc.size() << ", reset to 0" << endmsg;
434  }
435 // trigFadcKeep = 0;
436  }
437  /*
438  LVL1::DataError errorBits(0);
439  if (m_errorBlock)
440  {
441  errorBits.set(LVL1::DataError::PPMErrorWord,
442  m_errorBlock->ppmError(channel));
443  errorBits.set(LVL1::DataError::SubStatusWord, m_errorBlock->subStatus());
444  }
445  else
446  {
447  errorBits.set(LVL1::DataError::PPMErrorWord, subBlock->ppmError(channel));
448  const ZdcPpmSubBlock* const lastBlock = m_ppmBlocks[actualSubBlocks - 1];
449  errorBits.set(LVL1::DataError::SubStatusWord, lastBlock->subStatus());
450  }
451  // Wrong bit set for compressed formats 1.01 to 1.03
452  if (subBlock->format() > 1 && subBlock->seqno() < 4)
453  {
454  errorBits.set(LVL1::DataError::ModuleError, (errorBits.error()
455  >> (LVL1::DataError::ModuleError + 1)) & 0x1);
456  }
457  const int error = errorBits.error();
458  */
459  // Only save non-zero data
460 
461  const bool any = std::accumulate(lut.begin(), lut.end(), 0)
462  || std::accumulate(fadc.begin(), fadc.end(), 0)
463  || std::accumulate(bcidLut.begin(), bcidLut.end(), 0)
464  || std::accumulate(bcidFadc.begin(), bcidFadc.end(), 0);
465 
466 
467  // Channel as unpacked is a SLink channel ordering, which is different
468  // from PPM channel ordering
469  // the sequence is :
470  // All channel A MCM
471  // All channel D MCM
472  // All channel B MCM
473  // All channel C MCM
474  Identifier chan_id;
475 
476  int ppmChannel = subBlock->getPpmChannel(channel);
477 
478  msg(MSG::DEBUG) << "--> ZCS: " << ZdcCablingService::getInstance() << endmsg;
479  chan_id = ZdcCablingService::getInstance()->h2s_channel_id(module, ppmChannel);
480 
481  const uint32_t chan_hash = chan_id.get_identifier32().get_compact();
482  msg(MSG::DEBUG) << "chan_hash = " << chan_hash << endmsg;
483 
484  //Change after uncommenting the above
485  //if (any || error)
486  if (any)
487  {
490  if (debug)
491  {
492  msg(MSG::DEBUG) << endmsg;
493  msg(MSG::DEBUG) <<" --------------------------------------" << endmsg;
494  msg(MSG::DEBUG) <<
495  "--> ZDC: [SubDet., Crate, Mod., Slink Chn., PPM Chan.] ";
496  msg(MSG::DEBUG) <<
497  "[" << m_subDetector << ", " << crate << ", " <<
498  module << ", " << channel << "," << ppmChannel << "]" << endmsg;
499 
500  msg(MSG::DEBUG) << "--> ZDC: LUT: ";
501  printVec(lut);
502  msg(MSG::DEBUG) << endmsg;
503 
504  msg(MSG::DEBUG) << "--> ZDC: FADC: ";
505  printVec(fadc);
506  msg(MSG::DEBUG) << endmsg;
507 
508  msg(MSG::DEBUG) << "--> ZDC: bcidLUT: ";
509  printVec(bcidLut);
510  msg(MSG::DEBUG) << endmsg;
511 
512  msg(MSG::DEBUG) << "--> ZDC: bcidFADC: ";
513  printVec(bcidFadc);
514  msg(MSG::DEBUG) << endmsg;
515 
516  msg(MSG::DEBUG) << "--> ZDC ID: " << chan_id.getString() << endmsg;
517  msg(MSG::DEBUG) << "--> ID side: " << m_zdcID->side(chan_id) << endmsg;
518  msg(MSG::DEBUG) << "--> ID module: " << m_zdcID->module(chan_id) << endmsg;
519  msg(MSG::DEBUG) << "--> ID type: " << m_zdcID->type(chan_id) << endmsg;
520  msg(MSG::DEBUG) << "--> ID channel: " << m_zdcID->channel(chan_id) << endmsg;
521 
522  msg(MSG::DEBUG) << "gain=" << gain << " delay=" << delay << endmsg;
523 
524  msg(MSG::DEBUG) <<" --------------------------------------" << endmsg;
525 
526  }
527 
528  hashmapType::iterator iter = digits_map.find(chan_hash);
529  if (iter == digits_map.end())
530  {
531  digits_map.insert(std::pair<uint32_t,ZdcDigits*>(chan_hash,new ZdcDigits(chan_id)));
532  iter = digits_map.find(chan_hash);
533  }
534  if (iter != digits_map.end())
535  {
536  if (gain==0&&delay==0) (*iter).second->set_digits_gain0_delay0(fadc);
537  if (gain==1&&delay==0) (*iter).second->set_digits_gain1_delay0(fadc);
538  if (gain==0&&delay==1) (*iter).second->set_digits_gain0_delay1(fadc);
539  if (gain==1&&delay==1) (*iter).second->set_digits_gain1_delay1(fadc);
540  }
541 
542  }
543  }
544  }
545  }
546  }
547 
548  hashmapType::iterator iter = digits_map.begin();
549  hashmapType::iterator iter_end = digits_map.end();
550 
551  while (iter != iter_end)
552  {
553  ttCollection->push_back((*iter).second);
554  ++iter;
555  }
556 
557  msg(MSG::DEBUG) << "-->ZDC: Collection has " << ttCollection->size() << " elements " << endmsg;
558 
559  return StatusCode::SUCCESS;
560 }

◆ convert() [2/2]

StatusCode ZdcByteStreamTool::convert ( const ZdcDigitsCollection ttCollection,
RawEventWrite re 
)
static

Convert ZdcCollection to ROB fragments.

Definition at line 565 of file ZdcByteStreamTool.cxx.

567 {
568  //if (re) ttCollection->size();
569  //See PpmByteStreamTool for a implementation
570  return StatusCode::SUCCESS;
571 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ finalize()

StatusCode ZdcByteStreamTool::finalize ( )
overridevirtual

Definition at line 125 of file ZdcByteStreamTool.cxx.

126 {
127  if (m_printCompStats && msgLvl(MSG::INFO))
128  {
129  msg(MSG::INFO);
130  printCompStats();
131  }
132 
133  delete m_rodStatus;
134  delete m_errorBlock;
135  //delete m_towerKey;
136  delete m_srcIdMap;
137  return StatusCode::SUCCESS;
138 }

◆ initialize()

StatusCode ZdcByteStreamTool::initialize ( )
overridevirtual

Definition at line 93 of file ZdcByteStreamTool.cxx.

94 {
95  /*
96  * This would be used for crate/module/channel to eta/phi/layer mappings
97  StatusCode sc = m_zdcMaps.retrieve();
98  if (sc.isFailure())
99  {
100  msg(MSG::ERROR) << "Failed to retrieve tool " << m_zdcMaps << endmsg;
101  return sc;
102  }
103  else msg(MSG::INFO) << "Retrieved tool " << m_zdcMaps << endmsg;
104  */
105  m_srcIdMap = new ZdcSrcIdMap();
107  m_rodStatus = new std::vector<uint32_t>(2);
108 
109  const ZdcID* zdcID = nullptr;
110  if (detStore()->retrieve( zdcID ).isFailure() ) {
111  msg(MSG::ERROR) << "execute: Could not retrieve ZdcID object from the detector store" << endmsg;
112  return StatusCode::FAILURE;
113  }
114  else {
115  msg(MSG::DEBUG) << "execute: retrieved ZdcID" << endmsg;
116  }
117  m_zdcID = zdcID;
118 
119  return StatusCode::SUCCESS;
120 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ interfaceID()

const InterfaceID & ZdcByteStreamTool::interfaceID ( )
static

AlgTool InterfaceID.

Definition at line 40 of file ZdcByteStreamTool.cxx.

41 {
42  return IID_IZdcByteStreamTool;
43 }

◆ msg() [1/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ printCompStats()

void ZdcByteStreamTool::printCompStats ( ) const
private

Print compression stats.

Definition at line 588 of file ZdcByteStreamTool.cxx.

589 {
590  msg() << "Compression stats format/count: ";
591  const int n = m_compStats.size();
592  for (int i = 0; i < n; ++i)
593  {
594  msg() << " " << i << "/" << m_compStats[i];
595  }
596  msg() << endmsg;
597 }

◆ printVec()

void ZdcByteStreamTool::printVec ( const std::vector< int > &  vec) const
private

Print a vector.

Definition at line 622 of file ZdcByteStreamTool.cxx.

623 {
624  std::vector<int>::const_iterator pos;
625  //msg() << "-----> " ;
626  for (pos = vec.begin(); pos != vec.end(); ++pos)
627  {
628  if (pos != vec.begin()) msg() << ",";
629  msg() << *pos;
630  }
631  //msg() << endmsg;
632 }

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ sourceIDs()

const std::vector< uint32_t > & ZdcByteStreamTool::sourceIDs ( )

Return reference to vector with all possible Source Identifiers.

Definition at line 602 of file ZdcByteStreamTool.cxx.

603 {
604  if (m_sourceIDs.empty()) {
605  const int maxlinks = ZdcSrcIdMap::maxSlinks();
606  for (int crate = 0; crate < m_crates; ++crate) {
607  for (int slink = 0; slink < maxlinks; ++slink) {
608  const int daqOrRoi = 0;
609  const uint32_t rodId = ZdcSrcIdMap::getRodID(crate, slink, daqOrRoi,
610  m_subDetector);
611  const uint32_t robId = ZdcSrcIdMap::getRobID(rodId);
612  m_sourceIDs.push_back(robId);
613  }
614  }
615  }
616  return m_sourceIDs;
617 }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_channels

int ZdcByteStreamTool::m_channels
private

Number of channels per module (may not all be used)

Definition at line 101 of file ZdcByteStreamTool.h.

◆ m_compStats

std::vector<uint32_t> ZdcByteStreamTool::m_compStats
private

Vector for compression statistics.

Definition at line 135 of file ZdcByteStreamTool.h.

◆ m_crates

int ZdcByteStreamTool::m_crates
private

Number of crates.

Definition at line 103 of file ZdcByteStreamTool.h.

◆ m_dataFormat

int ZdcByteStreamTool::m_dataFormat
private

Sub_block header version.

Data compression format

Definition at line 95 of file ZdcByteStreamTool.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_dfltSlicesFadc

int ZdcByteStreamTool::m_dfltSlicesFadc
private

Default number of FADC slices in simulation.

Definition at line 111 of file ZdcByteStreamTool.h.

◆ m_dfltSlicesLut

int ZdcByteStreamTool::m_dfltSlicesLut
private

Default number of LUT slices in simulation.

Definition at line 109 of file ZdcByteStreamTool.h.

◆ m_errorBlock

ZdcPpmSubBlock* ZdcByteStreamTool::m_errorBlock {}
private

Trigger tower key provider.

Definition at line 131 of file ZdcByteStreamTool.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_fadcBaseline

int ZdcByteStreamTool::m_fadcBaseline
private

FADC baseline lower bound.

Definition at line 119 of file ZdcByteStreamTool.h.

◆ m_fadcThreshold

int ZdcByteStreamTool::m_fadcThreshold
private

FADC threshold for super-compressed format.

Definition at line 121 of file ZdcByteStreamTool.h.

◆ m_forceSlicesFadc

int ZdcByteStreamTool::m_forceSlicesFadc
private

Force number of FADC slices in bytestream.

Definition at line 115 of file ZdcByteStreamTool.h.

◆ m_forceSlicesLut

int ZdcByteStreamTool::m_forceSlicesLut
private

Force number of LUT slices in bytestream.

Definition at line 113 of file ZdcByteStreamTool.h.

◆ m_pedestal

int ZdcByteStreamTool::m_pedestal
private

Pedestal value.

Definition at line 117 of file ZdcByteStreamTool.h.

◆ m_ppmBlocks

DataVector<ZdcPpmSubBlock> ZdcByteStreamTool::m_ppmBlocks
private

Vector for current PPM sub-blocks.

Definition at line 133 of file ZdcByteStreamTool.h.

◆ m_printCompStats

int ZdcByteStreamTool::m_printCompStats
private

Compression version.

Compression statistics print flag

Definition at line 99 of file ZdcByteStreamTool.h.

◆ m_rodStatus

std::vector<uint32_t>* ZdcByteStreamTool::m_rodStatus
private

ROD Status words.

Definition at line 137 of file ZdcByteStreamTool.h.

◆ m_rodStatusMap

std::map<uint32_t, std::vector<uint32_t>*> ZdcByteStreamTool::m_rodStatusMap
private

ROD status map.

Definition at line 139 of file ZdcByteStreamTool.h.

◆ m_slinks

int ZdcByteStreamTool::m_slinks
private

Number of modules per crate (may not all exist)

Number of slinks per crate when writing out bytestream

Definition at line 107 of file ZdcByteStreamTool.h.

◆ m_sourceIDs

std::vector<uint32_t> ZdcByteStreamTool::m_sourceIDs
private

ROB source IDs.

Definition at line 125 of file ZdcByteStreamTool.h.

◆ m_srcIdMap

ZdcSrcIdMap* ZdcByteStreamTool::m_srcIdMap
private

Source ID converter.

Definition at line 129 of file ZdcByteStreamTool.h.

◆ m_subDetector

eformat::SubDetector ZdcByteStreamTool::m_subDetector
private

Sub-detector type.

Definition at line 127 of file ZdcByteStreamTool.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.

◆ m_zdcID

const ZdcID* ZdcByteStreamTool::m_zdcID {}
private

Definition at line 141 of file ZdcByteStreamTool.h.

◆ m_zeroSuppress

int ZdcByteStreamTool::m_zeroSuppress
private

Zero suppression on input.

Definition at line 123 of file ZdcByteStreamTool.h.


The documentation for this class was generated from the following files:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
ZdcSrcIdMap::crate
static int crate(uint32_t code)
moduleID -> crate
Definition: ZdcSrcIdMap.cxx:55
ZdcPpmSubBlock::channelsPerSubBlock
static int channelsPerSubBlock(int version, int format)
Return the number of channels per sub-block.
Definition: ZdcPpmSubBlock.cxx:464
ZdcCablingService::getInstance
static const ZdcCablingService * getInstance()
get pointer to service instance
Definition: ZdcCablingService.cxx:14
ZdcByteStreamTool::m_channels
int m_channels
Number of channels per module (may not all be used)
Definition: ZdcByteStreamTool.h:101
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
ZdcByteStreamTool::m_ppmBlocks
DataVector< ZdcPpmSubBlock > m_ppmBlocks
Vector for current PPM sub-blocks.
Definition: ZdcByteStreamTool.h:133
plotting.yearwise_efficiency.channel
channel
Definition: yearwise_efficiency.py:28
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
ZdcID::module
int module(const Identifier &id) const
Definition: ZdcID.h:163
accumulate
bool accumulate(AccumulateMap &map, std::vector< module_t > const &modules, FPGATrackSimMatrixAccumulator const &acc)
Accumulates an accumulator (e.g.
Definition: FPGATrackSimMatrixAccumulator.cxx:22
ZdcSubBlock::dataWords
int dataWords() const
Return number of data words.
Definition: ZdcSubBlock.h:235
CaloCondBlobAlgs_fillNoiseFromASCII.gain
gain
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:110
ZdcSrcIdMap::getRobID
static uint32_t getRobID(uint32_t rod_id)
ROD -> ROB.
Definition: ZdcSrcIdMap.cxx:30
ZdcByteStreamTool::m_dataFormat
int m_dataFormat
Sub_block header version.
Definition: ZdcByteStreamTool.h:95
ZdcDigits
Definition: ZdcDigits.h:28
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
AthCommonMsg< AlgTool >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
vec
std::vector< size_t > vec
Definition: CombinationsGeneratorTest.cxx:12
ZdcCablingService::h2s_channel_id
Identifier h2s_channel_id(int crate, int channel) const
Definition: ZdcCablingService.cxx:326
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ZdcByteStreamTool::RODPointer
OFFLINE_FRAGMENTS_NAMESPACE::PointerType RODPointer
Definition: ZdcByteStreamTool.h:83
ZdcSubBlock::seqno
int seqno() const
Definition: ZdcSubBlock.h:255
trigbs_dumpHLTContentInBS.stats
stats
Definition: trigbs_dumpHLTContentInBS.py:91
ZdcByteStreamTool::m_zeroSuppress
int m_zeroSuppress
Zero suppression on input.
Definition: ZdcByteStreamTool.h:123
ZdcByteStreamTool::m_dfltSlicesLut
int m_dfltSlicesLut
Default number of LUT slices in simulation.
Definition: ZdcByteStreamTool.h:109
ZdcPpmSubBlock::setLutOffset
void setLutOffset(int offset)
Definition: ZdcPpmSubBlock.h:329
ZdcPpmSubBlock::setRunNumber
void setRunNumber(int run)
Definition: ZdcPpmSubBlock.h:354
AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
ZdcByteStreamTool::m_dfltSlicesFadc
int m_dfltSlicesFadc
Default number of FADC slices in simulation.
Definition: ZdcByteStreamTool.h:111
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
ZdcSubBlock::wordType
static SubBlockWordType wordType(uint32_t word)
Word identification.
Definition: ZdcSubBlock.cxx:422
ZdcPpmSubBlock::unpack
bool unpack()
Unpack data.
Definition: ZdcPpmSubBlock.cxx:295
ZdcSubBlock::crate
int crate() const
Definition: ZdcSubBlock.h:265
ZdcSubBlock::version
int version() const
Definition: ZdcSubBlock.h:245
ZdcByteStreamTool::printCompStats
void printCompStats() const
Print compression stats.
Definition: ZdcByteStreamTool.cxx:588
python.PyAthena.module
module
Definition: PyAthena.py:134
ZdcByteStreamTool::m_rodStatus
std::vector< uint32_t > * m_rodStatus
ROD Status words.
Definition: ZdcByteStreamTool.h:137
ZdcByteStreamTool::m_errorBlock
ZdcPpmSubBlock * m_errorBlock
Trigger tower key provider.
Definition: ZdcByteStreamTool.h:131
ZdcSrcIdMap::subDet
static eformat::SubDetector subDet(uint32_t code)
ID -> sub-detector.
Definition: ZdcSrcIdMap.cxx:87
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
ZdcByteStreamTool::m_fadcThreshold
int m_fadcThreshold
FADC threshold for super-compressed format.
Definition: ZdcByteStreamTool.h:121
Identifier32::get_compact
value_type get_compact(void) const
Get the compact id.
Definition: Identifier32.h:171
ZdcSrcIdMap::daqOrRoi
static int daqOrRoi(uint32_t code)
moduleID -> daqOrRoi
Definition: ZdcSrcIdMap.cxx:63
ZdcSubBlock::format
int format() const
Definition: ZdcSubBlock.h:250
lumiFormat.i
int i
Definition: lumiFormat.py:92
ReadCellNoiseFromCool.chan
chan
Definition: ReadCellNoiseFromCool.py:52
ZdcCablingService::hwid2delay
int hwid2delay(int crate, int channel) const
Definition: ZdcCablingService.cxx:417
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
beamspotman.n
n
Definition: beamspotman.py:731
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
ZdcByteStreamTool::m_forceSlicesFadc
int m_forceSlicesFadc
Force number of FADC slices in bytestream.
Definition: ZdcByteStreamTool.h:115
ZdcSrcIdMap::maxSlinks
static int maxSlinks()
Return the maximum possible number of slinks.
Definition: ZdcSrcIdMap.cxx:80
ZdcSubBlock::HEADER
@ HEADER
Definition: ZdcSubBlock.h:37
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ZdcSrcIdMap::slink
static int slink(uint32_t code)
moduleID -> slink
Definition: ZdcSrcIdMap.cxx:71
delay
double delay(std::size_t d)
Definition: JetTrigTimerTest.cxx:14
ZdcByteStreamTool::addCompStats
void addCompStats(const std::vector< uint32_t > &stats)
Add compression stats to totals.
Definition: ZdcByteStreamTool.cxx:576
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
ZdcByteStreamTool::m_pedestal
int m_pedestal
Pedestal value.
Definition: ZdcByteStreamTool.h:117
ZdcByteStreamTool::printVec
void printVec(const std::vector< int > &vec) const
Print a vector.
Definition: ZdcByteStreamTool.cxx:622
ZdcByteStreamTool::ROBIterator
IROBDataProviderSvc::VROBFRAG::const_iterator ROBIterator
Definition: ZdcByteStreamTool.h:82
ZdcByteStreamTool::m_compStats
std::vector< uint32_t > m_compStats
Vector for compression statistics.
Definition: ZdcByteStreamTool.h:135
DataVector::clear
void clear()
Erase all the elements in the collection.
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
ZdcByteStreamTool::m_crates
int m_crates
Number of crates.
Definition: ZdcByteStreamTool.h:103
ZdcPpmSubBlock::setFadcOffset
void setFadcOffset(int offset)
Definition: ZdcPpmSubBlock.h:334
ZdcPpmSubBlock::errorBlock
static bool errorBlock(uint32_t word)
Check if a header word is for an error block.
Definition: ZdcPpmSubBlock.cxx:495
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
debug
const bool debug
Definition: MakeUncertaintyPlots.cxx:53
ZdcPpmSubBlock::setFadcBaseline
void setFadcBaseline(int baseline)
Definition: ZdcPpmSubBlock.h:344
ZdcPpmSubBlock::clear
void clear()
Clear all data.
Definition: ZdcPpmSubBlock.cxx:75
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
ZdcPpmSubBlock::ppmData
void ppmData(int chan, std::vector< int > &lut, std::vector< int > &fadc, std::vector< int > &bcidLut, std::vector< int > &bcidFadc) const
Return unpacked data for given channel.
Definition: ZdcPpmSubBlock.cxx:167
ZdcByteStreamTool::m_printCompStats
int m_printCompStats
Compression version.
Definition: ZdcByteStreamTool.h:99
PixelModuleFeMask_create_db.payload
string payload
Definition: PixelModuleFeMask_create_db.py:69
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
ZdcCablingService::hwid2gain
int hwid2gain(int crate, int channel) const
Definition: ZdcCablingService.cxx:407
ZdcPpmSubBlock::compStats
const std::vector< uint32_t > & compStats() const
Return reference to compression stats.
Definition: ZdcPpmSubBlock.h:389
ZdcByteStreamTool::m_slinks
int m_slinks
Number of modules per crate (may not all exist)
Definition: ZdcByteStreamTool.h:107
ZdcPpmSubBlock::getPpmChannel
int getPpmChannel(const int channel) const
Definition: ZdcPpmSubBlock.h:415
ZdcSrcIdMap::getRodID
static uint32_t getRodID(int crate, int slink, int daqOrRoi, eformat::SubDetector subdet)
Make a ROD Source ID.
Definition: ZdcSrcIdMap.cxx:19
DeMoAtlasDataLoss.runNumber
string runNumber
Definition: DeMoAtlasDataLoss.py:64
ZdcPpmSubBlock::setPedestal
void setPedestal(int pedval)
Definition: ZdcPpmSubBlock.h:339
ZdcUserHeader
L1Calo User Header class.
Definition: ZdcUserHeader.h:24
Identifier::getString
std::string getString() const
Provide a string form of the identifier - hexadecimal.
Definition: Identifier.cxx:25
a
TList * a
Definition: liststreamerinfos.cxx:10
h
ZdcSubBlock::module
int module() const
Definition: ZdcSubBlock.h:270
ZdcSubBlock::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: ZdcSubBlock.cxx:121
ZdcByteStreamTool::m_fadcBaseline
int m_fadcBaseline
FADC baseline lower bound.
Definition: ZdcByteStreamTool.h:119
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
python.TriggerHandler.verbose
verbose
Definition: TriggerHandler.py:297
DEBUG
#define DEBUG
Definition: page_access.h:11
ZdcID::side
int side(const Identifier &id) const
Values of different levels (failure returns 0)
Definition: ZdcID.h:157
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
ZdcID::type
int type(const Identifier &id) const
Definition: ZdcID.h:169
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
ZdcByteStreamTool::m_zdcID
const ZdcID * m_zdcID
Definition: ZdcByteStreamTool.h:141
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
ZdcPpmSubBlock
Sub-Block class for PPM data.
Definition: ZdcPpmSubBlock.h:30
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
ZdcSrcIdMap
This class provides conversion between Lower level Source ID to higher level source ID for L1Calo Byt...
Definition: ZdcSrcIdMap.h:24
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:14
Identifier::get_identifier32
Identifier32 get_identifier32(void) const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
ZdcID
Definition: ZdcID.h:25
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
ZdcByteStreamTool::m_sourceIDs
std::vector< uint32_t > m_sourceIDs
ROB source IDs.
Definition: ZdcByteStreamTool.h:125
ZdcByteStreamTool::m_subDetector
eformat::SubDetector m_subDetector
Sub-detector type.
Definition: ZdcByteStreamTool.h:127
ZdcByteStreamTool::m_srcIdMap
ZdcSrcIdMap * m_srcIdMap
Source ID converter.
Definition: ZdcByteStreamTool.h:129
DataVector::empty
bool empty() const noexcept
Returns true if the collection is empty.
fitman.k
k
Definition: fitman.py:528
ZdcByteStreamTool::m_forceSlicesLut
int m_forceSlicesLut
Force number of LUT slices in bytestream.
Definition: ZdcByteStreamTool.h:113
ZdcSubBlock::unpackErrorMsg
std::string unpackErrorMsg() const
Return the unpacking error message for printing.
Definition: ZdcSubBlock.cxx:206
ZdcID::channel
int channel(const Identifier &id) const
Definition: ZdcID.h:175