ATLAS Offline Software
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
LVL1BS::JepByteStreamV1Tool Class Reference

Tool to perform ROB fragments to jet elements, jet hits and energy sums, and JEP container to raw data conversions. More...

#include <JepByteStreamV1Tool.h>

Inheritance diagram for LVL1BS::JepByteStreamV1Tool:
Collaboration diagram for LVL1BS::JepByteStreamV1Tool:

Classes

struct  CmmHitsData
 
struct  CmmSumsData
 
struct  EnergySumsData
 
struct  JepByteStreamToolData
 
struct  JetElementData
 
struct  JetHitsData
 
struct  LocalData
 

Public Member Functions

 JepByteStreamV1Tool (const std::string &type, const std::string &name, const IInterface *parent)
 
virtual ~JepByteStreamV1Tool ()
 
virtual StatusCode initialize () override
 
virtual StatusCode finalize () override
 
StatusCode convert (const std::string &sgKey, const IROBDataProviderSvc::VROBFRAG &robFrags, DataVector< LVL1::JetElement > *jeCollection) const
 Convert ROB fragments to jet elements. More...
 
StatusCode convert (const std::string &sgKey, const IROBDataProviderSvc::VROBFRAG &robFrags, DataVector< LVL1::JEMHits > *hitCollection) const
 Convert ROB fragments to jet hits. More...
 
StatusCode convert (const std::string &sgKey, const IROBDataProviderSvc::VROBFRAG &robFrags, DataVector< LVL1::JEMEtSums > *etCollection) const
 Convert ROB fragments to energy sums. More...
 
StatusCode convert (const std::string &sgKey, const IROBDataProviderSvc::VROBFRAG &robFrags, DataVector< LVL1::CMMJetHits > *hitCollection) const
 Convert ROB fragments to CMM jet hits. More...
 
StatusCode convert (const std::string &sgKey, const IROBDataProviderSvc::VROBFRAG &robFrags, DataVector< LVL1::CMMEtSums > *etCollection) const
 Convert ROB fragments to CMM energy sums. More...
 
StatusCode convert (const LVL1::JEPBSCollectionV1 *jep) const
 Convert JEP Container to bytestream. More...
 
const std::vector< uint32_t > & sourceIDs () const
 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...
 

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

enum  CollectionType {
  JET_ELEMENTS, JET_HITS, ENERGY_SUMS, CMM_HITS,
  CMM_SUMS
}
 
typedef DataVector< LVL1::JetElementJetElementCollection
 
typedef DataVector< LVL1::JEMHitsJetHitsCollection
 
typedef DataVector< LVL1::JEMEtSumsEnergySumsCollection
 
typedef DataVector< LVL1::CMMJetHitsCmmHitsCollection
 
typedef DataVector< LVL1::CMMEtSumsCmmSumsCollection
 
typedef std::map< unsigned int, LVL1::JetElement * > JetElementMap
 
typedef std::map< unsigned int, const LVL1::JetElement * > ConstJetElementMap
 
typedef std::map< int, LVL1::JEMHits * > JetHitsMap
 
typedef std::map< int, const LVL1::JEMHits * > ConstJetHitsMap
 
typedef std::map< int, LVL1::JEMEtSums * > EnergySumsMap
 
typedef std::map< int, const LVL1::JEMEtSums * > ConstEnergySumsMap
 
typedef std::map< int, LVL1::CMMJetHits * > CmmHitsMap
 
typedef std::map< int, const LVL1::CMMJetHits * > ConstCmmHitsMap
 
typedef std::map< int, LVL1::CMMEtSums * > CmmSumsMap
 
typedef std::map< int, const LVL1::CMMEtSums * > ConstCmmSumsMap
 
typedef IROBDataProviderSvc::VROBFRAG::const_iterator ROBIterator
 
typedef OFFLINE_FRAGMENTS_NAMESPACE::PointerType ROBPointer
 
typedef OFFLINE_FRAGMENTS_NAMESPACE::PointerType RODPointer
 
typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

StatusCode convertBs (const std::string &sgKey, const IROBDataProviderSvc::VROBFRAG &robFrags, JepByteStreamToolData &data) const
 Convert bytestream to given container type. More...
 
void decodeCmmEnergy (CmmEnergySubBlock *subBlock, int trigCmm, CmmSumsData &data, LocalData &ld) const
 Unpack CMM-Energy sub-block. More...
 
void decodeCmmJet (CmmJetSubBlock *subBlock, int trigCmm, CmmHitsData &data, LocalData &ld) const
 Unpack CMM-Jet sub-block. More...
 
void decodeJem (JemSubBlockV1 *subBlock, int trigJem, JepByteStreamToolData &data, LocalData &ld) const
 Unpack JEM sub-block. More...
 
const LVL1::JetElementfindJetElement (double eta, double phi, const ConstJetElementMap &jeMap, LVL1::JetElementKey &elementKey) const
 Find a jet element given eta, phi. More...
 
LVL1::JetElementfindJetElement (const JetElementData &data, double eta, double phi, LVL1::JetElementKey &elementKey) const
 
const LVL1::JEMHitsfindJetHits (int crate, int module, const ConstJetHitsMap &hitsMap) const
 Find jet hits for given crate, module. More...
 
LVL1::JEMHitsfindJetHits (const JetHitsData &data, int crate, int module) const
 
const LVL1::JEMEtSumsfindEnergySums (int crate, int module, const ConstEnergySumsMap &etMap) const
 Find energy sums for given crate, module. More...
 
LVL1::JEMEtSumsfindEnergySums (const EnergySumsData &data, int crate, int module) const
 
const LVL1::CMMJetHitsfindCmmHits (int crate, int dataID, const ConstCmmHitsMap &cmmHitsMap) const
 Find CMM hits for given crate, data ID. More...
 
LVL1::CMMJetHitsfindCmmHits (const CmmHitsData &data, int crate, int dataID) const
 
const LVL1::CMMEtSumsfindCmmSums (int crate, int dataID, const ConstCmmSumsMap &cmmEtMap) const
 Find CMM energy sums for given crate, data ID. More...
 
LVL1::CMMEtSumsfindCmmSums (const CmmSumsData &data, int crate, int dataID) const
 
std::vector< uint32_t > makeSourceIDs () const
 
void setupJeMap (const JetElementCollection *jeCollection, ConstJetElementMap &jeMap, LVL1::JetElementKey &elementKey) const
 Set up jet element map. More...
 
void setupHitsMap (const JetHitsCollection *hitCollection, ConstJetHitsMap &hitsMap) const
 Set up jet hits map. More...
 
void setupEtMap (const EnergySumsCollection *enCollection, ConstEnergySumsMap &etMap) const
 Set up energy sums map. More...
 
void setupCmmHitsMap (const CmmHitsCollection *hitCollection, ConstCmmHitsMap &cmmHitsMap) const
 Set up CMM hits map. More...
 
void setupCmmEtMap (const CmmSumsCollection *enCollection, ConstCmmSumsMap &cmmEtMap) const
 Set up CMM energy sums map. More...
 
bool slinkSlices (int crate, int module, int modulesPerSlink, int &timeslices, int &trigJem, const ConstJetElementMap &jeMap, const ConstJetHitsMap &hitsMap, const ConstEnergySumsMap &etMap, const ConstCmmHitsMap &cmmHitsMap, const ConstCmmSumsMap &cmmEtMap, LVL1::JetElementKey &elementKey) const
 Get number of slices and triggered slice offset for next slink. 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

ServiceHandle< ByteStreamCnvSvcm_byteStreamCnvSvc { this, "ByteStreamCnvSvc", "ByteStreamCnvSvc" }
 
ToolHandle< LVL1::IL1CaloMappingToolm_jemMaps
 Property: Channel mapping tool. More...
 
ToolHandle< LVL1BS::L1CaloErrorByteStreamToolm_errorTool
 Property: Error collection tool. More...
 
int m_crateOffsetHw
 Property: Hardware crate number offset. More...
 
int m_crateOffsetSw
 Property: Software crate number offset. More...
 
int m_version
 Property: Sub_block header version. More...
 
int m_dataFormat
 Property: Data compression format. More...
 
const int m_channels
 Number of channels per module. More...
 
const int m_crates
 Number of crates. More...
 
const int m_modules
 Number of JEM modules per crate. More...
 
int m_slinks
 Property: Number of slinks per crate when writing out bytestream. More...
 
int m_dfltSlices
 Property: Default number of slices in simulation. More...
 
int m_forceSlices
 Property: Force number of slices in bytestream. More...
 
int m_crateMin
 Property: Minimum crate number when writing out bytestream. More...
 
int m_crateMax
 Property: Maximum crate number when writing out bytestream. More...
 
std::vector< uint32_t > m_sourceIDsProp
 Property: ROB source IDs. More...
 
const eformat::SubDetector m_subDetector
 Sub-detector type. More...
 
const L1CaloSrcIdMap m_srcIdMap
 Source ID converter. More...
 
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 jet elements, jet hits and energy sums, and JEP container to raw data conversions.

Based on ROD document version 1_09h.

Author
Peter Faulkner

Definition at line 57 of file JepByteStreamV1Tool.h.

Member Typedef Documentation

◆ CmmHitsCollection

Definition at line 133 of file JepByteStreamV1Tool.h.

◆ CmmHitsMap

Definition at line 141 of file JepByteStreamV1Tool.h.

◆ CmmSumsCollection

Definition at line 134 of file JepByteStreamV1Tool.h.

◆ CmmSumsMap

Definition at line 143 of file JepByteStreamV1Tool.h.

◆ ConstCmmHitsMap

Definition at line 142 of file JepByteStreamV1Tool.h.

◆ ConstCmmSumsMap

Definition at line 144 of file JepByteStreamV1Tool.h.

◆ ConstEnergySumsMap

Definition at line 140 of file JepByteStreamV1Tool.h.

◆ ConstJetElementMap

Definition at line 136 of file JepByteStreamV1Tool.h.

◆ ConstJetHitsMap

Definition at line 138 of file JepByteStreamV1Tool.h.

◆ EnergySumsCollection

Definition at line 132 of file JepByteStreamV1Tool.h.

◆ EnergySumsMap

Definition at line 139 of file JepByteStreamV1Tool.h.

◆ JetElementCollection

Definition at line 130 of file JepByteStreamV1Tool.h.

◆ JetElementMap

typedef std::map<unsigned int, LVL1::JetElement*> LVL1BS::JepByteStreamV1Tool::JetElementMap
private

Definition at line 135 of file JepByteStreamV1Tool.h.

◆ JetHitsCollection

Definition at line 131 of file JepByteStreamV1Tool.h.

◆ JetHitsMap

typedef std::map<int, LVL1::JEMHits*> LVL1BS::JepByteStreamV1Tool::JetHitsMap
private

Definition at line 137 of file JepByteStreamV1Tool.h.

◆ ROBIterator

typedef IROBDataProviderSvc::VROBFRAG::const_iterator LVL1BS::JepByteStreamV1Tool::ROBIterator
private

Definition at line 145 of file JepByteStreamV1Tool.h.

◆ ROBPointer

Definition at line 146 of file JepByteStreamV1Tool.h.

◆ RODPointer

Definition at line 147 of file JepByteStreamV1Tool.h.

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Member Enumeration Documentation

◆ CollectionType

Enumerator
JET_ELEMENTS 
JET_HITS 
ENERGY_SUMS 
CMM_HITS 
CMM_SUMS 

Definition at line 127 of file JepByteStreamV1Tool.h.

Constructor & Destructor Documentation

◆ JepByteStreamV1Tool()

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

Definition at line 52 of file JepByteStreamV1Tool.cxx.

56  m_jemMaps("LVL1::JemMappingTool/JemMappingTool"),
57  m_errorTool("LVL1BS::L1CaloErrorByteStreamTool/L1CaloErrorByteStreamTool"),
58  m_channels(44), m_crates(2), m_modules(16),
59  m_subDetector(eformat::TDAQ_CALO_JET_PROC_DAQ)
60 {
61  declareInterface<JepByteStreamV1Tool>(this);
62 
63  declareProperty("JemMappingTool", m_jemMaps,
64  "Crate/Module/Channel to Eta/Phi/Layer mapping tool");
65  declareProperty("ErrorTool", m_errorTool,
66  "Tool to collect errors for monitoring");
67 
68  declareProperty("CrateOffsetHw", m_crateOffsetHw = 12,
69  "Offset of JEP crate numbers in bytestream");
70  declareProperty("CrateOffsetSw", m_crateOffsetSw = 0,
71  "Offset of JEP crate numbers in RDOs");
72  declareProperty("SlinksPerCrate", m_slinks = 4,
73  "The number of S-Links per crate");
74 
75  // Properties for reading bytestream only
76  declareProperty("ROBSourceIDs", m_sourceIDsProp,
77  "ROB fragment source identifiers");
78 
79  // Properties for writing bytestream only
80  declareProperty("DataVersion", m_version = 1,
81  "Format version number in sub-block header");
82  declareProperty("DataFormat", m_dataFormat = 1,
83  "Format identifier (0-1) in sub-block header");
84  declareProperty("SimulSlices", m_dfltSlices = 1,
85  "The number of slices in the simulation");
86  declareProperty("ForceSlices", m_forceSlices = 0,
87  "If >0, the number of slices in bytestream");
88  declareProperty("CrateMin", m_crateMin = 0,
89  "Minimum crate number, allows partial output");
90  declareProperty("CrateMax", m_crateMax = m_crates - 1,
91  "Maximum crate number, allows partial output");
92 
93 }

◆ ~JepByteStreamV1Tool()

LVL1BS::JepByteStreamV1Tool::~JepByteStreamV1Tool ( )
virtual

Definition at line 97 of file JepByteStreamV1Tool.cxx.

98 {
99 }

Member Function Documentation

◆ convert() [1/6]

StatusCode LVL1BS::JepByteStreamV1Tool::convert ( const LVL1::JEPBSCollectionV1 jep) const

Convert JEP Container to bytestream.

Definition at line 179 of file JepByteStreamV1Tool.cxx.

180 {
181  const bool debug = msgLvl(MSG::DEBUG);
182  if (debug) msg(MSG::DEBUG);
183 
184  // Get the event assembler
185  FullEventAssembler<L1CaloSrcIdMap>* fea = nullptr;
186  ATH_CHECK( m_byteStreamCnvSvc->getFullEventAssembler (fea,
187  "JepByteStreamV1") );
188  const uint16_t minorVersion = m_srcIdMap.minorVersionPreLS1();
189  fea->setRodMinorVersion(minorVersion);
190 
191  // Pointer to ROD data vector
192 
194 
195  // Jet element key provider
196  LVL1::JetElementKey elementKey;
197 
198  // Set up the container maps
199 
200  // Jet element map
201  ConstJetElementMap jeMap;
202  setupJeMap(jep->JetElements(), jeMap, elementKey);
203 
204  // Jet hits map
205  ConstJetHitsMap hitsMap;
206  setupHitsMap(jep->JetHits(), hitsMap);
207 
208  // Energy sums map
209  ConstEnergySumsMap etMap;
210  setupEtMap(jep->EnergySums(), etMap);
211 
212  // CMM hits map
213  ConstCmmHitsMap cmmHitsMap;
214  setupCmmHitsMap(jep->CmmHits(), cmmHitsMap);
215 
216  // CMM energy sums map
217  ConstCmmSumsMap cmmEtMap;
218  setupCmmEtMap(jep->CmmSums(), cmmEtMap);
219 
220  // Loop over data
221 
222  const bool neutralFormat = m_dataFormat == L1CaloSubBlock::NEUTRAL;
223  const int modulesPerSlink = m_modules / m_slinks;
224  int timeslices = 1;
225  int trigJem = 0;
226  int timeslicesNew = 1;
227  int trigJemNew = 0;
228  for (int crate = m_crateMin; crate <= m_crateMax; ++crate) {
229  const int hwCrate = crate + m_crateOffsetHw;
230 
231  for (int module = 0; module < m_modules; ++module) {
232 
233  // Pack required number of modules per slink
234 
235  if (module % modulesPerSlink == 0) {
236  const int daqOrRoi = 0;
237  const int slink = module / modulesPerSlink;
238  if (debug) {
239  msg() << "Treating crate " << hwCrate
240  << " slink " << slink << endmsg;
241  }
242  // Get number of JEM slices and triggered slice offset
243  // for this slink
244  if ( ! slinkSlices(crate, module, modulesPerSlink,
245  timeslices, trigJem,
246  jeMap,
247  hitsMap,
248  etMap,
249  cmmHitsMap,
250  cmmEtMap,
251  elementKey))
252  {
253  msg(MSG::ERROR) << "Inconsistent number of slices or "
254  << "triggered slice offsets in data for crate "
255  << hwCrate << " slink " << slink << endmsg;
256  return StatusCode::FAILURE;
257  }
258  timeslicesNew = (m_forceSlices) ? m_forceSlices : timeslices;
259  trigJemNew = ModifySlices::peak(trigJem, timeslices, timeslicesNew);
260  if (debug) {
261  msg() << "Data Version/Format: " << m_version
262  << " " << m_dataFormat << endmsg
263  << "Slices/offset: " << timeslices << " " << trigJem;
264  if (timeslices != timeslicesNew) {
265  msg() << " modified to " << timeslicesNew << " " << trigJemNew;
266  }
267  msg() << endmsg;
268  }
269  L1CaloUserHeader userHeader;
270  userHeader.setJem(trigJemNew);
271  const uint32_t rodIdJem = m_srcIdMap.getRodID(hwCrate, slink, daqOrRoi,
272  m_subDetector);
273  theROD = fea->getRodData(rodIdJem);
274  theROD->push_back(userHeader.header());
275  }
276  if (debug) msg() << "Module " << module << endmsg;
277 
278  // Create a sub-block for each slice (except Neutral format)
279 
280  // Vector for current JEM sub-blocks
281  DataVector<JemSubBlockV1> jemBlocks;
282 
283  for (int slice = 0; slice < timeslicesNew; ++slice) {
284  JemSubBlockV1* const subBlock = new JemSubBlockV1();
285  subBlock->setJemHeader(m_version, m_dataFormat, slice,
286  hwCrate, module, timeslicesNew);
287  jemBlocks.push_back(subBlock);
288  if (neutralFormat) break;
289  }
290 
291  // Find jet elements corresponding to each eta/phi pair and fill
292  // sub-blocks
293 
294  for (int chan = 0; chan < m_channels; ++chan) {
295  double eta = 0.;
296  double phi = 0.;
297  int layer = 0;
298  if (m_jemMaps->mapping(crate, module, chan, eta, phi, layer)) {
299  const LVL1::JetElement* const je = findJetElement(eta, phi, jeMap, elementKey);
300  if (je ) {
301  std::vector<int> emData;
302  std::vector<int> hadData;
303  std::vector<int> emErrors;
304  std::vector<int> hadErrors;
305  ModifySlices::data(je->emEnergyVec(), emData, timeslicesNew);
306  ModifySlices::data(je->hadEnergyVec(), hadData, timeslicesNew);
307  ModifySlices::data(je->emErrorVec(), emErrors, timeslicesNew);
308  ModifySlices::data(je->hadErrorVec(), hadErrors, timeslicesNew);
309  for (int slice = 0; slice < timeslicesNew; ++slice) {
310  const LVL1::DataError emErrBits(emErrors[slice]);
311  const LVL1::DataError hadErrBits(hadErrors[slice]);
312  const int index = ( neutralFormat ) ? 0 : slice;
313  JemSubBlockV1* const subBlock = jemBlocks[index];
314  const JemJetElement jetEle(chan, emData[slice], hadData[slice],
315  emErrBits.get(LVL1::DataError::Parity),
316  hadErrBits.get(LVL1::DataError::Parity),
317  emErrBits.get(LVL1::DataError::LinkDown) +
318  (hadErrBits.get(LVL1::DataError::LinkDown) << 1));
319  subBlock->fillJetElement(slice, jetEle);
320  }
321  }
322  }
323  }
324 
325  // Add jet hits and energy subsums
326 
327  const LVL1::JEMHits* const hits = findJetHits(crate, module, hitsMap);
328  if (hits) {
329  std::vector<unsigned int> vec;
330  ModifySlices::data(hits->JetHitsVec(), vec, timeslicesNew);
331  for (int slice = 0; slice < timeslicesNew; ++slice) {
332  const int index = ( neutralFormat ) ? 0 : slice;
333  JemSubBlockV1* const subBlock = jemBlocks[index];
334  subBlock->setJetHits(slice, vec[slice]);
335  }
336  }
337  const LVL1::JEMEtSums* const et = findEnergySums(crate, module, etMap);
338  if (et) {
339  std::vector<unsigned int> exVec;
340  std::vector<unsigned int> eyVec;
341  std::vector<unsigned int> etVec;
342  ModifySlices::data(et->ExVec(), exVec, timeslicesNew);
343  ModifySlices::data(et->EyVec(), eyVec, timeslicesNew);
344  ModifySlices::data(et->EtVec(), etVec, timeslicesNew);
345  for (int slice = 0; slice < timeslicesNew; ++slice) {
346  const int index = ( neutralFormat ) ? 0 : slice;
347  JemSubBlockV1* const subBlock = jemBlocks[index];
348  subBlock->setEnergySubsums(slice, exVec[slice], eyVec[slice],
349  etVec[slice]);
350  }
351  }
352 
353  // Pack and write the sub-blocks
354 
356  for (pos = jemBlocks.begin(); pos != jemBlocks.end(); ++pos) {
357  JemSubBlockV1* const subBlock = *pos;
358  if ( !subBlock->pack()) {
359  msg(MSG::ERROR) << "JEM sub-block packing failed" << endmsg;
360  return StatusCode::FAILURE;
361  }
362  if (debug) {
363  msg() << "JEM sub-block data words: "
364  << subBlock->dataWords() << endmsg;
365  }
366  subBlock->write(theROD);
367  }
368  }
369 
370  // Append CMMs to last S-Link of the crate
371 
372  // Create a sub-block for each slice (except Neutral format)
373 
374  // Vector for current CMM-Energy sub-blocks
375  DataVector<CmmEnergySubBlock> cmmEnergyBlocks;
376  // Vector for current CMM-Jet sub-blocks
377  DataVector<CmmJetSubBlock> cmmJetBlocks;
378 
379  const int summing = (crate == m_crates - 1) ? CmmSubBlock::SYSTEM
381  for (int slice = 0; slice < timeslicesNew; ++slice) {
382  CmmEnergySubBlock* const enBlock = new CmmEnergySubBlock();
383  const int cmmEnergyVersion = 2; // with Missing-ET-Sig
384  enBlock->setCmmHeader(cmmEnergyVersion, m_dataFormat, slice, hwCrate,
385  summing, CmmSubBlock::CMM_ENERGY,
386  CmmSubBlock::LEFT, timeslicesNew);
387  cmmEnergyBlocks.push_back(enBlock);
388  CmmJetSubBlock* const jetBlock = new CmmJetSubBlock();
389  jetBlock->setCmmHeader(m_version, m_dataFormat, slice, hwCrate,
390  summing, CmmSubBlock::CMM_JET,
391  CmmSubBlock::RIGHT, timeslicesNew);
392  cmmJetBlocks.push_back(jetBlock);
393  if (neutralFormat) break;
394  }
395 
396  // CMM-Energy
397 
398  int maxDataID = static_cast<int>(LVL1::CMMEtSums::MAXID);
399  for (int dataID = 0; dataID < maxDataID; ++dataID) {
400  int source = dataID;
401  if (dataID >= m_modules) {
402  if (summing == CmmSubBlock::CRATE &&
403  dataID != LVL1::CMMEtSums::LOCAL) continue;
404  // coverity[mixed_enums : FALSE]
405  // coverity[switch_on_enum : FALSE]
406  // coverity[first_enum_type : FALSE]
407  switch (dataID) {
409  source = CmmEnergySubBlock::LOCAL;
410  break;
412  source = CmmEnergySubBlock::REMOTE;
413  break;
415  source = CmmEnergySubBlock::TOTAL;
416  break;
420  break;
421  default:
422  continue;
423  }
424  }
425  const LVL1::CMMEtSums* const sums = findCmmSums(crate, dataID, cmmEtMap);
426  if ( sums ) {
427  std::vector<unsigned int> ex;
428  std::vector<unsigned int> ey;
429  std::vector<unsigned int> et;
430  std::vector<int> exErr;
431  std::vector<int> eyErr;
432  std::vector<int> etErr;
433  ModifySlices::data(sums->ExVec(), ex, timeslicesNew);
434  ModifySlices::data(sums->EyVec(), ey, timeslicesNew);
435  ModifySlices::data(sums->EtVec(), et, timeslicesNew);
436  ModifySlices::data(sums->ExErrorVec(), exErr, timeslicesNew);
437  ModifySlices::data(sums->EyErrorVec(), eyErr, timeslicesNew);
438  ModifySlices::data(sums->EtErrorVec(), etErr, timeslicesNew);
439  for (int slice = 0; slice < timeslicesNew; ++slice) {
440  const LVL1::DataError exErrBits(exErr[slice]);
441  const LVL1::DataError eyErrBits(eyErr[slice]);
442  const LVL1::DataError etErrBits(etErr[slice]);
443  int exError = exErrBits.get(LVL1::DataError::Parity);
444  int eyError = eyErrBits.get(LVL1::DataError::Parity);
445  int etError = etErrBits.get(LVL1::DataError::Parity);
446  if (dataID == LVL1::CMMEtSums::LOCAL ||
447  dataID == LVL1::CMMEtSums::REMOTE ||
448  dataID == LVL1::CMMEtSums::TOTAL) {
449  exError = (exError << 1) + exErrBits.get(LVL1::DataError::Overflow);
450  eyError = (eyError << 1) + eyErrBits.get(LVL1::DataError::Overflow);
451  etError = (etError << 1) + etErrBits.get(LVL1::DataError::Overflow);
452  }
453  const int index = ( neutralFormat ) ? 0 : slice;
454  CmmEnergySubBlock* const subBlock = cmmEnergyBlocks[index];
455  if (dataID == LVL1::CMMEtSums::MISSING_ET_MAP) {
456  subBlock->setMissingEtHits(slice, et[slice]);
457  } else if (dataID == LVL1::CMMEtSums::SUM_ET_MAP) {
458  subBlock->setSumEtHits(slice, et[slice]);
459  } else if (dataID == LVL1::CMMEtSums::MISSING_ET_SIG_MAP) {
460  subBlock->setMissingEtSigHits(slice, et[slice]);
461  } else {
462  subBlock->setSubsums(slice, source,
463  ex[slice], ey[slice], et[slice],
464  exError, eyError, etError);
465  }
466  }
467  }
468  }
470  pos = cmmEnergyBlocks.begin();
471  for (; pos != cmmEnergyBlocks.end(); ++pos) {
472  CmmEnergySubBlock* const subBlock = *pos;
473  if ( !subBlock->pack()) {
474  msg(MSG::ERROR) << "CMM-Energy sub-block packing failed" << endmsg;
475  return StatusCode::FAILURE;
476  }
477  if (debug) {
478  msg() << "CMM-Energy sub-block data words: "
479  << subBlock->dataWords() << endmsg;
480  }
481  subBlock->write(theROD);
482  }
483 
484  // CMM-Jet
485 
486  maxDataID = static_cast<int>(LVL1::CMMJetHits::MAXID);
487  for (int dataID = 0; dataID < maxDataID; ++dataID) {
488  int source = dataID;
489  if (dataID >= m_modules) {
490  if (summing == CmmSubBlock::CRATE &&
491  dataID != LVL1::CMMJetHits::LOCAL_MAIN &&
492  dataID != LVL1::CMMJetHits::LOCAL_FORWARD) continue;
493  // coverity[mixed_enums : FALSE]
494  // coverity[switch_on_enum : FALSE]
495  // coverity[first_enum_type : FALSE]
496  switch (dataID) {
499  break;
502  break;
505  break;
508  break;
511  break;
514  break;
516  break;
517  default:
518  continue;
519  }
520  }
521  const LVL1::CMMJetHits* const ch = findCmmHits(crate, dataID, cmmHitsMap);
522  if ( ch ) {
523  std::vector<unsigned int> hits;
524  std::vector<int> errs;
525  ModifySlices::data(ch->HitsVec(), hits, timeslicesNew);
526  ModifySlices::data(ch->ErrorVec(), errs, timeslicesNew);
527  for (int slice = 0; slice < timeslicesNew; ++slice) {
528  const LVL1::DataError errBits(errs[slice]);
529  const int index = ( neutralFormat ) ? 0 : slice;
530  CmmJetSubBlock* const subBlock = cmmJetBlocks[index];
531  if (dataID == LVL1::CMMJetHits::ET_MAP) {
532  subBlock->setJetEtMap(slice, hits[slice]);
533  } else {
534  subBlock->setJetHits(slice, source, hits[slice],
535  errBits.get(LVL1::DataError::Parity));
536  }
537  }
538  }
539  }
541  jos = cmmJetBlocks.begin();
542  for (; jos != cmmJetBlocks.end(); ++jos) {
543  CmmJetSubBlock* const subBlock = *jos;
544  if ( !subBlock->pack()) {
545  msg(MSG::ERROR) << "CMM-Jet sub-block packing failed" << endmsg;
546  return StatusCode::FAILURE;
547  }
548  if (debug) {
549  msg() << "CMM-Jet sub-block data words: "
550  << subBlock->dataWords() << endmsg;
551  }
552  subBlock->write(theROD);
553  }
554  }
555 
556  return StatusCode::SUCCESS;
557 }

◆ convert() [2/6]

StatusCode LVL1BS::JepByteStreamV1Tool::convert ( const std::string &  sgKey,
const IROBDataProviderSvc::VROBFRAG robFrags,
DataVector< LVL1::CMMEtSums > *  etCollection 
) const

Convert ROB fragments to CMM energy sums.

Definition at line 168 of file JepByteStreamV1Tool.cxx.

172 {
173  CmmSumsData data (etCollection);
174  return convertBs(sgKey, robFrags, data);
175 }

◆ convert() [3/6]

StatusCode LVL1BS::JepByteStreamV1Tool::convert ( const std::string &  sgKey,
const IROBDataProviderSvc::VROBFRAG robFrags,
DataVector< LVL1::CMMJetHits > *  hitCollection 
) const

Convert ROB fragments to CMM jet hits.

Definition at line 157 of file JepByteStreamV1Tool.cxx.

161 {
162  CmmHitsData data (hitCollection);
163  return convertBs(sgKey, robFrags, data);
164 }

◆ convert() [4/6]

StatusCode LVL1BS::JepByteStreamV1Tool::convert ( const std::string &  sgKey,
const IROBDataProviderSvc::VROBFRAG robFrags,
DataVector< LVL1::JEMEtSums > *  etCollection 
) const

Convert ROB fragments to energy sums.

Definition at line 146 of file JepByteStreamV1Tool.cxx.

150 {
151  EnergySumsData data (etCollection);
152  return convertBs(sgKey, robFrags, data);
153 }

◆ convert() [5/6]

StatusCode LVL1BS::JepByteStreamV1Tool::convert ( const std::string &  sgKey,
const IROBDataProviderSvc::VROBFRAG robFrags,
DataVector< LVL1::JEMHits > *  hitCollection 
) const

Convert ROB fragments to jet hits.

Definition at line 135 of file JepByteStreamV1Tool.cxx.

139 {
140  JetHitsData data (hitCollection);
141  return convertBs(sgKey, robFrags, data);
142 }

◆ convert() [6/6]

StatusCode LVL1BS::JepByteStreamV1Tool::convert ( const std::string &  sgKey,
const IROBDataProviderSvc::VROBFRAG robFrags,
DataVector< LVL1::JetElement > *  jeCollection 
) const

Convert ROB fragments to jet elements.

Definition at line 124 of file JepByteStreamV1Tool.cxx.

128 {
129  JetElementData data (jeCollection);
130  return convertBs(sgKey, robFrags, data);
131 }

◆ convertBs()

StatusCode LVL1BS::JepByteStreamV1Tool::convertBs ( const std::string &  sgKey,
const IROBDataProviderSvc::VROBFRAG robFrags,
JepByteStreamToolData data 
) const
private

Convert bytestream to given container type.

Definition at line 594 of file JepByteStreamV1Tool.cxx.

598 {
599  LocalData ld;
600 
601  // Check if overlap jet element channels wanted
602  const std::string flag("Overlap");
603  const std::string::size_type pos = sgKey.find(flag);
604  ld.coreOverlap =
605  (pos == std::string::npos || pos != sgKey.length() - flag.length()) ? 0 : 1;
606 
607  const bool debug = msgLvl(MSG::DEBUG);
608  if (debug) msg(MSG::DEBUG);
609 
610  // JemSubBlock for unpacking
611  JemSubBlockV1 jemSubBlock;
612  // CmmEnergySubBlock for unpacking
613  CmmEnergySubBlock cmmEnergySubBlock;
614  // CmmJetSubBlock for unpacking
615  CmmJetSubBlock cmmJetSubBlock;
616 
617  // Loop over ROB fragments
618 
619  int robCount = 0;
620  std::set<uint32_t> dupCheck;
621  ROBIterator rob = robFrags.begin();
622  ROBIterator robEnd = robFrags.end();
623  for (; rob != robEnd; ++rob) {
624 
625  if (debug) {
626  ++robCount;
627  msg() << "Treating ROB fragment " << robCount << endmsg;
628  }
629 
630  // Skip fragments with ROB status errors
631 
632  uint32_t robid = (*rob)->source_id();
633  if ((*rob)->nstatus() > 0) {
634  ROBPointer robData;
635  (*rob)->status(robData);
636  if (*robData != 0) {
637  m_errorTool->robError(robid, *robData);
638  if (debug) msg() << "ROB status error - skipping fragment" << endmsg;
639  continue;
640  }
641  }
642 
643  // Skip duplicate fragments
644 
645  if (!dupCheck.insert(robid).second) {
647  if (debug) msg() << "Skipping duplicate ROB fragment" << endmsg;
648  continue;
649  }
650 
651  // Unpack ROD data (slinks)
652 
653  RODPointer payloadBeg;
655  RODPointer payloadEnd;
656  (*rob)->rod_data(payloadBeg);
657  payloadEnd = payloadBeg + (*rob)->rod_ndata();
658  payload = payloadBeg;
659  if (payload == payloadEnd) {
660  if (debug) msg() << "ROB fragment empty" << endmsg;
661  continue;
662  }
663 
664  // Check identifier
665  const uint32_t sourceID = (*rob)->rod_source_id();
666  if (m_srcIdMap.getRobID(sourceID) != robid ||
667  m_srcIdMap.subDet(sourceID) != m_subDetector ||
668  m_srcIdMap.daqOrRoi(sourceID) != 0 ||
669  m_srcIdMap.slink(sourceID) >= m_slinks ||
670  m_srcIdMap.crate(sourceID) < m_crateOffsetHw ||
671  m_srcIdMap.crate(sourceID) >= m_crateOffsetHw + m_crates) {
672  m_errorTool->rodError(robid, L1CaloSubBlock::ERROR_ROD_ID);
673  if (debug) {
674  msg() << "Wrong source identifier in data: ROD "
675  << MSG::hex << sourceID << " ROB " << robid
676  << MSG::dec << endmsg;
677  }
678  continue;
679  }
680 
681  // Check minor version
682  const int minorVersion = (*rob)->rod_version() & 0xffff;
683  if (minorVersion > m_srcIdMap.minorVersionPreLS1()) {
684  if (debug) msg() << "Skipping post-LS1 data" << endmsg;
685  continue;
686  }
687  const int rodCrate = m_srcIdMap.crate(sourceID);
688  if (debug) {
689  msg() << "Treating crate " << rodCrate
690  << " slink " << m_srcIdMap.slink(sourceID) << endmsg;
691  }
692 
693  // First word should be User Header
696  if (debug) msg() << "Invalid or missing user header" << endmsg;
697  continue;
698  }
699  L1CaloUserHeader userHeader(*payload);
700  userHeader.setVersion(minorVersion);
701  const int headerWords = userHeader.words();
702  if (headerWords != 1) {
704  if (debug) msg() << "Unexpected number of user header words: "
705  << headerWords << endmsg;
706  continue;
707  }
708  for (int i = 0; i < headerWords; ++i) ++payload;
709  // triggered slice offsets
710  int trigJem = userHeader.jem();
711  int trigCmm = userHeader.jepCmm();
712  if (debug) {
713  msg() << "Minor format version number: " << MSG::hex
714  << minorVersion << MSG::dec << endmsg
715  << "JEM triggered slice offset: " << trigJem << endmsg
716  << "CMM triggered slice offset: " << trigCmm << endmsg;
717  }
718  if (trigJem != trigCmm) {
719  const int newTrig = (trigJem > trigCmm) ? trigJem : trigCmm;
720  trigJem = newTrig;
721  trigCmm = newTrig;
722  if (debug) msg() << "Changed both offsets to " << newTrig << endmsg;
723  }
724 
725  // Loop over sub-blocks
726 
728  while (payload != payloadEnd) {
729 
731  if (debug) msg() << "Unexpected data sequence" << endmsg;
733  break;
734  }
736  // CMMs
738  cmmJetSubBlock.clear();
739  payload = cmmJetSubBlock.read(payload, payloadEnd);
740  if (cmmJetSubBlock.crate() != rodCrate) {
741  if (debug) msg() << "Inconsistent crate number in ROD source ID"
742  << endmsg;
744  break;
745  }
746  if (data.m_collection == CMM_HITS) {
747  decodeCmmJet(&cmmJetSubBlock, trigCmm, static_cast<CmmHitsData&>(data), ld);
748  if (ld.rodErr != L1CaloSubBlock::ERROR_NONE) {
749  if (debug) msg() << "decodeCmmJet failed" << endmsg;
750  break;
751  }
752  }
754  cmmEnergySubBlock.clear();
755  payload = cmmEnergySubBlock.read(payload, payloadEnd);
756  if (cmmEnergySubBlock.crate() != rodCrate) {
757  if (debug) msg() << "Inconsistent crate number in ROD source ID"
758  << endmsg;
760  break;
761  }
762  if (data.m_collection == CMM_SUMS) {
763  decodeCmmEnergy(&cmmEnergySubBlock, trigCmm, static_cast<CmmSumsData&>(data), ld);
764  if (ld.rodErr != L1CaloSubBlock::ERROR_NONE) {
765  if (debug) msg() << "decodeCmmEnergy failed" << endmsg;
766  break;
767  }
768  }
769  } else {
770  if (debug) msg() << "Invalid CMM type in module field" << endmsg;
772  break;
773  }
774  } else {
775  // JEM
776  jemSubBlock.clear();
777  payload = jemSubBlock.read(payload, payloadEnd);
778  if (jemSubBlock.crate() != rodCrate) {
779  if (debug) msg() << "Inconsistent crate number in ROD source ID"
780  << endmsg;
782  break;
783  }
784  if (data.m_collection == JET_ELEMENTS || data.m_collection == JET_HITS ||
785  data.m_collection == ENERGY_SUMS) {
786  decodeJem(&jemSubBlock, trigJem, data, ld);
787  if (ld.rodErr != L1CaloSubBlock::ERROR_NONE) {
788  if (debug) msg() << "decodeJem failed" << endmsg;
789  break;
790  }
791  }
792  }
793  }
794  if (ld.rodErr != L1CaloSubBlock::ERROR_NONE)
795  m_errorTool->rodError(robid, ld.rodErr);
796  }
797 
798  return StatusCode::SUCCESS;
799 }

◆ 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  }

◆ decodeCmmEnergy()

void LVL1BS::JepByteStreamV1Tool::decodeCmmEnergy ( CmmEnergySubBlock subBlock,
int  trigCmm,
CmmSumsData data,
LocalData ld 
) const
private

Unpack CMM-Energy sub-block.

Definition at line 803 of file JepByteStreamV1Tool.cxx.

807 {
808  const bool debug = msgLvl(MSG::DEBUG);
809  if (debug) msg(MSG::DEBUG);
810 
811  const int hwCrate = subBlock->crate();
812  const int module = subBlock->cmmPosition();
813  const int firmware = subBlock->cmmFirmware();
814  const int summing = subBlock->cmmSumming();
815  const int timeslices = subBlock->timeslices();
816  const int sliceNum = subBlock->slice();
817  if (debug) {
818  msg() << "CMM-Energy: Crate " << hwCrate
819  << " Module " << module
820  << " Firmware " << firmware
821  << " Summing " << summing
822  << " Total slices " << timeslices
823  << " Slice " << sliceNum << endmsg;
824  }
825  if (timeslices <= trigCmm) {
826  if (debug) msg() << "Triggered CMM slice from header "
827  << "inconsistent with number of slices: "
828  << trigCmm << ", " << timeslices << endmsg;
830  return;
831  }
832  if (timeslices <= sliceNum) {
833  if (debug) msg() << "Total slices inconsistent with slice number: "
834  << timeslices << ", " << sliceNum << endmsg;
836  return;
837  }
838  // Unpack sub-block
839  if (subBlock->dataWords() && !subBlock->unpack()) {
840  if (debug) {
841  std::string errMsg(subBlock->unpackErrorMsg());
842  msg() << "CMM-Energy sub-block unpacking failed: " << errMsg << endmsg;
843  }
844  ld.rodErr = subBlock->unpackErrorCode();
845  return;
846  }
847 
848  // Retrieve required data
849 
850  const bool neutralFormat = subBlock->format() == L1CaloSubBlock::NEUTRAL;
851  const int crate = hwCrate - m_crateOffsetHw;
852  const int swCrate = crate + m_crateOffsetSw;
853  const int maxSid = static_cast<int>(CmmEnergySubBlock::MAX_SOURCE_ID);
854  LVL1::DataError derr;
855  derr.set(LVL1::DataError::SubStatusWord, subBlock->subStatus());
856  const int ssError = derr.error();
857  const int sliceBeg = ( neutralFormat ) ? 0 : sliceNum;
858  const int sliceEnd = ( neutralFormat ) ? timeslices : sliceNum + 1;
859  for (int slice = sliceBeg; slice < sliceEnd; ++slice) {
860 
861  // Energy sums
862 
863  for (int source = 0; source < maxSid; ++source) {
864  int dataID = source;
865  if (source >= m_modules) {
866  if (summing == CmmSubBlock::CRATE &&
867  source != CmmEnergySubBlock::LOCAL) continue;
868  switch (source) {
870  dataID = LVL1::CMMEtSums::LOCAL;
871  break;
873  dataID = LVL1::CMMEtSums::REMOTE;
874  break;
876  dataID = LVL1::CMMEtSums::TOTAL;
877  break;
878  default:
879  continue;
880  }
881  }
882  const unsigned int ex = subBlock->ex(slice, source);
883  const unsigned int ey = subBlock->ey(slice, source);
884  const unsigned int et = subBlock->et(slice, source);
885  int exErr = subBlock->exError(slice, source);
886  int eyErr = subBlock->eyError(slice, source);
887  int etErr = subBlock->etError(slice, source);
888  LVL1::DataError exErrBits(ssError);
889  LVL1::DataError eyErrBits(ssError);
890  LVL1::DataError etErrBits(ssError);
891  if (dataID == LVL1::CMMEtSums::LOCAL ||
892  dataID == LVL1::CMMEtSums::REMOTE ||
893  dataID == LVL1::CMMEtSums::TOTAL) {
894  exErrBits.set(LVL1::DataError::Overflow, exErr);
895  exErrBits.set(LVL1::DataError::Parity, exErr >> 1);
896  eyErrBits.set(LVL1::DataError::Overflow, eyErr);
897  eyErrBits.set(LVL1::DataError::Parity, eyErr >> 1);
898  etErrBits.set(LVL1::DataError::Overflow, etErr);
899  etErrBits.set(LVL1::DataError::Parity, etErr >> 1);
900  } else {
901  exErrBits.set(LVL1::DataError::Parity, exErr);
902  eyErrBits.set(LVL1::DataError::Parity, eyErr);
903  etErrBits.set(LVL1::DataError::Parity, etErr);
904  }
905  exErr = exErrBits.error();
906  eyErr = eyErrBits.error();
907  etErr = etErrBits.error();
908  if (ex || ey || et || exErr || eyErr || etErr) {
909  LVL1::CMMEtSums* sums = findCmmSums(data, crate, dataID);
910  if ( ! sums ) { // create new CMM energy sums
911  ld.exVec.assign(timeslices, 0);
912  ld.eyVec.assign(timeslices, 0);
913  ld.etVec.assign(timeslices, 0);
914  ld.exErrVec.assign(timeslices, 0);
915  ld.eyErrVec.assign(timeslices, 0);
916  ld.etErrVec.assign(timeslices, 0);
917  ld.exVec[slice] = ex;
918  ld.eyVec[slice] = ey;
919  ld.etVec[slice] = et;
920  ld.exErrVec[slice] = exErr;
921  ld.eyErrVec[slice] = eyErr;
922  ld.etErrVec[slice] = etErr;
923  auto sumsp =
924  std::make_unique<LVL1::CMMEtSums>(swCrate, dataID, ld.etVec, ld.exVec, ld.eyVec,
925  ld.etErrVec, ld.exErrVec, ld.eyErrVec, trigCmm);
926  const int key = crate * 100 + dataID;
927  data.m_cmmEtMap.insert(std::make_pair(key, sumsp.get()));
928  data.m_cmmEtCollection->push_back(std::move(sumsp));
929  } else {
930  ld.exVec = sums->ExVec();
931  ld.eyVec = sums->EyVec();
932  ld.etVec = sums->EtVec();
933  ld.exErrVec = sums->ExErrorVec();
934  ld.eyErrVec = sums->EyErrorVec();
935  ld.etErrVec = sums->EtErrorVec();
936  const int nsl = ld.exVec.size();
937  if (timeslices != nsl) {
938  if (debug) msg() << "Inconsistent number of slices in sub-blocks"
939  << endmsg;
941  return;
942  }
943  if (ld.exVec[slice] != 0 || ld.eyVec[slice] != 0 || ld.etVec[slice] != 0 ||
944  ld.exErrVec[slice] != 0 || ld.eyErrVec[slice] != 0 ||
945  ld.etErrVec[slice] != 0) {
946  if (debug) msg() << "Duplicate data for slice " << slice << endmsg;
948  return;
949  }
950  ld.exVec[slice] = ex;
951  ld.eyVec[slice] = ey;
952  ld.etVec[slice] = et;
953  ld.exErrVec[slice] = exErr;
954  ld.eyErrVec[slice] = eyErr;
955  ld.etErrVec[slice] = etErr;
956  sums->addEx(ld.exVec, ld.exErrVec);
957  sums->addEy(ld.eyVec, ld.eyErrVec);
958  sums->addEt(ld.etVec, ld.etErrVec);
959  }
960  }
961  }
962 
963  // Hit maps - store as Et
964 
965  if (summing == CmmSubBlock::SYSTEM) {
966  const unsigned int missEt = subBlock->missingEtHits(slice);
967  if ( missEt || ssError ) {
968  const int dataID = LVL1::CMMEtSums::MISSING_ET_MAP;
969  LVL1::CMMEtSums* map = findCmmSums(data, crate, dataID);
970  if ( ! map ) {
971  ld.etVec.assign(timeslices, 0);
972  ld.etErrVec.assign(timeslices, 0);
973  ld.etVec[slice] = missEt;
974  ld.etErrVec[slice] = ssError;
975  auto mapp =
976  std::make_unique<LVL1::CMMEtSums>(swCrate, dataID,
977  ld.etVec, ld.etVec, ld.etVec,
978  ld.etErrVec, ld.etErrVec, ld.etErrVec, trigCmm);
979  const int key = crate * 100 + dataID;
980  data.m_cmmEtMap.insert(std::make_pair(key, mapp.get()));
981  data.m_cmmEtCollection->push_back(std::move(mapp));
982  } else {
983  ld.etVec = map->EtVec();
984  ld.etErrVec = map->EtErrorVec();
985  const int nsl = ld.etVec.size();
986  if (timeslices != nsl) {
987  if (debug) msg() << "Inconsistent number of slices in sub-blocks"
988  << endmsg;
990  return;
991  }
992  if (ld.etVec[slice] != 0 || ld.etErrVec[slice] != 0) {
993  if (debug) msg() << "Duplicate data for slice " << slice << endmsg;
995  return;
996  }
997  ld.etVec[slice] = missEt;
998  ld.etErrVec[slice] = ssError;
999  map->addEx(ld.etVec, ld.etErrVec);
1000  map->addEy(ld.etVec, ld.etErrVec);
1001  map->addEt(ld.etVec, ld.etErrVec);
1002  }
1003  }
1004  const unsigned int sumEt = subBlock->sumEtHits(slice);
1005  if ( sumEt || ssError ) {
1006  const int dataID = LVL1::CMMEtSums::SUM_ET_MAP;
1007  LVL1::CMMEtSums* map = findCmmSums(data, crate, dataID);
1008  if ( ! map ) {
1009  ld.etVec.assign(timeslices, 0);
1010  ld.etErrVec.assign(timeslices, 0);
1011  ld.etVec[slice] = sumEt;
1012  ld.etErrVec[slice] = ssError;
1013  auto mapp =
1014  std::make_unique<LVL1::CMMEtSums>(swCrate, dataID,
1015  ld.etVec, ld.etVec, ld.etVec,
1016  ld.etErrVec, ld.etErrVec, ld.etErrVec, trigCmm);
1017  const int key = crate * 100 + dataID;
1018  data.m_cmmEtMap.insert(std::make_pair(key, mapp.get()));
1019  data.m_cmmEtCollection->push_back(std::move(mapp));
1020  } else {
1021  ld.etVec = map->EtVec();
1022  ld.etErrVec = map->EtErrorVec();
1023  const int nsl = ld.etVec.size();
1024  if (timeslices != nsl) {
1025  if (debug) msg() << "Inconsistent number of slices in sub-blocks"
1026  << endmsg;
1028  return;
1029  }
1030  if (ld.etVec[slice] != 0 || ld.etErrVec[slice] != 0) {
1031  if (debug) msg() << "Duplicate data for slice " << slice << endmsg;
1033  return;
1034  }
1035  ld.etVec[slice] = sumEt;
1036  ld.etErrVec[slice] = ssError;
1037  map->addEx(ld.etVec, ld.etErrVec);
1038  map->addEy(ld.etVec, ld.etErrVec);
1039  map->addEt(ld.etVec, ld.etErrVec);
1040  }
1041  }
1042  if (subBlock->version() > 1) {
1043  const unsigned int missEtSig = subBlock->missingEtSigHits(slice);
1044  if ( missEtSig || ssError ) {
1045  const int dataID = LVL1::CMMEtSums::MISSING_ET_SIG_MAP;
1046  LVL1::CMMEtSums* map = findCmmSums(data, crate, dataID);
1047  if ( ! map ) {
1048  ld.etVec.assign(timeslices, 0);
1049  ld.etErrVec.assign(timeslices, 0);
1050  ld.etVec[slice] = missEtSig;
1051  ld.etErrVec[slice] = ssError;
1052  auto mapp =
1053  std::make_unique<LVL1::CMMEtSums>(swCrate, dataID,
1054  ld.etVec, ld.etVec, ld.etVec,
1055  ld.etErrVec, ld.etErrVec, ld.etErrVec, trigCmm);
1056  const int key = crate * 100 + dataID;
1057  data.m_cmmEtMap.insert(std::make_pair(key, mapp.get()));
1058  data.m_cmmEtCollection->push_back(std::move(mapp));
1059  } else {
1060  ld.etVec = map->EtVec();
1061  ld.etErrVec = map->EtErrorVec();
1062  const int nsl = ld.etVec.size();
1063  if (timeslices != nsl) {
1064  if (debug) msg() << "Inconsistent number of slices in sub-blocks"
1065  << endmsg;
1067  return;
1068  }
1069  if (ld.etVec[slice] != 0 || ld.etErrVec[slice] != 0) {
1070  if (debug) msg() << "Duplicate data for slice "
1071  << slice << endmsg;
1073  return;
1074  }
1075  ld.etVec[slice] = missEtSig;
1076  ld.etErrVec[slice] = ssError;
1077  map->addEx(ld.etVec, ld.etErrVec);
1078  map->addEy(ld.etVec, ld.etErrVec);
1079  map->addEt(ld.etVec, ld.etErrVec);
1080  }
1081  }
1082  }
1083  }
1084  }
1085 
1086  return;
1087 }

◆ decodeCmmJet()

void LVL1BS::JepByteStreamV1Tool::decodeCmmJet ( CmmJetSubBlock subBlock,
int  trigCmm,
CmmHitsData data,
LocalData ld 
) const
private

Unpack CMM-Jet sub-block.

Definition at line 1091 of file JepByteStreamV1Tool.cxx.

1094 {
1095  const bool debug = msgLvl(MSG::DEBUG);
1096  if (debug) msg(MSG::DEBUG);
1097 
1098  const int hwCrate = subBlock->crate();
1099  const int module = subBlock->cmmPosition();
1100  const int firmware = subBlock->cmmFirmware();
1101  const int summing = subBlock->cmmSumming();
1102  const int timeslices = subBlock->timeslices();
1103  const int sliceNum = subBlock->slice();
1104  if (debug) {
1105  msg() << "CMM-Jet: Crate " << hwCrate
1106  << " Module " << module
1107  << " Firmware " << firmware
1108  << " Summing " << summing
1109  << " Total slices " << timeslices
1110  << " Slice " << sliceNum << endmsg;
1111  }
1112  if (timeslices <= trigCmm) {
1113  if (debug) msg() << "Triggered CMM slice from header "
1114  << "inconsistent with number of slices: "
1115  << trigCmm << ", " << timeslices << endmsg;
1117  return;
1118  }
1119  if (timeslices <= sliceNum) {
1120  if (debug) msg() << "Total slices inconsistent with slice number: "
1121  << timeslices << ", " << sliceNum << endmsg;
1123  return;
1124  }
1125  // Unpack sub-block
1126  if (subBlock->dataWords() && !subBlock->unpack()) {
1127  if (debug) {
1128  std::string errMsg(subBlock->unpackErrorMsg());
1129  msg() << "CMM-Jet sub-block unpacking failed: " << errMsg << endmsg;
1130  }
1131  ld.rodErr = subBlock->unpackErrorCode();
1132  return;
1133  }
1134 
1135  // Retrieve required data
1136 
1137  const bool neutralFormat = subBlock->format() == L1CaloSubBlock::NEUTRAL;
1138  const int crate = hwCrate - m_crateOffsetHw;
1139  const int swCrate = crate + m_crateOffsetSw;
1140  const int maxSid = static_cast<int>(CmmJetSubBlock::MAX_SOURCE_ID);
1141  LVL1::DataError derr;
1142  derr.set(LVL1::DataError::SubStatusWord, subBlock->subStatus());
1143  const int ssError = derr.error();
1144  const int sliceBeg = ( neutralFormat ) ? 0 : sliceNum;
1145  const int sliceEnd = ( neutralFormat ) ? timeslices : sliceNum + 1;
1146  for (int slice = sliceBeg; slice < sliceEnd; ++slice) {
1147 
1148  // Jet hit counts
1149 
1150  for (int source = 0; source < maxSid; ++source) {
1151  int dataID = source;
1152  if (source >= m_modules) {
1153  if (summing == CmmSubBlock::CRATE &&
1154  source != CmmJetSubBlock::LOCAL_MAIN &&
1155  source != CmmJetSubBlock::LOCAL_FORWARD) continue;
1156  // coverity[mixed_enums : FALSE]
1157  // coverity[switch_on_enum : FALSE]
1158  // coverity[first_enum_type : FALSE]
1159  switch (source) {
1162  break;
1165  break;
1168  break;
1171  break;
1174  break;
1177  break;
1178  default:
1179  continue;
1180  }
1181  }
1182  const unsigned int hits = subBlock->jetHits(slice, source);
1183  LVL1::DataError errBits(ssError);
1184  errBits.set(LVL1::DataError::Parity,
1185  subBlock->jetHitsError(slice, source));
1186  const int err = errBits.error();
1187  if (hits || err) {
1188  LVL1::CMMJetHits* jh = findCmmHits(data, crate, dataID);
1189  if ( ! jh ) { // create new CMM hits
1190  ld.hitsVec.assign(timeslices, 0);
1191  ld.errVec.assign(timeslices, 0);
1192  ld.hitsVec[slice] = hits;
1193  ld.errVec[slice] = err;
1194  auto jhp =
1195  std::make_unique<LVL1::CMMJetHits>(swCrate, dataID, ld.hitsVec, ld.errVec, trigCmm);
1196  const int key = crate * 100 + dataID;
1197  data.m_cmmHitsMap.insert(std::make_pair(key, jhp.get()));
1198  data.m_cmmHitCollection->push_back(std::move(jhp));
1199  } else {
1200  ld.hitsVec = jh->HitsVec();
1201  ld.errVec = jh->ErrorVec();
1202  const int nsl = ld.hitsVec.size();
1203  if (timeslices != nsl) {
1204  if (debug) msg() << "Inconsistent number of slices in sub-blocks"
1205  << endmsg;
1207  return;
1208  }
1209  if (ld.hitsVec[slice] != 0 || ld.errVec[slice] != 0) {
1210  if (debug) msg() << "Duplicate data for slice " << slice << endmsg;
1212  return;
1213  }
1214  ld.hitsVec[slice] = hits;
1215  ld.errVec[slice] = err;
1216  jh->addHits(ld.hitsVec, ld.errVec);
1217  }
1218  }
1219  }
1220 
1221  // Hit map - store as hits
1222 
1223  if (summing == CmmSubBlock::SYSTEM) {
1224  const unsigned int etMap = subBlock->jetEtMap(slice);
1225  if ( etMap || ssError ) {
1226  const int dataID = LVL1::CMMJetHits::ET_MAP;
1227  LVL1::CMMJetHits* map = findCmmHits(data, crate, dataID);
1228  if ( ! map ) {
1229  ld.hitsVec.assign(timeslices, 0);
1230  ld.errVec.assign(timeslices, 0);
1231  ld.hitsVec[slice] = etMap;
1232  ld.errVec[slice] = ssError;
1233  auto mapp =
1234  std::make_unique<LVL1::CMMJetHits>(swCrate, dataID, ld.hitsVec, ld.errVec, trigCmm);
1235  const int key = crate * 100 + dataID;
1236  data.m_cmmHitsMap.insert(std::make_pair(key, mapp.get()));
1237  data.m_cmmHitCollection->push_back(std::move(mapp));
1238  } else {
1239  ld.hitsVec = map->HitsVec();
1240  ld.errVec = map->ErrorVec();
1241  const int nsl = ld.hitsVec.size();
1242  if (timeslices != nsl) {
1243  if (debug) msg() << "Inconsistent number of slices in sub-blocks"
1244  << endmsg;
1246  return;
1247  }
1248  if (ld.hitsVec[slice] != 0 || ld.errVec[slice] != 0) {
1249  if (debug) msg() << "Duplicate data for slice " << slice << endmsg;
1251  return;
1252  }
1253  ld.hitsVec[slice] = etMap;
1254  ld.errVec[slice] = ssError;
1255  map->addHits(ld.hitsVec, ld.errVec);
1256  }
1257  }
1258  }
1259  }
1260 
1261  return;
1262 }

◆ decodeJem()

void LVL1BS::JepByteStreamV1Tool::decodeJem ( JemSubBlockV1 subBlock,
int  trigJem,
JepByteStreamToolData data,
LocalData ld 
) const
private

Unpack JEM sub-block.

Definition at line 1266 of file JepByteStreamV1Tool.cxx.

1269 {
1270  const bool debug = msgLvl(MSG::DEBUG);
1271  const bool verbose = msgLvl(MSG::VERBOSE);
1272  if (debug) msg(MSG::DEBUG);
1273 
1274  const int hwCrate = subBlock->crate();
1275  const int module = subBlock->module();
1276  const int timeslices = subBlock->timeslices();
1277  const int sliceNum = subBlock->slice();
1278  if (debug) {
1279  msg() << "JEM: Crate " << hwCrate
1280  << " Module " << module
1281  << " Total slices " << timeslices
1282  << " Slice " << sliceNum << endmsg;
1283  }
1284  if (timeslices <= trigJem) {
1285  if (debug) msg() << "Triggered JEM slice from header "
1286  << "inconsistent with number of slices: "
1287  << trigJem << ", " << timeslices << endmsg;
1289  return;
1290  }
1291  if (timeslices <= sliceNum) {
1292  if (debug) msg() << "Total slices inconsistent with slice number: "
1293  << timeslices << ", " << sliceNum << endmsg;
1295  return;
1296  }
1297  // Unpack sub-block
1298  if (subBlock->dataWords() && !subBlock->unpack()) {
1299  if (debug) {
1300  std::string errMsg(subBlock->unpackErrorMsg());
1301  msg() << "JEM sub-block unpacking failed: " << errMsg << endmsg;
1302  }
1303  ld.rodErr = subBlock->unpackErrorCode();
1304  return;
1305  }
1306 
1307  // Retrieve required data
1308 
1309  const bool neutralFormat = subBlock->format() == L1CaloSubBlock::NEUTRAL;
1310  const int crate = hwCrate - m_crateOffsetHw;
1311  const int swCrate = crate + m_crateOffsetSw;
1312  LVL1::DataError derr;
1313  derr.set(LVL1::DataError::SubStatusWord, subBlock->subStatus());
1314  const int ssError = derr.error();
1315  std::vector<int> dummy(timeslices);
1316  const int sliceBeg = ( neutralFormat ) ? 0 : sliceNum;
1317  const int sliceEnd = ( neutralFormat ) ? timeslices : sliceNum + 1;
1318  for (int slice = sliceBeg; slice < sliceEnd; ++slice) {
1319 
1320  if (data.m_collection == JET_ELEMENTS) {
1321  JetElementData& jedata = static_cast<JetElementData&>(data);
1322 
1323  // Loop over jet element channels and fill jet elements
1324 
1325  for (int chan = 0; chan < m_channels; ++chan) {
1326  const JemJetElement jetEle(subBlock->jetElement(slice, chan));
1327  if (jetEle.data() || ssError) {
1328  double eta = 0.;
1329  double phi = 0.;
1330  int layer = 0;
1331  if (m_jemMaps->mapping(crate, module, chan, eta, phi, layer)) {
1332  if (layer == ld.coreOverlap) {
1333  LVL1::JetElement* je = findJetElement(jedata, eta, phi, ld.elementKey);
1334  if ( ! je ) { // create new jet element
1335  const unsigned int key = ld.elementKey.jeKey(phi, eta);
1336  auto jep =
1337  std::make_unique<LVL1::JetElement>(phi, eta, dummy, dummy, key,
1338  dummy, dummy, dummy, trigJem);
1339  je = jep.get();
1340  jedata.m_jeMap.insert(std::make_pair(key, jep.get()));
1341  jedata.m_jeCollection->push_back(std::move(jep));
1342  } else {
1343  const std::vector<int>& emEnergy(je->emEnergyVec());
1344  const std::vector<int>& hadEnergy(je->hadEnergyVec());
1345  const std::vector<int>& emError(je->emErrorVec());
1346  const std::vector<int>& hadError(je->hadErrorVec());
1347  const int nsl = emEnergy.size();
1348  if (timeslices != nsl) {
1349  if (debug) {
1350  msg() << "Inconsistent number of slices in sub-blocks"
1351  << endmsg;
1352  }
1354  return;
1355  }
1356  if (emEnergy[slice] != 0 || hadEnergy[slice] != 0 ||
1357  emError[slice] != 0 || hadError[slice] != 0) {
1358  if (debug) msg() << "Duplicate data for slice "
1359  << slice << endmsg;
1361  return;
1362  }
1363  }
1364  LVL1::DataError emErrBits(ssError);
1365  LVL1::DataError hadErrBits(ssError);
1366  const int linkError = jetEle.linkError();
1367  emErrBits.set(LVL1::DataError::Parity, jetEle.emParity());
1368  emErrBits.set(LVL1::DataError::LinkDown, linkError);
1369  hadErrBits.set(LVL1::DataError::Parity, jetEle.hadParity());
1370  hadErrBits.set(LVL1::DataError::LinkDown, linkError >> 1);
1371  je->addSlice(slice, jetEle.emData(), jetEle.hadData(),
1372  emErrBits.error(), hadErrBits.error(),
1373  linkError);
1374  }
1375  } else if (verbose && jetEle.data()) {
1376  msg(MSG::VERBOSE) << "Non-zero data but no channel mapping for channel "
1377  << chan << endmsg;
1378  msg(MSG::DEBUG);
1379  }
1380  } else if (verbose) {
1381  msg(MSG::VERBOSE) << "No jet element data for channel "
1382  << chan << " slice " << slice << endmsg;
1383  msg(MSG::DEBUG);
1384  }
1385  }
1386  } else if (data.m_collection == JET_HITS) {
1387  JetHitsData& jhdata = static_cast<JetHitsData&>(data);
1388 
1389  // Get jet hits
1390 
1391  const unsigned int hits = subBlock->jetHits(slice);
1392  if (hits) {
1393  LVL1::JEMHits* jh = findJetHits(jhdata, crate, module);
1394  if ( ! jh ) { // create new jet hits
1395  ld.hitsVec.assign(timeslices, 0);
1396  ld.hitsVec[slice] = hits;
1397  auto jhp =
1398  std::make_unique<LVL1::JEMHits>(swCrate, module, ld.hitsVec, trigJem);
1399  jhdata.m_hitsMap.insert(std::make_pair(crate * m_modules + module, jhp.get()));
1400  jhdata.m_hitCollection->push_back(std::move(jhp));
1401  } else {
1402  ld.hitsVec = jh->JetHitsVec();
1403  const int nsl = ld.hitsVec.size();
1404  if (timeslices != nsl) {
1405  if (debug) {
1406  msg() << "Inconsistent number of slices in sub-blocks"
1407  << endmsg;
1408  }
1410  return;
1411  }
1412  if (ld.hitsVec[slice] != 0) {
1413  if (debug) msg() << "Duplicate data for slice "
1414  << slice << endmsg;
1416  return;
1417  }
1418  ld.hitsVec[slice] = hits;
1419  jh->addJetHits(ld.hitsVec);
1420  }
1421  } else if (verbose) {
1422  msg(MSG::VERBOSE) << "No jet hits data for crate/module/slice "
1423  << hwCrate << "/" << module << "/" << slice
1424  << endmsg;
1425  msg(MSG::DEBUG);
1426  }
1427  } else if (data.m_collection == ENERGY_SUMS) {
1428  EnergySumsData& sumdata = static_cast<EnergySumsData&>(data);
1429 
1430  // Get energy subsums
1431 
1432  const unsigned int ex = subBlock->ex(slice);
1433  const unsigned int ey = subBlock->ey(slice);
1434  const unsigned int et = subBlock->et(slice);
1435  if (ex | ey | et) {
1436  LVL1::JEMEtSums* sums = findEnergySums(sumdata, crate, module);
1437  if ( ! sums ) { // create new energy sums
1438  ld.exVec.assign(timeslices, 0);
1439  ld.eyVec.assign(timeslices, 0);
1440  ld.etVec.assign(timeslices, 0);
1441  ld.exVec[slice] = ex;
1442  ld.eyVec[slice] = ey;
1443  ld.etVec[slice] = et;
1444  auto sumsp =
1445  std::make_unique<LVL1::JEMEtSums>(swCrate, module, ld.etVec, ld.exVec, ld.eyVec,
1446  trigJem);
1447  sumdata.m_etMap.insert(std::make_pair(crate * m_modules + module, sumsp.get()));
1448  sumdata.m_etCollection->push_back(std::move(sumsp));
1449  } else {
1450  ld.exVec = sums->ExVec();
1451  ld.eyVec = sums->EyVec();
1452  ld.etVec = sums->EtVec();
1453  const int nsl = ld.exVec.size();
1454  if (timeslices != nsl) {
1455  if (debug) {
1456  msg() << "Inconsistent number of slices in sub-blocks"
1457  << endmsg;
1458  }
1460  return;
1461  }
1462  if (ld.exVec[slice] != 0 || ld.eyVec[slice] != 0 || ld.etVec[slice] != 0) {
1463  if (debug) msg() << "Duplicate data for slice "
1464  << slice << endmsg;
1466  return;
1467  }
1468  ld.exVec[slice] = ex;
1469  ld.eyVec[slice] = ey;
1470  ld.etVec[slice] = et;
1471  sums->addEx(ld.exVec);
1472  sums->addEy(ld.eyVec);
1473  sums->addEt(ld.etVec);
1474  }
1475  } else if (verbose) {
1476  msg(MSG::VERBOSE) << "No energy sums data for crate/module/slice "
1477  << hwCrate << "/" << module << "/" << slice
1478  << endmsg;
1479  msg(MSG::DEBUG);
1480  }
1481  }
1482  }
1483  return;
1484 }

◆ 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 LVL1BS::JepByteStreamV1Tool::finalize ( )
overridevirtual

Definition at line 117 of file JepByteStreamV1Tool.cxx.

118 {
119  return StatusCode::SUCCESS;
120 }

◆ findCmmHits() [1/2]

LVL1::CMMJetHits * LVL1BS::JepByteStreamV1Tool::findCmmHits ( const CmmHitsData data,
int  crate,
int  dataID 
) const
private

Definition at line 1565 of file JepByteStreamV1Tool.cxx.

1568 {
1569  CmmHitsMap::const_iterator mapIter = data.m_cmmHitsMap.find(crate * 100 + dataID);
1570  if (mapIter != data.m_cmmHitsMap.end()) return mapIter->second;
1571  return nullptr;
1572 }

◆ findCmmHits() [2/2]

const LVL1::CMMJetHits * LVL1BS::JepByteStreamV1Tool::findCmmHits ( int  crate,
int  dataID,
const ConstCmmHitsMap cmmHitsMap 
) const
private

Find CMM hits for given crate, data ID.

Definition at line 1556 of file JepByteStreamV1Tool.cxx.

1559 {
1560  ConstCmmHitsMap::const_iterator mapIter = cmmHitsMap.find(crate * 100 + dataID);
1561  if (mapIter != cmmHitsMap.end()) return mapIter->second;
1562  return nullptr;
1563 }

◆ findCmmSums() [1/2]

LVL1::CMMEtSums * LVL1BS::JepByteStreamV1Tool::findCmmSums ( const CmmSumsData data,
int  crate,
int  dataID 
) const
private

Definition at line 1586 of file JepByteStreamV1Tool.cxx.

1589 {
1590  CmmSumsMap::const_iterator mapIter = data.m_cmmEtMap.find(crate * 100 + dataID);
1591  if (mapIter != data.m_cmmEtMap.end()) return mapIter->second;
1592  return nullptr;
1593 }

◆ findCmmSums() [2/2]

const LVL1::CMMEtSums * LVL1BS::JepByteStreamV1Tool::findCmmSums ( int  crate,
int  dataID,
const ConstCmmSumsMap cmmEtMap 
) const
private

Find CMM energy sums for given crate, data ID.

Definition at line 1577 of file JepByteStreamV1Tool.cxx.

1580 {
1581  ConstCmmSumsMap::const_iterator mapIter = cmmEtMap.find(crate * 100 + dataID);
1582  if (mapIter != cmmEtMap.end()) return mapIter->second;
1583  return nullptr;
1584 }

◆ findEnergySums() [1/2]

LVL1::JEMEtSums * LVL1BS::JepByteStreamV1Tool::findEnergySums ( const EnergySumsData data,
int  crate,
int  module 
) const
private

Definition at line 1544 of file JepByteStreamV1Tool.cxx.

1547 {
1548  EnergySumsMap::const_iterator mapIter = data.m_etMap.find(crate * m_modules + module);
1549  if (mapIter != data.m_etMap.end()) return mapIter->second;
1550  return nullptr;
1551 }

◆ findEnergySums() [2/2]

const LVL1::JEMEtSums * LVL1BS::JepByteStreamV1Tool::findEnergySums ( int  crate,
int  module,
const ConstEnergySumsMap etMap 
) const
private

Find energy sums for given crate, module.

Definition at line 1535 of file JepByteStreamV1Tool.cxx.

1538 {
1539  ConstEnergySumsMap::const_iterator mapIter = etMap.find(crate * m_modules + module);
1540  if (mapIter != etMap.end()) return mapIter->second;
1541  return nullptr;
1542 }

◆ findJetElement() [1/2]

LVL1::JetElement * LVL1BS::JepByteStreamV1Tool::findJetElement ( const JetElementData data,
double  eta,
double  phi,
LVL1::JetElementKey elementKey 
) const
private

Definition at line 1500 of file JepByteStreamV1Tool.cxx.

1504 {
1505  const unsigned int key = elementKey.jeKey(phi, eta);
1506  JetElementMap::const_iterator mapIter = data.m_jeMap.find(key);
1507  if (mapIter != data.m_jeMap.end()) return mapIter->second;
1508  return nullptr;
1509 }

◆ findJetElement() [2/2]

const LVL1::JetElement * LVL1BS::JepByteStreamV1Tool::findJetElement ( double  eta,
double  phi,
const ConstJetElementMap jeMap,
LVL1::JetElementKey elementKey 
) const
private

Find a jet element given eta, phi.

Definition at line 1489 of file JepByteStreamV1Tool.cxx.

1493 {
1494  const unsigned int key = elementKey.jeKey(phi, eta);
1495  ConstJetElementMap::const_iterator mapIter = jeMap.find(key);
1496  if (mapIter != jeMap.end()) return mapIter->second;
1497  return nullptr;
1498 }

◆ findJetHits() [1/2]

LVL1::JEMHits * LVL1BS::JepByteStreamV1Tool::findJetHits ( const JetHitsData data,
int  crate,
int  module 
) const
private

Definition at line 1523 of file JepByteStreamV1Tool.cxx.

1526 {
1527  JetHitsMap::const_iterator mapIter = data.m_hitsMap.find(crate * m_modules + module);
1528  if (mapIter != data.m_hitsMap.end()) return mapIter->second;
1529  return nullptr;
1530 }

◆ findJetHits() [2/2]

const LVL1::JEMHits * LVL1BS::JepByteStreamV1Tool::findJetHits ( int  crate,
int  module,
const ConstJetHitsMap hitsMap 
) const
private

Find jet hits for given crate, module.

Definition at line 1514 of file JepByteStreamV1Tool.cxx.

1517 {
1518  ConstJetHitsMap::const_iterator mapIter = hitsMap.find(crate * m_modules + module);
1519  if (mapIter != hitsMap.end()) return mapIter->second;
1520  return nullptr;
1521 }

◆ initialize()

StatusCode LVL1BS::JepByteStreamV1Tool::initialize ( )
overridevirtual

Definition at line 104 of file JepByteStreamV1Tool.cxx.

105 {
106  ATH_MSG_INFO ("Initializing " << name());
107 
108  ATH_CHECK( m_jemMaps.retrieve() );
109  ATH_CHECK( m_errorTool.retrieve() );
110  ATH_CHECK( m_byteStreamCnvSvc.retrieve() );
111 
112  return StatusCode::SUCCESS;
113 }

◆ 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 & LVL1BS::JepByteStreamV1Tool::interfaceID ( )
static

AlgTool InterfaceID.

Definition at line 45 of file JepByteStreamV1Tool.cxx.

46 {
47  return IID_IJepByteStreamV1Tool;
48 }

◆ makeSourceIDs()

std::vector< uint32_t > LVL1BS::JepByteStreamV1Tool::makeSourceIDs ( ) const
private

Definition at line 561 of file JepByteStreamV1Tool.cxx.

562 {
563  std::vector<uint32_t> sourceIDs;
564 
565  if (!m_sourceIDsProp.empty()) {
567  }
568  else {
569  const int maxCrates = m_crates + m_crateOffsetHw;
570  const int maxSlinks = m_srcIdMap.maxSlinks();
571  for (int hwCrate = m_crateOffsetHw; hwCrate < maxCrates; ++hwCrate)
572  {
573  for (int slink = 0; slink < maxSlinks; ++slink)
574  {
575  const int daqOrRoi = 0;
576  const uint32_t rodId = m_srcIdMap.getRodID(hwCrate, slink, daqOrRoi,
577  m_subDetector);
578  const uint32_t robId = m_srcIdMap.getRobID(rodId);
579  sourceIDs.push_back(robId);
580  }
581  }
582  }
583  return sourceIDs;
584 }

◆ 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.

◆ 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  }

◆ setupCmmEtMap()

void LVL1BS::JepByteStreamV1Tool::setupCmmEtMap ( const CmmSumsCollection enCollection,
ConstCmmSumsMap cmmEtMap 
) const
private

Set up CMM energy sums map.

Definition at line 1674 of file JepByteStreamV1Tool.cxx.

1677 {
1678  cmmEtMap.clear();
1679  if (etCollection) {
1680  CmmSumsCollection::const_iterator pos = etCollection->begin();
1681  CmmSumsCollection::const_iterator pose = etCollection->end();
1682  for (; pos != pose; ++pos) {
1683  const LVL1::CMMEtSums* const sums = *pos;
1684  const int crate = sums->crate() - m_crateOffsetSw;
1685  const int key = crate * 100 + sums->dataID();
1686  cmmEtMap.insert(std::make_pair(key, sums));
1687  }
1688  }
1689 }

◆ setupCmmHitsMap()

void LVL1BS::JepByteStreamV1Tool::setupCmmHitsMap ( const CmmHitsCollection hitCollection,
ConstCmmHitsMap cmmHitsMap 
) const
private

Set up CMM hits map.

Definition at line 1655 of file JepByteStreamV1Tool.cxx.

1658 {
1659  cmmHitsMap.clear();
1660  if (hitCollection) {
1661  CmmHitsCollection::const_iterator pos = hitCollection->begin();
1662  CmmHitsCollection::const_iterator pose = hitCollection->end();
1663  for (; pos != pose; ++pos) {
1664  const LVL1::CMMJetHits* const hits = *pos;
1665  const int crate = hits->crate() - m_crateOffsetSw;
1666  const int key = crate * 100 + hits->dataID();
1667  cmmHitsMap.insert(std::make_pair(key, hits));
1668  }
1669  }
1670 }

◆ setupEtMap()

void LVL1BS::JepByteStreamV1Tool::setupEtMap ( const EnergySumsCollection enCollection,
ConstEnergySumsMap etMap 
) const
private

Set up energy sums map.

Definition at line 1636 of file JepByteStreamV1Tool.cxx.

1639 {
1640  etMap.clear();
1641  if (etCollection) {
1642  EnergySumsCollection::const_iterator pos = etCollection->begin();
1643  EnergySumsCollection::const_iterator pose = etCollection->end();
1644  for (; pos != pose; ++pos) {
1645  const LVL1::JEMEtSums* const sums = *pos;
1646  const int crate = sums->crate() - m_crateOffsetSw;
1647  const int key = m_modules * crate + sums->module();
1648  etMap.insert(std::make_pair(key, sums));
1649  }
1650  }
1651 }

◆ setupHitsMap()

void LVL1BS::JepByteStreamV1Tool::setupHitsMap ( const JetHitsCollection hitCollection,
ConstJetHitsMap hitsMap 
) const
private

Set up jet hits map.

Definition at line 1617 of file JepByteStreamV1Tool.cxx.

1620 {
1621  hitsMap.clear();
1622  if (hitCollection) {
1623  JetHitsCollection::const_iterator pos = hitCollection->begin();
1624  JetHitsCollection::const_iterator pose = hitCollection->end();
1625  for (; pos != pose; ++pos) {
1626  const LVL1::JEMHits* const hits = *pos;
1627  const int crate = hits->crate() - m_crateOffsetSw;
1628  const int key = m_modules * crate + hits->module();
1629  hitsMap.insert(std::make_pair(key, hits));
1630  }
1631  }
1632 }

◆ setupJeMap()

void LVL1BS::JepByteStreamV1Tool::setupJeMap ( const JetElementCollection jeCollection,
ConstJetElementMap jeMap,
LVL1::JetElementKey elementKey 
) const
private

Set up jet element map.

Definition at line 1597 of file JepByteStreamV1Tool.cxx.

1601 {
1602  jeMap.clear();
1603  if (jeCollection) {
1605  JetElementCollection::const_iterator pose = jeCollection->end();
1606  for (; pos != pose; ++pos) {
1607  const LVL1::JetElement* je = *pos;
1608  const unsigned int key = elementKey.jeKey(je->phi(), je->eta());
1609  jeMap.insert(std::make_pair(key, je));
1610  }
1611  }
1612 }

◆ slinkSlices()

bool LVL1BS::JepByteStreamV1Tool::slinkSlices ( int  crate,
int  module,
int  modulesPerSlink,
int &  timeslices,
int &  trigJem,
const ConstJetElementMap jeMap,
const ConstJetHitsMap hitsMap,
const ConstEnergySumsMap etMap,
const ConstCmmHitsMap cmmHitsMap,
const ConstCmmSumsMap cmmEtMap,
LVL1::JetElementKey elementKey 
) const
private

Get number of slices and triggered slice offset for next slink.

Definition at line 1693 of file JepByteStreamV1Tool.cxx.

1703 {
1704  int slices = -1;
1705  int trigJ = m_dfltSlices / 2;
1706  for (int mod = module; mod < module + modulesPerSlink; ++mod) {
1707  for (int chan = 0; chan < m_channels; ++chan) {
1708  double eta = 0.;
1709  double phi = 0.;
1710  int layer = 0;
1711  if ( !m_jemMaps->mapping(crate, mod, chan, eta, phi, layer)) continue;
1712  const LVL1::JetElement* const je = findJetElement(eta, phi, jeMap, elementKey);
1713  if ( !je ) continue;
1714  const int numdat = 5;
1715  std::vector<int> sums(numdat);
1716  std::vector<int> sizes(numdat);
1717  sums[0] = std::accumulate((je->emEnergyVec()).begin(),
1718  (je->emEnergyVec()).end(), 0);
1719  sums[1] = std::accumulate((je->hadEnergyVec()).begin(),
1720  (je->hadEnergyVec()).end(), 0);
1721  sums[2] = std::accumulate((je->emErrorVec()).begin(),
1722  (je->emErrorVec()).end(), 0);
1723  sums[3] = std::accumulate((je->hadErrorVec()).begin(),
1724  (je->hadErrorVec()).end(), 0);
1725  sums[4] = std::accumulate((je->linkErrorVec()).begin(),
1726  (je->linkErrorVec()).end(), 0);
1727  sizes[0] = (je->emEnergyVec()).size();
1728  sizes[1] = (je->hadEnergyVec()).size();
1729  sizes[2] = (je->emErrorVec()).size();
1730  sizes[3] = (je->hadErrorVec()).size();
1731  sizes[4] = (je->linkErrorVec()).size();
1732  const int peak = je->peak();
1733  for (int i = 0; i < numdat; ++i) {
1734  if (sums[i] == 0) continue;
1735  if (slices < 0) {
1736  slices = sizes[i];
1737  trigJ = peak;
1738  } else if (slices != sizes[i] || trigJ != peak) return false;
1739  }
1740  }
1741  const LVL1::JEMHits* const hits = findJetHits(crate, mod, hitsMap);
1742  if (hits) {
1743  const unsigned int sum = std::accumulate((hits->JetHitsVec()).begin(),
1744  (hits->JetHitsVec()).end(), 0);
1745  if (sum) {
1746  const int size = (hits->JetHitsVec()).size();
1747  const int peak = hits->peak();
1748  if (slices < 0) {
1749  slices = size;
1750  trigJ = peak;
1751  } else if (slices != size || trigJ != peak) return false;
1752  }
1753  }
1754  const LVL1::JEMEtSums* const et = findEnergySums(crate, mod, etMap);
1755  if (et) {
1756  const int numdat = 3;
1757  std::vector<unsigned int> sums(numdat);
1758  std::vector<int> sizes(numdat);
1759  sums[0] = std::accumulate((et->ExVec()).begin(),
1760  (et->ExVec()).end(), 0);
1761  sums[1] = std::accumulate((et->EyVec()).begin(),
1762  (et->EyVec()).end(), 0);
1763  sums[2] = std::accumulate((et->EtVec()).begin(),
1764  (et->EtVec()).end(), 0);
1765  sizes[0] = (et->ExVec()).size();
1766  sizes[1] = (et->EyVec()).size();
1767  sizes[2] = (et->EtVec()).size();
1768  const int peak = et->peak();
1769  for (int i = 0; i < numdat; ++i) {
1770  if (sums[i] == 0) continue;
1771  if (slices < 0) {
1772  slices = sizes[i];
1773  trigJ = peak;
1774  } else if (slices != sizes[i] || trigJ != peak) return false;
1775  }
1776  }
1777  }
1778  // CMM last slink of crate
1779  if (module / modulesPerSlink == m_slinks - 1) {
1780  const int maxDataID1 = LVL1::CMMJetHits::MAXID;
1781  const int maxDataID2 = LVL1::CMMEtSums::MAXID;
1782  const int maxDataID = (maxDataID1 > maxDataID2) ? maxDataID1 : maxDataID2;
1783  for (int dataID = 0; dataID < maxDataID; ++dataID) {
1784  const int numdat = 6;
1785  std::vector<unsigned int> sums(numdat);
1786  std::vector<int> sizes(numdat);
1787  const LVL1::CMMJetHits* hits = 0;
1788  if (dataID < maxDataID1) hits = findCmmHits(crate, dataID, cmmHitsMap);
1789  if (hits) {
1790  sums[0] = std::accumulate((hits->HitsVec()).begin(),
1791  (hits->HitsVec()).end(), 0);
1792  sums[1] = std::accumulate((hits->ErrorVec()).begin(),
1793  (hits->ErrorVec()).end(), 0);
1794  sizes[0] = (hits->HitsVec()).size();
1795  sizes[1] = (hits->ErrorVec()).size();
1796  const int peak = hits->peak();
1797  for (int i = 0; i < 2; ++i) {
1798  if (sums[i] == 0) continue;
1799  if (slices < 0) {
1800  slices = sizes[i];
1801  trigJ = peak;
1802  } else if (slices != sizes[i] || trigJ != peak) return false;
1803  }
1804  }
1805  const LVL1::CMMEtSums* et = 0;
1806  if (dataID < maxDataID2) et = findCmmSums(crate, dataID, cmmEtMap);
1807  if (et) {
1808  sums[0] = std::accumulate((et->ExVec()).begin(),
1809  (et->ExVec()).end(), 0);
1810  sums[1] = std::accumulate((et->EyVec()).begin(),
1811  (et->EyVec()).end(), 0);
1812  sums[2] = std::accumulate((et->EtVec()).begin(),
1813  (et->EtVec()).end(), 0);
1814  sums[3] = std::accumulate((et->ExErrorVec()).begin(),
1815  (et->ExErrorVec()).end(), 0);
1816  sums[4] = std::accumulate((et->EyErrorVec()).begin(),
1817  (et->EyErrorVec()).end(), 0);
1818  sums[5] = std::accumulate((et->EtErrorVec()).begin(),
1819  (et->EtErrorVec()).end(), 0);
1820  sizes[0] = (et->ExVec()).size();
1821  sizes[1] = (et->EyVec()).size();
1822  sizes[2] = (et->EtVec()).size();
1823  sizes[3] = (et->ExErrorVec()).size();
1824  sizes[4] = (et->EyErrorVec()).size();
1825  sizes[5] = (et->EtErrorVec()).size();
1826  const int peak = et->peak();
1827  for (int i = 0; i < numdat; ++i) {
1828  if (sums[i] == 0) continue;
1829  if (slices < 0) {
1830  slices = sizes[i];
1831  trigJ = peak;
1832  } else if (slices != sizes[i] || trigJ != peak) return false;
1833  }
1834  }
1835  }
1836  }
1837  if (slices < 0) slices = m_dfltSlices;
1838  timeslices = slices;
1839  trigJem = trigJ;
1840  return true;
1841 }

◆ sourceIDs()

const std::vector< uint32_t > & LVL1BS::JepByteStreamV1Tool::sourceIDs ( ) const

Return reference to vector with all possible Source Identifiers.

Definition at line 586 of file JepByteStreamV1Tool.cxx.

587 {
588  static const std::vector<uint32_t> sourceIDs = makeSourceIDs();
589  return sourceIDs;
590 }

◆ 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_byteStreamCnvSvc

ServiceHandle<ByteStreamCnvSvc> LVL1BS::JepByteStreamV1Tool::m_byteStreamCnvSvc { this, "ByteStreamCnvSvc", "ByteStreamCnvSvc" }
private

Definition at line 98 of file JepByteStreamV1Tool.h.

◆ m_channels

const int LVL1BS::JepByteStreamV1Tool::m_channels
private

Number of channels per module.

Definition at line 272 of file JepByteStreamV1Tool.h.

◆ m_crateMax

int LVL1BS::JepByteStreamV1Tool::m_crateMax
private

Property: Maximum crate number when writing out bytestream.

Definition at line 286 of file JepByteStreamV1Tool.h.

◆ m_crateMin

int LVL1BS::JepByteStreamV1Tool::m_crateMin
private

Property: Minimum crate number when writing out bytestream.

Definition at line 284 of file JepByteStreamV1Tool.h.

◆ m_crateOffsetHw

int LVL1BS::JepByteStreamV1Tool::m_crateOffsetHw
private

Property: Hardware crate number offset.

Definition at line 264 of file JepByteStreamV1Tool.h.

◆ m_crateOffsetSw

int LVL1BS::JepByteStreamV1Tool::m_crateOffsetSw
private

Property: Software crate number offset.

Definition at line 266 of file JepByteStreamV1Tool.h.

◆ m_crates

const int LVL1BS::JepByteStreamV1Tool::m_crates
private

Number of crates.

Definition at line 274 of file JepByteStreamV1Tool.h.

◆ m_dataFormat

int LVL1BS::JepByteStreamV1Tool::m_dataFormat
private

Property: Data compression format.

Definition at line 270 of file JepByteStreamV1Tool.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_dfltSlices

int LVL1BS::JepByteStreamV1Tool::m_dfltSlices
private

Property: Default number of slices in simulation.

Definition at line 280 of file JepByteStreamV1Tool.h.

◆ m_errorTool

ToolHandle<LVL1BS::L1CaloErrorByteStreamTool> LVL1BS::JepByteStreamV1Tool::m_errorTool
private

Property: Error collection tool.

Definition at line 261 of file JepByteStreamV1Tool.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_forceSlices

int LVL1BS::JepByteStreamV1Tool::m_forceSlices
private

Property: Force number of slices in bytestream.

Definition at line 282 of file JepByteStreamV1Tool.h.

◆ m_jemMaps

ToolHandle<LVL1::IL1CaloMappingTool> LVL1BS::JepByteStreamV1Tool::m_jemMaps
private

Property: Channel mapping tool.

Definition at line 259 of file JepByteStreamV1Tool.h.

◆ m_modules

const int LVL1BS::JepByteStreamV1Tool::m_modules
private

Number of JEM modules per crate.

Definition at line 276 of file JepByteStreamV1Tool.h.

◆ m_slinks

int LVL1BS::JepByteStreamV1Tool::m_slinks
private

Property: Number of slinks per crate when writing out bytestream.

Definition at line 278 of file JepByteStreamV1Tool.h.

◆ m_sourceIDsProp

std::vector<uint32_t> LVL1BS::JepByteStreamV1Tool::m_sourceIDsProp
private

Property: ROB source IDs.

Definition at line 288 of file JepByteStreamV1Tool.h.

◆ m_srcIdMap

const L1CaloSrcIdMap LVL1BS::JepByteStreamV1Tool::m_srcIdMap
private

Source ID converter.

Definition at line 292 of file JepByteStreamV1Tool.h.

◆ m_subDetector

const eformat::SubDetector LVL1BS::JepByteStreamV1Tool::m_subDetector
private

Sub-detector type.

Definition at line 290 of file JepByteStreamV1Tool.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_version

int LVL1BS::JepByteStreamV1Tool::m_version
private

Property: Sub_block header version.

Definition at line 268 of file JepByteStreamV1Tool.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
LVL1::JEPBSCollectionV1::CmmSums
const DataVector< CMMEtSums > * CmmSums() const
Return pointer to CMM energy sums collection.
Definition: JEPBSCollectionV1.h:81
LVL1BS::JepByteStreamV1Tool::ENERGY_SUMS
@ ENERGY_SUMS
Definition: JepByteStreamV1Tool.h:127
LVL1BS::CmmSubBlock::cmmType
static CmmFirmwareCode cmmType(uint32_t word)
CMM differentiation (CMM_CP, CMM_JET, or CMM_ENERGY)
Definition: CmmSubBlock.cxx:60
LVL1BS::L1CaloSrcIdMap::minorVersionPreLS1
uint16_t minorVersionPreLS1() const
Return last ROD header minor version for pre-LS1 data.
Definition: L1CaloSrcIdMap.h:59
LVL1::CMMJetHits::LOCAL_FORWARD
@ LOCAL_FORWARD
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMJetHits.h:36
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
LVL1BS::L1CaloSrcIdMap::slink
int slink(uint32_t code) const
Return slink from unpacked moduleID.
Definition: L1CaloSrcIdMap.cxx:68
LVL1BS::JepByteStreamV1Tool::m_byteStreamCnvSvc
ServiceHandle< ByteStreamCnvSvc > m_byteStreamCnvSvc
Definition: JepByteStreamV1Tool.h:99
LVL1BS::JepByteStreamV1Tool::CMM_HITS
@ CMM_HITS
Definition: JepByteStreamV1Tool.h:128
et
Extra patterns decribing particle interation process.
LVL1BS::CmmJetSubBlock::TOTAL_MAIN
@ TOTAL_MAIN
Definition: CmmJetSubBlock.h:26
LVL1::DataError::LinkDown
@ LinkDown
Definition: DataError.h:31
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
sendEI_SPB.ch
ch
Definition: sendEI_SPB.py:35
LVL1BS::CmmSubBlock::RIGHT
@ RIGHT
Definition: CmmSubBlock.h:28
LVL1BS::L1CaloSubBlock::ERROR_MISSING_HEADER
@ ERROR_MISSING_HEADER
Definition: L1CaloSubBlock.h:33
LVL1BS::CmmSubBlock::CMM_JET
@ CMM_JET
Definition: CmmSubBlock.h:25
LVL1::JEPBSCollectionV1::JetHits
const DataVector< JEMHits > * JetHits() const
Return pointer to hit sums collection.
Definition: JEPBSCollectionV1.h:66
LVL1::DataError
Error data.
Definition: DataError.h:27
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
LVL1::JetElement::emEnergyVec
const std::vector< int > & emEnergyVec() const
Return data for all slices.
Definition: JetElement.cxx:245
LVL1BS::JepByteStreamV1Tool::m_srcIdMap
const L1CaloSrcIdMap m_srcIdMap
Source ID converter.
Definition: JepByteStreamV1Tool.h:292
LVL1::CMMEtSums::SUM_ET_MAP
@ SUM_ET_MAP
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMEtSums.h:37
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
LVL1BS::JepByteStreamV1Tool::m_crateOffsetSw
int m_crateOffsetSw
Property: Software crate number offset.
Definition: JepByteStreamV1Tool.h:266
LVL1BS::JepByteStreamV1Tool::JET_ELEMENTS
@ JET_ELEMENTS
Definition: JepByteStreamV1Tool.h:127
LVL1BS::JepByteStreamV1Tool::m_jemMaps
ToolHandle< LVL1::IL1CaloMappingTool > m_jemMaps
Property: Channel mapping tool.
Definition: JepByteStreamV1Tool.h:259
LVL1::JetElement::addSlice
void addSlice(int slice, int emEnergy, int hadEnergy, int emError, int hadError, int linkError)
add data for one timeslice.
Definition: JetElement.cxx:174
FullEventAssembler
Template class for assembling a full atlas raw event from subfragments.
Definition: FullEventAssembler.h:40
LVL1::JetElementKeyBase::jeKey
virtual unsigned int jeKey(const xAOD::TriggerTower &tower)
returns key of passed tower
Definition: JetElementKeyBase.cxx:157
LVL1BS::CmmSubBlock::CRATE
@ CRATE
Definition: CmmSubBlock.h:27
xAOD::et
et
Definition: TrigEMCluster_v1.cxx:25
DataVector< LVL1::CMMEtSums >::const_iterator
DataModel_detail::const_iterator< DataVector > const_iterator
Standard const_iterator.
Definition: DataVector.h:837
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
LVL1BS::ModifySlices::peak
static int peak(int oldPeak, int oldSlices, int newSlices)
Return new triggered slice offset.
Definition: ModifySlices.cxx:12
LVL1BS::JepByteStreamV1Tool::m_dataFormat
int m_dataFormat
Property: Data compression format.
Definition: JepByteStreamV1Tool.h:270
index
Definition: index.py:1
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
LVL1BS::JepByteStreamV1Tool::ConstCmmSumsMap
std::map< int, const LVL1::CMMEtSums * > ConstCmmSumsMap
Definition: JepByteStreamV1Tool.h:144
LVL1BS::JepByteStreamV1Tool::m_crateOffsetHw
int m_crateOffsetHw
Property: Hardware crate number offset.
Definition: JepByteStreamV1Tool.h:264
LVL1::CMMEtSums
CMMEtSums object stores Et sums from the Energy CMMs.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMEtSums.h:33
LVL1BS::L1CaloSubBlock::ERROR_DUPLICATE_ROB
@ ERROR_DUPLICATE_ROB
Definition: L1CaloSubBlock.h:31
LVL1::JetElement::peak
int peak() const
return triggered slice offset
Definition: JetElement.cxx:240
accumulate
bool accumulate(AccumulateMap &map, std::vector< module_t > const &modules, FPGATrackSimMatrixAccumulator const &acc)
Accumulates an accumulator (e.g.
Definition: FPGATrackSimMatrixAccumulator.cxx:22
LVL1::CMMEtSums::LOCAL
@ LOCAL
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMEtSums.h:36
LVL1BS::CmmSubBlock::cmmBlock
static bool cmmBlock(uint32_t word)
Determine if header word corresponds to CMM.
Definition: CmmSubBlock.cxx:84
LVL1BS::JepByteStreamV1Tool::findJetHits
const LVL1::JEMHits * findJetHits(int crate, int module, const ConstJetHitsMap &hitsMap) const
Find jet hits for given crate, module.
Definition: JepByteStreamV1Tool.cxx:1514
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
LVL1::CMMEtSums::ExErrorVec
const std::vector< int > & ExErrorVec() const
returns module Ex errors
Definition: CMMEtSums.cxx:140
LVL1BS::JepByteStreamV1Tool::findEnergySums
const LVL1::JEMEtSums * findEnergySums(int crate, int module, const ConstEnergySumsMap &etMap) const
Find energy sums for given crate, module.
Definition: JepByteStreamV1Tool.cxx:1535
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:27
LVL1::JEMEtSums::EyVec
const std::vector< unsigned int > & EyVec() const
returns module Ey sum
Definition: JEMEtSums.cxx:103
vec
std::vector< size_t > vec
Definition: CombinationsGeneratorTest.cxx:12
LVL1BS::L1CaloSubBlock::NEUTRAL
@ NEUTRAL
Definition: L1CaloSubBlock.h:28
LVL1::JEMEtSums::module
int module() const
returns module number
Definition: JEMEtSums.cxx:73
LVL1BS::JepByteStreamV1Tool::ConstJetElementMap
std::map< unsigned int, const LVL1::JetElement * > ConstJetElementMap
Definition: JepByteStreamV1Tool.h:136
LVL1::CMMEtSums::EyErrorVec
const std::vector< int > & EyErrorVec() const
returns module Ey errors
Definition: CMMEtSums.cxx:145
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
LVL1BS::JepByteStreamV1Tool::ROBIterator
IROBDataProviderSvc::VROBFRAG::const_iterator ROBIterator
Definition: JepByteStreamV1Tool.h:145
LVL1::CMMEtSums::REMOTE
@ REMOTE
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMEtSums.h:36
LVL1::CMMJetHits::TOTAL_MAIN
@ TOTAL_MAIN
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMJetHits.h:35
LVL1BS::JepByteStreamV1Tool::CMM_SUMS
@ CMM_SUMS
Definition: JepByteStreamV1Tool.h:128
LVL1BS::CmmEnergySubBlock::TOTAL
@ TOTAL
Definition: CmmEnergySubBlock.h:26
LVL1BS::CmmEnergySubBlock::REMOTE
@ REMOTE
Definition: CmmEnergySubBlock.h:26
LVL1::JEMEtSums::addEy
void addEy(const std::vector< unsigned int > &Ey)
Update Ey sum.
Definition: JEMEtSums.cxx:123
LVL1::CMMJetHits::REMOTE_FORWARD
@ REMOTE_FORWARD
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMJetHits.h:36
LVL1BS::L1CaloSubBlock::HEADER
@ HEADER
Definition: L1CaloSubBlock.h:27
LVL1BS::CmmJetSubBlock::LOCAL_FORWARD
@ LOCAL_FORWARD
Definition: CmmJetSubBlock.h:27
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
LVL1::CMMEtSums::dataID
int dataID() const
returns data ID
Definition: CMMEtSums.cxx:85
LVL1::CMMEtSums::MAXID
@ MAXID
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMEtSums.h:37
LVL1::DataError::SubStatusWord
@ SubStatusWord
Definition: DataError.h:44
LVL1BS::JepByteStreamV1Tool::setupHitsMap
void setupHitsMap(const JetHitsCollection *hitCollection, ConstJetHitsMap &hitsMap) const
Set up jet hits map.
Definition: JepByteStreamV1Tool.cxx:1617
LVL1::JetElement::hadEnergyVec
const std::vector< int > & hadEnergyVec() const
return Had energy vector reference (all timeslices)
Definition: JetElement.cxx:250
LVL1::JEPBSCollectionV1::CmmHits
const DataVector< CMMJetHits > * CmmHits() const
Return pointer to CMM hit sums collection.
Definition: JEPBSCollectionV1.h:76
LVL1BS::JepByteStreamV1Tool::m_sourceIDsProp
std::vector< uint32_t > m_sourceIDsProp
Property: ROB source IDs.
Definition: JepByteStreamV1Tool.h:288
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
CxxUtils::vec
typename vecDetail::vec_typedef< T, N >::type vec
Define a nice alias for the vectorized type.
Definition: vec.h:207
python.PyAthena.module
module
Definition: PyAthena.py:134
LVL1BS::JepByteStreamV1Tool::m_version
int m_version
Property: Sub_block header version.
Definition: JepByteStreamV1Tool.h:268
LVL1BS::JepByteStreamV1Tool::m_modules
const int m_modules
Number of JEM modules per crate.
Definition: JepByteStreamV1Tool.h:276
LVL1BS::L1CaloSubBlock::ERROR_ROD_ID
@ ERROR_ROD_ID
Definition: L1CaloSubBlock.h:31
AthCommonDataStore
Definition: AthCommonDataStore.h:52
LVL1BS::CmmJetSubBlock::REMOTE_FORWARD
@ REMOTE_FORWARD
Definition: CmmJetSubBlock.h:27
LVL1::JetElement
Jet elements are the inputs to the Jet, ETmiss and ETsum triggers.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JetElement.h:43
LVL1BS::JepByteStreamV1Tool::m_subDetector
const eformat::SubDetector m_subDetector
Sub-detector type.
Definition: JepByteStreamV1Tool.h:290
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
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
convertTimingResiduals.sum
sum
Definition: convertTimingResiduals.py:55
maskDeadModules.mod
mod
Definition: maskDeadModules.py:36
LVL1::JEMEtSums::crate
int crate() const
returns crate number
Definition: JEMEtSums.cxx:68
LVL1BS::L1CaloSubBlock::ERROR_CRATE_NUMBER
@ ERROR_CRATE_NUMBER
Definition: L1CaloSubBlock.h:34
LVL1::DataError::Overflow
@ Overflow
Definition: DataError.h:31
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:88
LVL1BS::CmmJetSubBlock::LOCAL_MAIN
@ LOCAL_MAIN
Definition: CmmJetSubBlock.h:26
dqt_zlumi_pandas.err
err
Definition: dqt_zlumi_pandas.py:193
perfmonmt-refit.slice
slice
Definition: perfmonmt-refit.py:52
LVL1::CMMEtSums::addEt
void addEt(const std::vector< unsigned int > &Et, const std::vector< int > &EtError)
Add data to existing objects.
Definition: CMMEtSums.cxx:150
DataModel_detail::iterator
(Non-const) Iterator class for DataVector/DataList.
Definition: DVLIterator.h:184
lumiFormat.i
int i
Definition: lumiFormat.py:92
ReadCellNoiseFromCool.chan
chan
Definition: ReadCellNoiseFromCool.py:52
LVL1BS::JepByteStreamV1Tool::ROBPointer
OFFLINE_FRAGMENTS_NAMESPACE::PointerType ROBPointer
Definition: JepByteStreamV1Tool.h:146
LVL1BS::L1CaloSubBlock::ERROR_DUPLICATE_DATA
@ ERROR_DUPLICATE_DATA
Definition: L1CaloSubBlock.h:35
LVL1::JEMHits::JetHitsVec
const std::vector< unsigned int > & JetHitsVec() const
returns jet hits
Definition: JEMHits.cxx:75
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
LVL1::CMMEtSums::EyVec
const std::vector< unsigned int > & EyVec() const
returns module Ey sum
Definition: CMMEtSums.cxx:130
LVL1BS::JepByteStreamV1Tool::setupEtMap
void setupEtMap(const EnergySumsCollection *enCollection, ConstEnergySumsMap &etMap) const
Set up energy sums map.
Definition: JepByteStreamV1Tool.cxx:1636
LVL1::DataError::set
void set(ErrorBit bit, int value=1)
Set an error bit or data.
Definition: DataError.cxx:28
LArG4ShowerLibProcessing.hits
hits
Definition: LArG4ShowerLibProcessing.py:136
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:52
LVL1::JEMHits::addJetHits
void addJetHits(const std::vector< unsigned int > &hits)
Set Jet hits.
Definition: JEMHits.cxx:85
LVL1::CMMJetHits::MAXID
@ MAXID
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMJetHits.h:37
master.flag
bool flag
Definition: master.py:29
LVL1BS::JepByteStreamV1Tool::setupJeMap
void setupJeMap(const JetElementCollection *jeCollection, ConstJetElementMap &jeMap, LVL1::JetElementKey &elementKey) const
Set up jet element map.
Definition: JepByteStreamV1Tool.cxx:1597
LVL1BS::JepByteStreamV1Tool::JET_HITS
@ JET_HITS
Definition: JepByteStreamV1Tool.h:127
LVL1::CMMJetHits::REMOTE_MAIN
@ REMOTE_MAIN
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMJetHits.h:35
LVL1BS::JepByteStreamV1Tool::m_crates
const int m_crates
Number of crates.
Definition: JepByteStreamV1Tool.h:274
test_pyathena.parent
parent
Definition: test_pyathena.py:15
LVL1BS::JepByteStreamV1Tool::m_channels
const int m_channels
Number of channels per module.
Definition: JepByteStreamV1Tool.h:272
python.xAODType.dummy
dummy
Definition: xAODType.py:4
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
LVL1BS::JepByteStreamV1Tool::slinkSlices
bool slinkSlices(int crate, int module, int modulesPerSlink, int &timeslices, int &trigJem, const ConstJetElementMap &jeMap, const ConstJetHitsMap &hitsMap, const ConstEnergySumsMap &etMap, const ConstCmmHitsMap &cmmHitsMap, const ConstCmmSumsMap &cmmEtMap, LVL1::JetElementKey &elementKey) const
Get number of slices and triggered slice offset for next slink.
Definition: JepByteStreamV1Tool.cxx:1693
LVL1BS::JepByteStreamV1Tool::m_slinks
int m_slinks
Property: Number of slinks per crate when writing out bytestream.
Definition: JepByteStreamV1Tool.h:278
LVL1::JEPBSCollectionV1::EnergySums
const DataVector< JEMEtSums > * EnergySums() const
Return pointer to energy sums collection.
Definition: JEPBSCollectionV1.h:71
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
LVL1BS::JepByteStreamV1Tool::m_errorTool
ToolHandle< LVL1BS::L1CaloErrorByteStreamTool > m_errorTool
Property: Error collection tool.
Definition: JepByteStreamV1Tool.h:261
LVL1BS::L1CaloSubBlock::ERROR_NONE
@ ERROR_NONE
Definition: L1CaloSubBlock.h:31
LVL1BS::JepByteStreamV1Tool::decodeCmmEnergy
void decodeCmmEnergy(CmmEnergySubBlock *subBlock, int trigCmm, CmmSumsData &data, LocalData &ld) const
Unpack CMM-Energy sub-block.
Definition: JepByteStreamV1Tool.cxx:803
LVL1::CMMEtSums::EtVec
const std::vector< unsigned int > & EtVec() const
Access multi-slice data.
Definition: CMMEtSums.cxx:120
LVL1BS::JepByteStreamV1Tool::ConstCmmHitsMap
std::map< int, const LVL1::CMMJetHits * > ConstCmmHitsMap
Definition: JepByteStreamV1Tool.h:142
LVL1::DataError::Parity
@ Parity
Definition: DataError.h:31
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
LVL1::CMMEtSums::addEy
void addEy(const std::vector< unsigned int > &Ey, const std::vector< int > &EyError)
Update Ey sum.
Definition: CMMEtSums.cxx:164
LVL1::JetElement::eta
double eta() const
Eta of centre of JetElement.
Definition: JetElement.cxx:82
LVL1BS::L1CaloSubBlock::wordType
static SubBlockWordType wordType(uint32_t word)
Word identification.
Definition: L1CaloSubBlock.cxx:479
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
LVL1::JEPBSCollectionV1::JetElements
const DataVector< JetElement > * JetElements() const
Return pointer to jet element collection.
Definition: JEPBSCollectionV1.h:61
LVL1::DataError::error
int error() const
Return the full error word.
Definition: DataError.h:78
LVL1::CMMJetHits::ET_MAP
@ ET_MAP
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMJetHits.h:37
LVL1::CMMJetHits::LOCAL_MAIN
@ LOCAL_MAIN
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMJetHits.h:35
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
LVL1BS::CmmJetSubBlock::TOTAL_FORWARD
@ TOTAL_FORWARD
Definition: CmmJetSubBlock.h:27
LVL1BS::JepByteStreamV1Tool::makeSourceIDs
std::vector< uint32_t > makeSourceIDs() const
Definition: JepByteStreamV1Tool.cxx:561
LVL1BS::JepByteStreamV1Tool::convertBs
StatusCode convertBs(const std::string &sgKey, const IROBDataProviderSvc::VROBFRAG &robFrags, JepByteStreamToolData &data) const
Convert bytestream to given container type.
Definition: JepByteStreamV1Tool.cxx:594
LVL1::JetElementKey
The JetElementKey object provides the key for each JetElement depending on its eta,...
Definition: JetElementKey.h:51
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
LVL1BS::JepByteStreamV1Tool::RODPointer
OFFLINE_FRAGMENTS_NAMESPACE::PointerType RODPointer
Definition: JepByteStreamV1Tool.h:147
LVL1::CMMJetHits::addHits
void addHits(const std::vector< unsigned int > &hits, const std::vector< int > &errors)
Add hits to existing object.
Definition: CMMJetHits.cxx:93
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
LVL1::JEMEtSums::ExVec
const std::vector< unsigned int > & ExVec() const
returns module Ex sum
Definition: JEMEtSums.cxx:98
LVL1::CMMEtSums::crate
int crate() const
Data accessors.
Definition: CMMEtSums.cxx:80
LVL1BS::JepByteStreamV1Tool::ConstJetHitsMap
std::map< int, const LVL1::JEMHits * > ConstJetHitsMap
Definition: JepByteStreamV1Tool.h:138
LVL1::JetElement::hadErrorVec
const std::vector< int > & hadErrorVec() const
return Had error vector reference (all timeslices)
Definition: JetElement.cxx:260
LVL1BS::JepByteStreamV1Tool::ConstEnergySumsMap
std::map< int, const LVL1::JEMEtSums * > ConstEnergySumsMap
Definition: JepByteStreamV1Tool.h:140
PixelModuleFeMask_create_db.payload
string payload
Definition: PixelModuleFeMask_create_db.py:69
LVL1BS::JepByteStreamV1Tool::findCmmSums
const LVL1::CMMEtSums * findCmmSums(int crate, int dataID, const ConstCmmSumsMap &cmmEtMap) const
Find CMM energy sums for given crate, data ID.
Definition: JepByteStreamV1Tool.cxx:1577
LVL1BS::JepByteStreamV1Tool::sourceIDs
const std::vector< uint32_t > & sourceIDs() const
Return reference to vector with all possible Source Identifiers.
Definition: JepByteStreamV1Tool.cxx:586
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
LVL1BS::JepByteStreamV1Tool::m_dfltSlices
int m_dfltSlices
Property: Default number of slices in simulation.
Definition: JepByteStreamV1Tool.h:280
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:84
LVL1BS::CmmEnergySubBlock::LOCAL
@ LOCAL
Definition: CmmEnergySubBlock.h:26
LVL1BS::JepByteStreamV1Tool::m_crateMin
int m_crateMin
Property: Minimum crate number when writing out bytestream.
Definition: JepByteStreamV1Tool.h:284
LVL1BS::JepByteStreamV1Tool::setupCmmEtMap
void setupCmmEtMap(const CmmSumsCollection *enCollection, ConstCmmSumsMap &cmmEtMap) const
Set up CMM energy sums map.
Definition: JepByteStreamV1Tool.cxx:1674
LVL1BS::CmmSubBlock::SYSTEM
@ SYSTEM
Definition: CmmSubBlock.h:27
LVL1::CMMJetHits::TOTAL_FORWARD
@ TOTAL_FORWARD
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMJetHits.h:36
DeMoScan.index
string index
Definition: DeMoScan.py:362
LVL1BS::JepByteStreamV1Tool::findJetElement
const LVL1::JetElement * findJetElement(double eta, double phi, const ConstJetElementMap &jeMap, LVL1::JetElementKey &elementKey) const
Find a jet element given eta, phi.
Definition: JepByteStreamV1Tool.cxx:1489
a
TList * a
Definition: liststreamerinfos.cxx:10
h
LVL1BS::CmmJetSubBlock::MAX_SOURCE_ID
@ MAX_SOURCE_ID
Definition: CmmJetSubBlock.h:28
LVL1::JEMEtSums::addEt
void addEt(const std::vector< unsigned int > &Et)
Update ET sum.
Definition: JEMEtSums.cxx:113
LVL1::CMMEtSums::addEx
void addEx(const std::vector< unsigned int > &Ex, const std::vector< int > &ExError)
Update Ex sum.
Definition: CMMEtSums.cxx:157
FullEventAssembler::setRodMinorVersion
void setRodMinorVersion(uint16_t m)
change the ROD minor version
LVL1::CMMEtSums::MISSING_ET_SIG_MAP
@ MISSING_ET_SIG_MAP
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMEtSums.h:37
LVL1::JEMEtSums
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMEtSums.h:27
LVL1::JetElement::phi
double phi() const
Phi of centre of JetElement.
Definition: JetElement.cxx:87
LVL1BS::CmmSubBlock::CMM_ENERGY
@ CMM_ENERGY
Definition: CmmSubBlock.h:25
LVL1BS::JepByteStreamV1Tool::decodeCmmJet
void decodeCmmJet(CmmJetSubBlock *subBlock, int trigCmm, CmmHitsData &data, LocalData &ld) const
Unpack CMM-Jet sub-block.
Definition: JepByteStreamV1Tool.cxx:1091
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
DEBUG
#define DEBUG
Definition: page_access.h:11
LVL1BS::JepByteStreamV1Tool::m_crateMax
int m_crateMax
Property: Maximum crate number when writing out bytestream.
Definition: JepByteStreamV1Tool.h:286
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
LVL1BS::CmmSubBlock::LEFT
@ LEFT
Definition: CmmSubBlock.h:28
LVL1::JEMHits
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMHits.h:27
LVL1BS::L1CaloSubBlock::ERROR_MODULE_NUMBER
@ ERROR_MODULE_NUMBER
Definition: L1CaloSubBlock.h:34
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
LVL1::CMMJetHits
CMMJetHits class stores Jet hit multiplicities received by and read out from the Jet CMMs.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMJetHits.h:32
LVL1BS::CmmEnergySubBlock::MAX_SOURCE_ID
@ MAX_SOURCE_ID
Definition: CmmEnergySubBlock.h:26
LVL1BS::L1CaloSrcIdMap::getRodID
uint32_t getRodID(int crate, int slink, int daqOrRoi, eformat::SubDetector subdet) const
Make a ROD Source ID.
Definition: L1CaloSrcIdMap.cxx:16
LVL1::CMMEtSums::MISSING_ET_MAP
@ MISSING_ET_MAP
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMEtSums.h:37
LVL1::JEMEtSums::EtVec
const std::vector< unsigned int > & EtVec() const
returns module ET sum
Definition: JEMEtSums.cxx:93
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
LVL1::JEMEtSums::addEx
void addEx(const std::vector< unsigned int > &Ex)
Update Ex sum.
Definition: JEMEtSums.cxx:118
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
FullEventAssembler::RODDATA
std::vector< uint32_t > RODDATA
ROD data as a vector of unsigned int.
Definition: FullEventAssembler.h:54
LVL1::JetElement::emErrorVec
const std::vector< int > & emErrorVec() const
return Em error vector reference (all timeslices)
Definition: JetElement.cxx:255
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:14
LVL1BS::CmmJetSubBlock::REMOTE_MAIN
@ REMOTE_MAIN
Definition: CmmJetSubBlock.h:26
LVL1::CMMEtSums::EtErrorVec
const std::vector< int > & EtErrorVec() const
returns module ET errors
Definition: CMMEtSums.cxx:135
LVL1::JetElement::linkErrorVec
const std::vector< int > & linkErrorVec() const
return link error vector reference (all timeslices)
Definition: JetElement.cxx:265
LVL1BS::L1CaloSrcIdMap::maxSlinks
int maxSlinks() const
Return the maximum possible number of slinks.
Definition: L1CaloSrcIdMap.cxx:77
LVL1::CMMEtSums::TOTAL
@ TOTAL
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMEtSums.h:36
LVL1BS::L1CaloUserHeader::isValid
static bool isValid(uint32_t word)
Test for valid header word.
Definition: L1CaloUserHeader.cxx:36
LVL1BS::JepByteStreamV1Tool::findCmmHits
const LVL1::CMMJetHits * findCmmHits(int crate, int dataID, const ConstCmmHitsMap &cmmHitsMap) const
Find CMM hits for given crate, data ID.
Definition: JepByteStreamV1Tool.cxx:1556
LVL1BS::L1CaloSrcIdMap::daqOrRoi
int daqOrRoi(uint32_t code) const
Return daqOrRoi from unpacked moduleID.
Definition: L1CaloSrcIdMap.cxx:60
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
geometry_dat_to_json.ld
ld
Definition: geometry_dat_to_json.py:14
LVL1BS::L1CaloSubBlock::ERROR_USER_HEADER
@ ERROR_USER_HEADER
Definition: L1CaloSubBlock.h:32
LVL1BS::JepByteStreamV1Tool::m_forceSlices
int m_forceSlices
Property: Force number of slices in bytestream.
Definition: JepByteStreamV1Tool.h:282
FullEventAssembler::getRodData
RODDATA * getRodData(uint32_t id)
get a block of ROD data
keylayer_zslicemap.slices
slices
Definition: keylayer_zslicemap.py:112
LVL1BS::JepByteStreamV1Tool::decodeJem
void decodeJem(JemSubBlockV1 *subBlock, int trigJem, JepByteStreamToolData &data, LocalData &ld) const
Unpack JEM sub-block.
Definition: JepByteStreamV1Tool.cxx:1266
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
fitman.k
k
Definition: fitman.py:528
LVL1::CMMEtSums::ExVec
const std::vector< unsigned int > & ExVec() const
returns module Ex sum
Definition: CMMEtSums.cxx:125
LVL1::CMMJetHits::HitsVec
const std::vector< unsigned int > & HitsVec() const
Multi-slice accessors.
Definition: CMMJetHits.cxx:83
LVL1BS::JepByteStreamV1Tool::setupCmmHitsMap
void setupCmmHitsMap(const CmmHitsCollection *hitCollection, ConstCmmHitsMap &cmmHitsMap) const
Set up CMM hits map.
Definition: JepByteStreamV1Tool.cxx:1655
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
LVL1::CMMJetHits::ErrorVec
const std::vector< int > & ErrorVec() const
returns errors
Definition: CMMJetHits.cxx:88