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

Tool to perform ROB fragments to trigger towers and trigger towers to raw data conversions. More...

#include <ZdcByteStreamReadV1V2Tool.h>

Inheritance diagram for ZdcByteStreamReadV1V2Tool:
Collaboration diagram for ZdcByteStreamReadV1V2Tool:

Classes

class  BitReader
 
struct  State
 

Public Member Functions

 ZdcByteStreamReadV1V2Tool (const std::string &name)
 
virtual ~ZdcByteStreamReadV1V2Tool ()
 
virtual StatusCode initialize ()
 Dummy implementation of the initialisation function. More...
 
virtual StatusCode finalize ()
 
StatusCode convert (const IROBDataProviderSvc::VROBFRAG &robFrags, xAOD::TriggerTowerContainer *const ttCollection) const
 Convert ROB fragments to trigger towers. More...
 
StatusCode convert (const IROBDataProviderSvc::VROBFRAG &robFrags, ZdcDigitsCollection *zdcCollection) const
 
StatusCode convert (xAOD::TriggerTowerContainer *const ttCollection) const
 
StatusCode convert (const std::string &sgKey, xAOD::TriggerTowerContainer *const ttCollection) const
 
ZdcDigitsCollectionconvertTT2ZD (xAOD::TriggerTowerContainer *const ttCollection) const
 
const std::vector< uint32_t > & ppmSourceIDs (const std::string &sgKey) const
 Return reference to vector with all possible Source Identifiers. More...
 
virtual void print () const
 Print the state of the tool. 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
 

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  RequestType { RequestType::PPM, RequestType::CPM, RequestType::CMX }
 
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 processRobFragment_ (State &state, const ROBIterator &robFrag, const RequestType &requestedType) const
 
StatusCode processPpmWord_ (State &state, uint32_t word, int indata) const
 
StatusCode processPpmBlock_ (State &state) const
 
StatusCode processPpmBlockR4V1_ (State &state) const
 
StatusCode processPpmBlockR3V1_ (State &state) const
 
StatusCode processPpmStandardR4V1_ (State &state) const
 
StatusCode processPpmStandardR3V1_ (State &state) const
 
StatusCode processPpmStandardR3V1_ (State &state, uint32_t word, int indata) const
 
StatusCode processPpmCompressedR3V1_ (State &state) const
 
std::vector< uint16_t > getPpmAdcSamplesR3_ (State &state, BitReader &br, uint8_t format, uint8_t minIndex) const
 
StatusCode processPpmCompressedR4V1_ (State &state) const
 
void interpretPpmHeaderR4V1_ (BitReader &br, uint8_t numAdc, int8_t &encoding, int8_t &minIndex) const
 
std::vector< uint16_t > getPpmAdcSamplesR4_ (State &state, BitReader &br, uint8_t encoding, uint8_t minIndex) const
 
StatusCode processPpmNeutral_ (State &state) const
 
StatusCode addTriggerTowerV2_ (State &state, uint8_t crate, uint8_t module, uint8_t channel, const std::vector< uint8_t > &lcpVal, const std::vector< uint8_t > &lcpBcidVec, const std::vector< uint8_t > &ljeVal, const std::vector< uint8_t > &ljeSat80Vec, const std::vector< uint16_t > &adcVal, const std::vector< uint8_t > &adcExt, const std::vector< int16_t > &pedCor, const std::vector< uint8_t > &pedEn) const
 
StatusCode addTriggerTowerV1_ (State &state, uint8_t crate, uint8_t module, uint8_t channel, const std::vector< uint16_t > &luts, const std::vector< uint16_t > &fadc) const
 
StatusCode addTriggerTowerV1_ (State &state, uint8_t crate, uint8_t module, uint8_t channel, const std::vector< uint8_t > &luts, const std::vector< uint8_t > &lcpBcidVec, const std::vector< uint16_t > &fadc, const std::vector< uint8_t > &bcidExt) const
 
void initSourceIDs ()
 
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

ToolHandle< ZdcL1CaloErrorByteStreamToolm_errorTool
 
ServiceHandle< IROBDataProviderSvcm_robDataProvider
 Channel mapping tool. More...
 
std::vector< uint32_t > m_ppmSourceIDs
 
std::vector< uint32_t > m_ppmSourceIDsMuon
 
std::vector< uint32_t > m_ppmSourceIDsSpare
 
ZdcSrcIdMapm_srcIdMap
 
const ZdcIDm_zdcID
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

Tool to perform ROB fragments to trigger towers and trigger towers to raw data conversions.

Author
alexa.nosp@m.nder.nosp@m..mazu.nosp@m.rov@.nosp@m.cern..nosp@m.ch

Definition at line 66 of file ZdcByteStreamReadV1V2Tool.h.

Member Typedef Documentation

◆ ROBIterator

typedef IROBDataProviderSvc::VROBFRAG::const_iterator ZdcByteStreamReadV1V2Tool::ROBIterator
private

Definition at line 100 of file ZdcByteStreamReadV1V2Tool.h.

◆ ROBPointer

Definition at line 101 of file ZdcByteStreamReadV1V2Tool.h.

◆ RODPointer

Definition at line 102 of file ZdcByteStreamReadV1V2Tool.h.

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Member Enumeration Documentation

◆ RequestType

Enumerator
PPM 
CPM 
CMX 

Definition at line 99 of file ZdcByteStreamReadV1V2Tool.h.

99 { PPM, CPM, CMX };

Constructor & Destructor Documentation

◆ ZdcByteStreamReadV1V2Tool()

ZdcByteStreamReadV1V2Tool::ZdcByteStreamReadV1V2Tool ( const std::string &  name)

Definition at line 78 of file ZdcByteStreamReadV1V2Tool.cxx.

79  :
80  AsgTool(name),
81  m_errorTool("ZdcL1CaloErrorByteStreamTool/ZdcL1CaloErrorByteStreamTool"),
82  //m_ppmMaps("LVL1::PpmMappingTool/PpmMappingTool"),
83  m_robDataProvider("ROBDataProviderSvc", name) {
84  declareInterface<ZdcByteStreamReadV1V2Tool>(this);
85  //declareProperty("PpmMappingTool", m_ppmMaps,
86  // "Crate/Module/Channel to Eta/Phi/Layer mapping tool");
87  declareProperty("ROBDataProviderSvc", m_robDataProvider,
88  "Get ROB source IDs service");
89 }

◆ ~ZdcByteStreamReadV1V2Tool()

virtual ZdcByteStreamReadV1V2Tool::~ZdcByteStreamReadV1V2Tool ( )
inlinevirtual

Definition at line 72 of file ZdcByteStreamReadV1V2Tool.h.

72 {};

Member Function Documentation

◆ addTriggerTowerV1_() [1/2]

StatusCode ZdcByteStreamReadV1V2Tool::addTriggerTowerV1_ ( State state,
uint8_t  crate,
uint8_t  module,
uint8_t  channel,
const std::vector< uint16_t > &  luts,
const std::vector< uint16_t > &  fadc 
) const
private

Definition at line 1044 of file ZdcByteStreamReadV1V2Tool.cxx.

1051  {
1052 
1053  std::vector<uint8_t> lcpVal;
1054  std::vector<uint8_t> lcpBcidVec;
1055 
1056  std::vector<uint16_t> adcVal;
1057  std::vector<uint8_t> adcExt;
1058 
1059  for(auto lut: luts) {
1060  lcpVal.push_back(BitField::get<uint8_t>(lut, 0, 8));
1061  lcpBcidVec.push_back(BitField::get<uint8_t>(lut, 8, 3));
1062  }
1063 
1064  for(auto f: fadc) {
1065  adcExt.push_back(BitField::get<uint8_t>(f, 0, 1));
1066  adcVal.push_back(BitField::get<uint16_t>(f, 1, 10));
1067  }
1068 
1069  CHECK(addTriggerTowerV1_(state, crate, module, channel, lcpVal, lcpBcidVec,
1070  adcVal, adcExt));
1071 
1072  return StatusCode::SUCCESS;
1073 }

◆ addTriggerTowerV1_() [2/2]

StatusCode ZdcByteStreamReadV1V2Tool::addTriggerTowerV1_ ( State state,
uint8_t  crate,
uint8_t  module,
uint8_t  channel,
const std::vector< uint8_t > &  luts,
const std::vector< uint8_t > &  lcpBcidVec,
const std::vector< uint16_t > &  fadc,
const std::vector< uint8_t > &  bcidExt 
) const
private

Definition at line 1021 of file ZdcByteStreamReadV1V2Tool.cxx.

1030  {
1031 
1032  std::vector<uint8_t> ljeSat80Vec;
1033 
1034  std::vector<int16_t> pedCor;
1035  std::vector<uint8_t> pedEn;
1036 
1037  CHECK(addTriggerTowerV2_(state, crate, module, channel, luts, lcpBcidVec,
1038  luts , ljeSat80Vec, fadc, bcidExt, pedCor, pedEn)
1039  );
1040 
1041  return StatusCode::SUCCESS;
1042 }

◆ addTriggerTowerV2_()

StatusCode ZdcByteStreamReadV1V2Tool::addTriggerTowerV2_ ( State state,
uint8_t  crate,
uint8_t  module,
uint8_t  channel,
const std::vector< uint8_t > &  lcpVal,
const std::vector< uint8_t > &  lcpBcidVec,
const std::vector< uint8_t > &  ljeVal,
const std::vector< uint8_t > &  ljeSat80Vec,
const std::vector< uint16_t > &  adcVal,
const std::vector< uint8_t > &  adcExt,
const std::vector< int16_t > &  pedCor,
const std::vector< uint8_t > &  pedEn 
) const
private

Definition at line 955 of file ZdcByteStreamReadV1V2Tool.cxx.

967  {
968 
969  //int layer = 0;
970  int error = 0;
971  double eta = 0.;
972  double phi = 0.;
973 
974  bool isNotSpare = false; // PAS - just to minimize changing code
975  // PAS - not using L1Calo PPMMap
976  /*
977  bool isNotSpare = m_ppmMaps->mapping(crate, module, channel, eta, phi, layer);
978  if (!isNotSpare && !m_ppmIsRetSpare && !m_ppmIsRetMuon){
979  return StatusCode::SUCCESS;
980  }
981  */
982 
983  if (!isNotSpare) {
984  const int pin = channel % 16;
985  const int asic = channel / 16;
986  eta = 16 * crate + module;
987  phi = 4 * pin + asic;
988  }
989 
990  uint32_t coolId = ::coolId(crate, module, channel);
991  CHECK(state.m_coolIds.count(coolId) == 0);
992  state.m_coolIds.insert(coolId);
993 
995  //std::cout << ZdcToString(*tt) << std::endl;
996 
997  state.m_triggerTowers->push_back(tt);
998  // tt->initialize(
999  // const uint_least32_t& coolId,
1000  // const uint_least8_t& layer,
1001  // const float& eta,
1002  // const float& phi,
1003  // const std::vector<uint_least8_t>& lut_cp,
1004  // const std::vector<uint_least8_t>& lut_jep,
1005  // const std::vector<int_least16_t>& correction,
1006  // const std::vector<uint_least8_t>& correctionEnabled,
1007  // const std::vector<uint_least8_t>& bcidVec,
1008  // const std::vector<uint_least16_t>& adc,
1009  // const std::vector<uint_least8_t>& bcidExt,
1010  // const std::vector<uint_least8_t>& sat80,
1011  // const uint_least16_t& error,
1012  // const uint_least8_t& peak,
1013  // const uint_least8_t& adcPeak
1014  // );
1015  tt->initialize(coolId, eta, phi, lcpVal, ljeVal, pedCor, pedEn,
1016  lcpBcidVec, adcVal, adcExt, ljeSat80Vec, error, state.m_caloUserHeader.lut(),
1017  state.m_caloUserHeader.ppFadc());
1018  return StatusCode::SUCCESS;
1019 }

◆ convert() [1/4]

StatusCode ZdcByteStreamReadV1V2Tool::convert ( const IROBDataProviderSvc::VROBFRAG robFrags,
xAOD::TriggerTowerContainer *const  ttCollection 
) const

Convert ROB fragments to trigger towers.

Definition at line 126 of file ZdcByteStreamReadV1V2Tool.cxx.

129 {
130  State state;
131  state.m_subDetectorID = eformat::FORWARD_ZDC;
132  state.m_triggerTowers = ttCollection;
133 
134  ROBIterator rob = robFrags.begin();
135  ROBIterator robEnd = robFrags.end();
136 
137  int robCounter = 1;
138  for (; rob != robEnd; ++rob, ++robCounter) {
140  if (!sc.isSuccess()) {
141 
142  }
143  }
144  return StatusCode::SUCCESS;
145 }

◆ convert() [2/4]

StatusCode ZdcByteStreamReadV1V2Tool::convert ( const IROBDataProviderSvc::VROBFRAG robFrags,
ZdcDigitsCollection zdcCollection 
) const

Definition at line 153 of file ZdcByteStreamReadV1V2Tool.cxx.

156 {
157 
160  ttCollection->setStore(aux);
161 
162  ATH_MSG_DEBUG("Getting TT collection!");
163 
164  StatusCode sc = convert(robFrags,ttCollection);
165 
166  ATH_MSG_DEBUG("Got it!");
167 
168  if (sc != StatusCode::SUCCESS)
169  {
170  ATH_MSG_DEBUG("ZDC TT Conversion failed");
171  return sc;
172  }
173 
174  ATH_MSG_DEBUG("convertTT2ZD");
175  ZdcDigitsCollection* zc = convertTT2ZD(ttCollection);
176 
177  ATH_MSG_DEBUG("convertedTT2ZD! Now copying");
178  (*zdcCollection) = (*zc); // will copy work?;
179  ATH_MSG_DEBUG("Copied!");
180 
181  return StatusCode::SUCCESS;
182 }

◆ convert() [3/4]

StatusCode ZdcByteStreamReadV1V2Tool::convert ( const std::string &  sgKey,
xAOD::TriggerTowerContainer *const  ttCollection 
) const

Definition at line 190 of file ZdcByteStreamReadV1V2Tool.cxx.

191  {
192 
193  //std::cout << "convert " << sgKey << std::endl;
194 
195  const std::vector<uint32_t>& vID(ppmSourceIDs(sgKey));
196 
197  // // get ROB fragments
199  m_robDataProvider->getROBData(vID, robFrags, "ZdcByteStreamxAODReadTool");
200  ATH_MSG_DEBUG("Number of ROB fragments:" << robFrags.size());
201 
202  CHECK(convert(robFrags, ttCollection));
203  return StatusCode::SUCCESS;
204 }

◆ convert() [4/4]

StatusCode ZdcByteStreamReadV1V2Tool::convert ( xAOD::TriggerTowerContainer *const  ttCollection) const

Definition at line 184 of file ZdcByteStreamReadV1V2Tool.cxx.

185  {
186  //return convert(LVL1::TrigT1CaloDefs::xAODTriggerTowerLocation, ttCollection);
187  return convert("ZdcTriggerTowerContainer", ttCollection);
188 }

◆ convertTT2ZD()

ZdcDigitsCollection * ZdcByteStreamReadV1V2Tool::convertTT2ZD ( xAOD::TriggerTowerContainer *const  ttCollection) const

Definition at line 1143 of file ZdcByteStreamReadV1V2Tool.cxx.

1144 {
1145  typedef std::map<uint32_t,ZdcDigits*> hashmapType;
1146  hashmapType digits_map;
1147  Identifier chan_id;
1148 
1149  for (const xAOD::TriggerTower* tt : *ttCollection)
1150  {
1151  //std::cout << "dumping TT" << std::endl;
1152  //std::cout << ZdcToString(*tt ) << std::endl;
1153 
1154  //uint32_t coolId = tt->coolId();
1155  //uint32_t coolId = tt->auxdata<uint32_t>("coolId");
1156  uint32_t coolId = tt->coolId();
1157  uint32_t pin = (coolId>>8) & 0xf;
1158  uint32_t asic = coolId & 0xf;
1159  uint32_t slinkChannel = asic*16 + pin;
1160  uint32_t ppmChannel = slink2ppmChannel[slinkChannel];
1161 
1162  uint32_t module = (coolId>>16) & 0xf;
1163 
1164  ATH_MSG_DEBUG( "--> ZCS: " << ZdcCablingService::getInstance() << " mod=" << module << " slinkC=" << slinkChannel << " ppmC=" << ppmChannel );
1165  chan_id = ZdcCablingService::getInstance()->h2s_channel_id(module, ppmChannel);
1166 
1167  const uint32_t chan_hash = chan_id.get_identifier32().get_compact();
1168  int gain = ZdcCablingService::getInstance()->hwid2gain(module,ppmChannel);
1170 
1171  ATH_MSG_DEBUG("Trying to find chan_hash " << chan_hash << " g" << gain << "d" << delay);
1172 
1173  hashmapType::iterator iter = digits_map.find(chan_hash);
1174  if (iter == digits_map.end())
1175  {
1176  ATH_MSG_DEBUG("new channel for " << chan_id);
1177  digits_map.insert(std::pair<uint32_t,ZdcDigits*>(chan_hash,new ZdcDigits(chan_id)));
1178  iter = digits_map.find(chan_hash);
1179  }
1180  if (iter != digits_map.end())
1181  {
1182  ATH_MSG_DEBUG("new auxdata for " << chan_id);
1183  if (gain==0&&delay==0) (*iter).second->set_digits_gain0_delay0( tt->adc() );
1184  if (gain==1&&delay==0) (*iter).second->set_digits_gain1_delay0( tt->adc() );
1185  if (gain==0&&delay==1) (*iter).second->set_digits_gain0_delay1( tt->adc() );
1186  if (gain==1&&delay==1) (*iter).second->set_digits_gain1_delay1( tt->adc() );
1187  }
1188 
1189  }
1190 
1191  ZdcDigitsCollection* zdcCollection = new ZdcDigitsCollection();
1192 
1193  hashmapType::iterator iter = digits_map.begin();
1194  hashmapType::iterator iter_end = digits_map.end();
1195 
1196  while (iter != iter_end)
1197  {
1198  /*
1199  Identifier id = ((*iter).second)->identify();
1200  std::cout
1201  << "side=" << m_zdcID->side(id)
1202  << " mod=" << m_zdcID->module(id)
1203  << " type=" << m_zdcID->type(id)
1204  << " chan=" << m_zdcID->channel(id)
1205  << std::endl;
1206  ((*iter).second)->print();
1207  */
1208  zdcCollection->push_back((*iter).second);
1209  ++iter;
1210  }
1211 
1212  return zdcCollection;
1213 }

◆ declareGaudiProperty() [1/4]

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

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

Definition at line 170 of file AthCommonDataStore.h.

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

◆ declareGaudiProperty() [2/4]

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

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

Definition at line 156 of file AthCommonDataStore.h.

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

◆ declareGaudiProperty() [3/4]

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

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

Definition at line 184 of file AthCommonDataStore.h.

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

◆ declareGaudiProperty() [4/4]

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

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

Definition at line 199 of file AthCommonDataStore.h.

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

◆ declareProperty() [1/6]

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

Declare a new Gaudi property.

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

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

Definition at line 245 of file AthCommonDataStore.h.

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

◆ declareProperty() [2/6]

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

Declare a new Gaudi property.

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

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

Definition at line 221 of file AthCommonDataStore.h.

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

◆ declareProperty() [3/6]

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

Definition at line 259 of file AthCommonDataStore.h.

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

◆ declareProperty() [4/6]

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

Declare a new Gaudi property.

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

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

Definition at line 333 of file AthCommonDataStore.h.

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

◆ declareProperty() [5/6]

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

Declare a new Gaudi property.

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

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

Definition at line 352 of file AthCommonDataStore.h.

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

◆ declareProperty() [6/6]

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

Definition at line 145 of file AthCommonDataStore.h.

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

◆ detStore()

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

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

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

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

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

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

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

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

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ extraDeps_update_handler()

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

Add StoreName to extra input/output deps as needed.

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

◆ finalize()

StatusCode ZdcByteStreamReadV1V2Tool::finalize ( )
virtual

Definition at line 119 of file ZdcByteStreamReadV1V2Tool.cxx.

119  {
120  delete m_srcIdMap;
121 
122  return StatusCode::SUCCESS;
123 }

◆ getKey()

SG::sgkey_t asg::AsgTool::getKey ( const void *  ptr) const
inherited

Get the (hashed) key of an object that is in the event store.

This is a bit of a special one. StoreGateSvc and xAOD::TEvent both provide ways for getting the SG::sgkey_t key for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.

In order to allow tools to efficiently perform this operation, they can use this helper function.

See also
asg::AsgTool::getName
Parameters
ptrThe bare pointer to the object that the event store should know about
Returns
The hashed key of the object in the store. If not found, an invalid (zero) key.

Definition at line 119 of file AsgTool.cxx.

119  {
120 
121 #ifdef XAOD_STANDALONE
122  // In case we use @c xAOD::TEvent, we have a direct function call
123  // for this.
124  return evtStore()->event()->getKey( ptr );
125 #else
126  const SG::DataProxy* proxy = evtStore()->proxy( ptr );
127  return ( proxy == nullptr ? 0 : proxy->sgkey() );
128 #endif // XAOD_STANDALONE
129  }

◆ getName()

const std::string & asg::AsgTool::getName ( const void *  ptr) const
inherited

Get the name of an object that is / should be in the event store.

This is a bit of a special one. StoreGateSvc and xAOD::TEvent both provide ways for getting the std::string name for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.

In order to allow tools to efficiently perform this operation, they can use this helper function.

See also
asg::AsgTool::getKey
Parameters
ptrThe bare pointer to the object that the event store should know about
Returns
The string name of the object in the store. If not found, an empty string.

Definition at line 106 of file AsgTool.cxx.

106  {
107 
108 #ifdef XAOD_STANDALONE
109  // In case we use @c xAOD::TEvent, we have a direct function call
110  // for this.
111  return evtStore()->event()->getName( ptr );
112 #else
113  const SG::DataProxy* proxy = evtStore()->proxy( ptr );
114  static const std::string dummy = "";
115  return ( proxy == nullptr ? dummy : proxy->name() );
116 #endif // XAOD_STANDALONE
117  }

◆ getPpmAdcSamplesR3_()

std::vector< uint16_t > ZdcByteStreamReadV1V2Tool::getPpmAdcSamplesR3_ ( State state,
BitReader br,
uint8_t  format,
uint8_t  minIndex 
) const
private

Definition at line 552 of file ZdcByteStreamReadV1V2Tool.cxx.

554  {
555 
556  std::vector<uint16_t> adc = {0, 0, 0, 0, 0};
557  uint8_t minAdc = 0;
558 
559  for(uint8_t i = 0; i <5; ++i) {
560  uint8_t longField = 0;
561  uint8_t numBits = 0;
562  if (format > 2) {
563  longField = br.getField (1);
564  numBits = longField == 0? 4: (format * 2);
565  } else {
566  numBits = i == 0? 4: (format + 2);
567  }
568 
569  if (i == 0) {
570  minAdc = br.getField (numBits);
571  if (longField == 0) {
572  minAdc += state.m_caloUserHeader.ppLowerBound();
573  }
574  } else {
575  adc[i] = minAdc + br.getField (numBits);
576  }
577  }
578 
579  if (minIndex == 0) {
580  adc[0] = minAdc;
581  } else {
582  adc[0] = adc[minIndex];
583  adc[minIndex] = minAdc;
584  }
585  return adc;
586 }

◆ getPpmAdcSamplesR4_()

std::vector< uint16_t > ZdcByteStreamReadV1V2Tool::getPpmAdcSamplesR4_ ( State state,
BitReader br,
uint8_t  encoding,
uint8_t  minIndex 
) const
private

Definition at line 840 of file ZdcByteStreamReadV1V2Tool.cxx.

842  {
843  uint8_t numAdc = state.m_subBlockHeader.nSlice2();
844 
845  if (encoding == 6) {
846  uint16_t val = br.getField (6);
847  return std::vector<uint16_t>(numAdc, val);
848  } else if ( encoding < 3) {
849  std::vector<uint16_t> adc(numAdc, 0);
850  uint16_t minAdc = br.getField (5) + state.m_caloUserHeader.ppLowerBound();
851  adc[minIndex] = minAdc;
852  for(uint8_t i = 1; i < numAdc; ++i) {
853  adc[i == minIndex? 0: i] = br.getField (encoding + 2) + minAdc;
854  }
855  return adc;
856  } else {
857  std::vector<uint16_t> adc(numAdc, 0);
858  uint16_t minAdc = br.getField (1)
859  ? br.getField (encoding * 2)
860  : (br.getField (5) +
861  state.m_caloUserHeader.ppLowerBound());
862 
863  adc[minIndex] = minAdc;
864  for (uint8_t i = 1; i < numAdc; ++i) {
865  adc[minIndex == i? 0: i] = br.getField (
866  br.getField (1)? encoding * 2: 4
867  ) + minAdc;
868  }
869  return adc;
870  }
871 }

◆ getProperty()

template<class T >
const T* asg::AsgTool::getProperty ( const std::string &  name) const
inherited

Get one of the tool's properties.

◆ initialize()

StatusCode ZdcByteStreamReadV1V2Tool::initialize ( )
virtual

Dummy implementation of the initialisation function.

It's here to allow the dual-use tools to skip defining an initialisation function. Since many are doing so...

Reimplemented from asg::AsgTool.

Definition at line 95 of file ZdcByteStreamReadV1V2Tool.cxx.

95  {
96 
97  m_srcIdMap = new ZdcSrcIdMap();
98  CHECK(m_errorTool.retrieve());
99  //CHECK(m_ppmMaps.retrieve());
100  CHECK(m_robDataProvider.retrieve());
101 
102  const ZdcID* zdcID = nullptr;
103  if (detStore()->retrieve( zdcID ).isFailure() ) {
104  msg(MSG::ERROR) << "execute: Could not retrieve ZdcID object from the detector store" << endmsg;
105  return StatusCode::FAILURE;
106  }
107  else {
108  msg(MSG::DEBUG) << "execute: retrieved ZdcID" << endmsg;
109  }
110  m_zdcID = zdcID;
111 
112  initSourceIDs();
113 
114  return StatusCode::SUCCESS;
115 }

◆ initSourceIDs()

void ZdcByteStreamReadV1V2Tool::initSourceIDs ( )
private

Definition at line 1075 of file ZdcByteStreamReadV1V2Tool.cxx.

1076 {
1077  const int crates = 8;
1078  m_ppmSourceIDs.clear();
1079  m_ppmSourceIDsSpare.clear();
1080  m_ppmSourceIDsMuon.clear();
1081 
1082  for (int crate = 0; crate < crates; ++crate) {
1083  for (int slink = 0; slink < m_srcIdMap->maxSlinks(); ++slink) {
1084  //const uint32_t rodId = m_srcIdMap->getRodID(crate, slink, 0,
1085  // eformat::TDAQ_CALO_PREPROC);
1086  const uint32_t rodId = m_srcIdMap->getRodID(crate, slink, 0,
1087  eformat::FORWARD_ZDC);
1088  const uint32_t robId = m_srcIdMap->getRobID(rodId);
1089  m_ppmSourceIDs.push_back(robId);
1090  //std::cout << "robId=" << std::hex << robId << std::dec << std::endl;
1091  if (crate > 1 && crate < 6) {
1092  m_ppmSourceIDsSpare.push_back(robId);
1093  if (crate < 4 && slink == 0) {
1094  m_ppmSourceIDsMuon.push_back(robId);
1095  }
1096  }
1097  }
1098  }
1099 }

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

◆ interpretPpmHeaderR4V1_()

void ZdcByteStreamReadV1V2Tool::interpretPpmHeaderR4V1_ ( BitReader br,
uint8_t  numAdc,
int8_t &  encoding,
int8_t &  minIndex 
) const
private

Definition at line 790 of file ZdcByteStreamReadV1V2Tool.cxx.

792  {
793  uint8_t minHeader = 0;
794 
795  if (numAdc == 5) {
796  minHeader = br.getField (4);
797  //ATH_MSG_DEBUG("SASHA: minHeader=" << int(minHeader));
798  minIndex = minHeader % 5;
799  if (minHeader < 15){ // Encodings 0-5
800  if (minHeader < 10) {
801  encoding = minHeader / 5;
802  } else {
803  encoding = 2 + br.getField (2);
804  }
805  } else {
806  encoding = 6;
807  }
808  } else {
809  uint8_t numBits = 0;
810  if (numAdc ==3 ) {
811  numBits = 2;
812  } else if (numAdc == 7) {
813  numBits = 3;
814  } else if (numAdc < 16) {
815  numBits = 4;
816  }
817 
818  if (numBits > 0) {
819  uint8_t fieldSize = 1 << numBits;
820  minHeader = br.getField (numBits);
821  uint8_t encValue = fieldSize - 1;
822  if (minHeader == encValue) { // Encoding 6
823  encoding = 6;
824  minIndex = 0;
825  } else {
826  minHeader += br.getField (2) << numBits;
827  minIndex = minHeader % fieldSize;
828  encValue = 3 * fieldSize;
829 
830  if (minHeader < encValue) { // Encodings 0-2
831  encoding = minHeader / fieldSize;
832  } else {
833  encoding = 3 + br.getField (2);
834  }
835  }
836  }
837  }
838 }

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

◆ msg_level_name()

const std::string & asg::AsgTool::msg_level_name ( ) const
inherited

A deprecated function for getting the message level's name.

Instead of using this, weirdly named function, user code should get the string name of the current minimum message level (in case they really need it...), with:

MSG::name( msg().level() )

This function's name doesn't follow the ATLAS coding rules, and as such will be removed in the not too distant future.

Returns
The string name of the current minimum message level that's printed

Definition at line 101 of file AsgTool.cxx.

101  {
102 
103  return MSG::name( msg().level() );
104  }

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

◆ ppmSourceIDs()

const std::vector< uint32_t > & ZdcByteStreamReadV1V2Tool::ppmSourceIDs ( const std::string &  sgKey) const

Return reference to vector with all possible Source Identifiers.

Definition at line 1103 of file ZdcByteStreamReadV1V2Tool.cxx.

1105 {
1106  if (sgKey.find("Muon") != std::string::npos) {
1107  return m_ppmSourceIDsMuon;
1108  }
1109  else if (sgKey.find("Spare") != std::string::npos) {
1110  return m_ppmSourceIDsSpare;
1111  }
1112 
1113  return m_ppmSourceIDs;
1114 }

◆ print()

void asg::AsgTool::print ( ) const
virtualinherited

◆ processPpmBlock_()

StatusCode ZdcByteStreamReadV1V2Tool::processPpmBlock_ ( State state) const
private

Definition at line 344 of file ZdcByteStreamReadV1V2Tool.cxx.

344  {
345  if (!state.m_ppBlock.empty()) {
346  if (state.m_subBlockHeader.format() == 0) {
348  state.m_ppBlock.clear();
349  CHECK(sc);
350  return sc;
351  }
352 
353  if (state.m_verCode == 0x31) {
355  state.m_ppBlock.clear();
356  CHECK(sc);
357  return sc;
358  }
359 
360  if (state.m_verCode == 0x41 || state.m_verCode == 0x42) {
362  state.m_ppBlock.clear();
363  CHECK(sc);
364  return sc;
365  }
366  }
367 
368  if (!state.m_ppLuts.empty()) {
369  if (state.m_verCode == 0x21 || state.m_verCode == 0x31) {
371  state.m_ppLuts.clear();
372  state.m_ppFadcs.clear();
373  CHECK(sc);
374  return sc;
375  }
376  ATH_MSG_ERROR("Unknown PPM subheader format '"
377  << int(state.m_subBlockHeader.format())
378  << "' for rob version '"
379  << MSG::hex << int(state.m_verCode)
380  << MSG::dec << "'" );
381  return StatusCode::FAILURE;
382  }
383  return StatusCode::SUCCESS;
384 }

◆ processPpmBlockR3V1_()

StatusCode ZdcByteStreamReadV1V2Tool::processPpmBlockR3V1_ ( State state) const
private

Definition at line 873 of file ZdcByteStreamReadV1V2Tool.cxx.

873  {
874  if (state.m_subBlockHeader.format() == 1) {
876  return StatusCode::SUCCESS;
877  } else if (state.m_subBlockHeader.format() >= 2) {
878  // TODO: convert compressed
879  return StatusCode::FAILURE;
880  }
881  return StatusCode::FAILURE;
882 }

◆ processPpmBlockR4V1_()

StatusCode ZdcByteStreamReadV1V2Tool::processPpmBlockR4V1_ ( State state) const
private

Definition at line 627 of file ZdcByteStreamReadV1V2Tool.cxx.

627  {
628  if (state.m_subBlockHeader.format() == 1) {
630  return StatusCode::SUCCESS;
631  } else if (state.m_subBlockHeader.format() >= 2) {
632  // TODO: convert compressed
634  return StatusCode::SUCCESS;
635  }
636  return StatusCode::FAILURE;
637 }

◆ processPpmCompressedR3V1_()

StatusCode ZdcByteStreamReadV1V2Tool::processPpmCompressedR3V1_ ( State state) const
private

Definition at line 469 of file ZdcByteStreamReadV1V2Tool.cxx.

469  {
470  uint8_t chan = 0;
471  BitReader br (state.m_ppBlock);
472  try{
473  while (chan < 64) {
474  uint8_t present = 1;
475  if (state.m_subBlockHeader.format() == 3) {
476  present = br.getField (1);
477  }
478 
479  if (present == 1) {
480  uint8_t lutVal = 0;
481  uint8_t fmt = 6;
482  uint8_t lutSat=0;
483  uint8_t lutExt=0;
484  uint8_t lutPeak=0;
485 
486  std::vector<uint16_t> adcVal = {0 , 0, 0, 0, 0};
487  std::vector<uint8_t> adcExt = {0 , 0, 0, 0, 0};
488 
489  uint8_t minHeader = br.getField (4);
490  uint8_t minIndex = minHeader % 5;
491  if (minHeader < 15) { // Formats 0-5
492  if (minHeader < 10) { // Formats 0-1
493  fmt = minHeader / 5;
494  } else { // Formats 2-5
495  fmt = 2 + br.getField (2);
496  uint8_t haveLut = br.getField (1);
497  if (fmt == 2) {
498  if (haveLut == 1) {
499  lutVal = br.getField (3);
500  lutPeak = 1; // Even if LutVal==0 it seems
501  }
502  } else {
503  uint8_t haveExt = br.getField (1);
504  if (haveLut == 1) {
505  lutVal = br.getField (8);
506  lutExt = br.getField (1);
507  lutSat = br.getField (1);
508  lutPeak = br.getField (1);
509  }
510 
511  if (haveExt == 1){
512  for(uint8_t i = 0; i < 5; ++i) {
513  adcExt[i] = br.getField (1);
514  }
515  } else {
516  adcExt[2] = lutExt;
517  }
518  }
519  }
520  adcVal = getPpmAdcSamplesR3_(state, br, fmt, minIndex);
521  } else {
522  uint8_t haveAdc = br.getField (1);
523  if (haveAdc == 1) {
524  uint16_t val = br.getField (10);
525  for(uint8_t i = 0; i < 5; ++i) {
526  adcVal[i] = val;
527  }
528  }
529  }
530  // Add Trigger Tower
531  //std::vector<uint8_t> luts = {lutVal};
533  state,
534  state.m_subBlockHeader.crate(),
535  state.m_subBlockHeader.module(),
536  chan,
537  std::vector<uint8_t> {lutVal},
538  std::vector<uint8_t> {uint8_t(lutExt | (lutSat << 1) | (lutPeak << 2))},
539  adcVal,
540  adcExt
541  ));
542  }
543  chan++;
544  }
545  }catch (const std::out_of_range& ex) {
546  ATH_MSG_WARNING("Excess Data in Sub-block");
547  m_errorTool->rodError(state.m_rodSourceId, ZdcL1CaloSubBlock::UNPACK_EXCESS_DATA);
548  }
549  return StatusCode::SUCCESS;
550 }

◆ processPpmCompressedR4V1_()

StatusCode ZdcByteStreamReadV1V2Tool::processPpmCompressedR4V1_ ( State state) const
private

Definition at line 639 of file ZdcByteStreamReadV1V2Tool.cxx.

639  {
640  BitReader br (state.m_ppBlock);
641 
642  uint8_t numAdc = state.m_subBlockHeader.nSlice2();
643  uint8_t numLut = state.m_subBlockHeader.nSlice1();
644  int16_t pedCorBase = -20;
645 
646 
647  // for(size_t i = 0; i < state.m_ppBlock.size(); ++i) {
648  // std::bitset<32> x(state.m_ppBlock[i]);
649  // std::cout << i << " " << x << std::endl;
650  // }
651 
652  try{
653  for(uint8_t chan = 0; chan < 64; ++chan) {
654  uint8_t present = 1;
655 
656  std::vector<uint8_t> haveLut(numLut, 0);
657  std::vector<uint8_t> lcpVal(numLut, 0);
658 
659  std::vector<uint8_t> lcpExt(numLut, 0);
660  std::vector<uint8_t> lcpSat(numLut, 0);
661  std::vector<uint8_t> lcpPeak(numLut, 0);
662  std::vector<uint8_t> lcpBcidVec(numLut, 0);
663 
664  std::vector<uint8_t> ljeVal(numLut, 0);
665 
666  std::vector<uint8_t> ljeLow(numLut, 0);
667  std::vector<uint8_t> ljeHigh(numLut, 0);
668  std::vector<uint8_t> ljeRes(numLut, 0);
669  std::vector<uint8_t> ljeSat80Vec(numLut, 0);
670 
671  std::vector<uint16_t> adcVal(numAdc, 0);
672  std::vector<uint8_t> adcExt(numAdc, 0);
673  std::vector<int16_t> pedCor(numLut, 0);
674  std::vector<uint8_t> pedEn(numLut, 0);
675 
676  int8_t encoding = -1;
677  int8_t minIndex = -1;
678 
679  if (state.m_subBlockHeader.format() == 3) {
680  present = br.getField (1);
681  }
682  if (present == 1) {
683  interpretPpmHeaderR4V1_(br, numAdc, encoding, minIndex);
684  CHECK((encoding != -1) && (minIndex != -1));
685  // First get the LIT related quantities
686  if (encoding < 3) {
687  // Get the peal finder bits
688  for(uint i=0; i < numLut; ++i) {
689  lcpPeak[i] = br.getField (1);
690  }
691  // Get Sat80 low bits
692  if (encoding > 0) {
693  for (uint8_t i = 0; i < numLut; ++i) {
694  ljeLow[i] = br.getField (1);
695  }
696  }
697  // Get LutCP and LutJEP values (these are
698  // only present if the peak finder is set).
699  if (encoding == 2) {
700  for (uint8_t i = 0; i < numLut; ++i) {
701  if (lcpPeak[i] == 1) {
702  lcpVal[i] = br.getField (4);
703  }
704  }
705  for(uint8_t i = 0; i < numLut; ++i) {
706  if (lcpPeak[i] == 1){
707  ljeVal[i] = br.getField (3);
708  }
709  }
710  }
711  } else if (encoding < 6) {
712  // Get LUT presence flag for each LUT slice.
713  for(uint8_t i = 0; i < numLut; ++i){
714  haveLut[i] = br.getField (1);
715  }
716 
717  // Get external BCID bits (if block is present).
718  uint8_t haveExt = br.getField (1);
719 
720  if (haveExt == 1) {
721  for (uint8_t i = 0; i < numAdc; ++i) {
722  adcExt[i] = br.getField (1);
723  }
724  }
725 
726  for(uint8_t i = 0; i < numLut; ++i){
727  if (haveLut[i] == 1) {
728  lcpVal[i] = br.getField (8);
729  lcpExt[i] = br.getField (1);
730  lcpSat[i] = br.getField (1);
731  lcpPeak[i] = br.getField (1);
732  }
733  }
734  // Get JEP LUT values and corresponding bits.
735  for(uint8_t i = 0; i < numLut; ++i){
736  if (haveLut[i] == 1) {
737  ljeVal[i] = br.getField (8);
738  ljeLow[i] = br.getField (1);
739  ljeHigh[i] = br.getField (1);
740  ljeRes[i] = br.getField (1);
741  }
742  }
743 
744  }
745 
746  }
747 
748  if (minIndex < 0)
749  return StatusCode::FAILURE;
750 
751  // Next get the ADC related quantities (all encodings).
752  adcVal = getPpmAdcSamplesR4_(state, br, encoding, minIndex);
753  // Finally get the pedestal correction.
754  if ((encoding < 3) || (encoding == 6)) {
755  for (uint8_t i = 0; i < numLut; ++i)
756  {
757  pedCor[i] = br.getField (6) + pedCorBase;
758  if (state.m_subBlockHeader.compVer() > 0) {
759  pedEn[i] = 1;
760  }
761  }
762  } else {
763  // At the moment there is an enabled bit for every LUT slice
764  // (even though its really a global flag).
765  // The correction values is a twos complement signed value.
766  for (uint8_t i = 0; i < numLut; ++i)
767  {
768  uint16_t val = br.getField (10);
769  pedCor[i] = ::pedCorrection(val);
770  pedEn[i] = br.getField (1);
771  }
772  }
773 
774  for(uint8_t i=0; i < numLut; ++i){
775  lcpBcidVec[i] = uint8_t((lcpPeak[i] << 2) | (lcpSat[i] << 1) | lcpExt[i]);
776  ljeSat80Vec[i] = uint8_t((ljeRes[i] << 2) | (ljeHigh[i] << 1) | ljeLow[i]);
777  }
778  CHECK(addTriggerTowerV2_(state, state.m_subBlockHeader.crate(), state.m_subBlockHeader.module(),
779  chan, lcpVal, lcpBcidVec, ljeVal, ljeSat80Vec, adcVal, adcExt, pedCor,
780  pedEn));
781  }
782  } catch (const std::out_of_range& ex) {
783  ATH_MSG_WARNING("Excess Data in Sub-block");
784  m_errorTool->rodError(state.m_rodSourceId, ZdcL1CaloSubBlock::UNPACK_EXCESS_DATA);
785  }
786  return StatusCode::SUCCESS;
787 
788 }

◆ processPpmNeutral_()

StatusCode ZdcByteStreamReadV1V2Tool::processPpmNeutral_ ( State state) const
private

Definition at line 386 of file ZdcByteStreamReadV1V2Tool.cxx.

386  {
387  uint8_t numLut = state.m_subBlockHeader.nSlice1();
388  uint8_t numFadc = state.m_subBlockHeader.nSlice2();
389  uint8_t totSlice = 3 * numLut + numFadc;
390 
391  uint8_t channel = 0;
392  for ( int asic = 0 ; asic < 4 ; ++asic ) {
393  for ( int mcm = 0 ; mcm < 16 ; ++mcm ) {
394  // ----------------------------------------------------------------------
395  std::vector<uint32_t> rotated(totSlice);
396 
397  for ( uint8_t slice = 0 ; slice < totSlice ; ++slice ) {
398  for ( uint8_t bit = 0 ; bit < 11 ; ++bit ) {
399  if ( state.m_ppBlock[slice * 11 + asic * (11 * totSlice) + bit + 1] & (1 << mcm))
400  rotated[slice] |= (1 << bit);
401  }
402  }
403 
404  bool nonZeroData = false;
405  for (uint8_t slice = 0; slice < numLut; ++slice) {
406  if (rotated[slice]
407  || rotated[slice + numLut]
408  || rotated[slice + 2 * numLut + numFadc]) { // CP, JET
409  nonZeroData = true;
410  break;
411  }
412  }
413 
414  std::vector<uint8_t> lcpVal;
415  std::vector<uint8_t> lcpBcidVec;
416  std::vector<uint8_t> ljeVal;
417  std::vector<uint8_t> ljeSat80Vec;
418  std::vector<int16_t> pedCor;
419  std::vector<uint8_t> pedEn;
420 
421  std::vector<uint16_t> adcVal;
422  std::vector<uint8_t> adcExt;
423 
424  if (nonZeroData) {
425  for (uint8_t slice = 0; slice < numLut; ++slice) {
426  lcpVal.push_back(rotated[slice] & 0xff);
427  ljeVal.push_back(rotated[slice + numLut] & 0xff);
428  pedCor.push_back(::pedCorrection(rotated[slice + 2 * numLut + numFadc] & 0x3ff));
429 
430  lcpBcidVec.push_back((rotated[slice] >> 8) & 0x7);
431  ljeSat80Vec.push_back((rotated[slice + numLut] >> 8) & 0x7);
432  pedEn.push_back((rotated[slice + 2 * numLut + numFadc] >> 10) & 0x1);
433  }
434  }
435 
436  for (uint8_t slice = 0; slice < numFadc; ++slice) {
437  if (rotated[slice + numLut]) { // CP, JET
438  nonZeroData = true;
439  break;
440  }
441  }
442 
443  if (nonZeroData) {
444  for (uint8_t slice = 0; slice < numFadc; ++ slice) {
445  adcVal.push_back(rotated[slice + 2 * numLut] & 0x3ff);
446  adcExt.push_back((rotated[slice + 2 * numLut] >> 10 & 0x1) & 0x3ff);
447  }
448  }
449 
451  state,
452  state.m_subBlockHeader.crate(),
453  state.m_subBlockHeader.module(),
454  channel,
455  lcpVal,
456  lcpBcidVec,
457  ljeVal,
458  ljeSat80Vec, adcVal,
459  adcExt,
460  pedCor,
461  pedEn));
462  // ---------------------------------------------------------------------
463  channel++;
464  }
465  }
466  return StatusCode::SUCCESS;
467 }

◆ processPpmStandardR3V1_() [1/2]

StatusCode ZdcByteStreamReadV1V2Tool::processPpmStandardR3V1_ ( State state) const
private

Definition at line 942 of file ZdcByteStreamReadV1V2Tool.cxx.

942  {
943  for(const auto& lut : state.m_ppLuts) {
945  state,
946  state.m_subBlockHeader.crate(),
947  state.m_subBlockHeader.module(),
948  lut.first,
949  lut.second,
950  state.m_ppFadcs[lut.first]));
951  }
952  return StatusCode::SUCCESS;
953 }

◆ processPpmStandardR3V1_() [2/2]

StatusCode ZdcByteStreamReadV1V2Tool::processPpmStandardR3V1_ ( State state,
uint32_t  word,
int  indata 
) const
private

Definition at line 590 of file ZdcByteStreamReadV1V2Tool.cxx.

592  {
593  StatusCode sc;
594  if (state.m_subBlockHeader.seqNum() == 63) { // Error block
595  ATH_MSG_DEBUG("Error PPM subblock");
596  //TODO: errorTool
597  } else {
598  const uint8_t numAdc = state.m_subBlockHeader.nSlice2();
599  const uint8_t numLut = state.m_subBlockHeader.nSlice1();
600  const uint8_t nTotal = numAdc + numLut;
601  const uint8_t wordsPerBlock = 8; // 16 towers (4 MCMs) / 2 per word
602  const uint8_t iBlk = inData / wordsPerBlock;
603  uint8_t iChan = state.m_subBlockHeader.seqNum() + 2 * (inData % wordsPerBlock);
604 
605  if (iBlk < numLut) { // First all LUT values
606  for(uint8_t i = 0; i < 2; ++i) {
607  uint16_t subword = (word >> 16 * i) & 0x7ff;
608  state.m_ppLuts[iChan].push_back(subword);
609  iChan++;
610  }
611  } else if (iBlk < nTotal) { // Next all FADC values
612  for(uint8_t i = 0; i < 2; ++i) {
613  uint16_t subword = (word >> (16 * i)) & 0x7ff;
614  state.m_ppFadcs[iChan].push_back(subword);
615  iChan++;
616  }
617 
618  } else{
619  ATH_MSG_WARNING("Error decoding Ppm word (run1)");
620  sc = StatusCode::FAILURE;
621  }
622 
623  }
624  return sc;
625 }

◆ processPpmStandardR4V1_()

StatusCode ZdcByteStreamReadV1V2Tool::processPpmStandardR4V1_ ( State state) const
private

Definition at line 884 of file ZdcByteStreamReadV1V2Tool.cxx.

884  {
885 
886  //std::cout << "Here I am in processPpmStandardR4V1_" << std::endl;
887  uint8_t numAdc = state.m_subBlockHeader.nSlice2();
888  uint8_t numLut = state.m_subBlockHeader.nSlice1();
889  uint8_t crate = state.m_subBlockHeader.crate();
890  uint8_t module = state.m_subBlockHeader.module();
891 
892 
893  BitReader br (state.m_ppBlock);
894 
895  for (uint8_t chan = 0; chan < 64; ++chan) {
896  //for (uint8_t k = 0; k < 4; ++k) {
897  std::vector<uint8_t> lcpVal;
898  std::vector<uint8_t> lcpBcidVec;
899 
900  std::vector<uint8_t> ljeVal;
901  std::vector<uint8_t> ljeSat80Vec;
902 
903 
904 
905  std::vector<uint16_t> adcVal;
906  std::vector<uint8_t> adcExt;
907  std::vector<int16_t> pedCor;
908  std::vector<uint8_t> pedEn;
909  try {
910  for (int i = 0; i < numLut; ++i) {
911  lcpVal.push_back(br.getField (8));
912  lcpBcidVec.push_back(br.getField (3));
913  }
914 
915  for (int i = 0; i < numLut; ++i) {
916  ljeVal.push_back(br.getField (8));
917  ljeSat80Vec.push_back(br.getField (3));
918  }
919 
920  for (int i = 0; i < numAdc; ++i) {
921  adcVal.push_back(br.getField (10));
922  adcExt.push_back(br.getField (1));
923  }
924 
925  for (int i = 0; i < numLut; ++i) {
926  uint16_t pc = br.getField (10);
927  pedCor.push_back(pedCorrection(pc));
928  pedEn.push_back(br.getField (1));
929  }
930  } catch (const std::out_of_range& ex) {
931  ATH_MSG_WARNING("Excess Data in Sub-block");
932  m_errorTool->rodError(state.m_rodSourceId, ZdcL1CaloSubBlock::UNPACK_EXCESS_DATA);
933  }
934  CHECK(
935  addTriggerTowerV2_(state, crate, module, chan, lcpVal, lcpBcidVec,
936  ljeVal, ljeSat80Vec, adcVal, adcExt, pedCor, pedEn));
937  }
938 
939  return StatusCode::SUCCESS;
940 }

◆ processPpmWord_()

StatusCode ZdcByteStreamReadV1V2Tool::processPpmWord_ ( State state,
uint32_t  word,
int  indata 
) const
private

Definition at line 325 of file ZdcByteStreamReadV1V2Tool.cxx.

327  {
328  if ( (state.m_subBlockHeader.format() == 0)
329  || (state.m_subBlockHeader.format() >= 2)
330  || (state.m_verCode >= 0x41)) {
331  state.m_ppBlock.push_back(word);
332  } else if ((state.m_verCode == 0x21) || (state.m_verCode == 0x31)) {
333  return processPpmStandardR3V1_(state, word, indata);
334  } else {
335  ATH_MSG_ERROR("Unsupported PPM version:format ("
336  << state.m_verCode << ":" << state.m_subBlockHeader.format()
337  <<") combination");
338  return StatusCode::FAILURE;
339  }
340  return StatusCode::SUCCESS;
341 }

◆ processRobFragment_()

StatusCode ZdcByteStreamReadV1V2Tool::processRobFragment_ ( State state,
const ROBIterator robFrag,
const RequestType requestedType 
) const
private

Definition at line 207 of file ZdcByteStreamReadV1V2Tool.cxx.

209  {
210 
211  auto rob = **robIter;
212 
214  "Treating ROB fragment source id #" << MSG::hex << rob.rob_source_id());
215 
216 
217  state.m_rodSourceId = rob.rod_source_id();
218  state.m_robSourceId = rob.source_id();
219  const auto sourceID = (state.m_rodSourceId >> 16) & 0xff;
220  const auto rodCrate = ZdcSrcIdMap::crate(state.m_rodSourceId);
221  const auto rodSlink = ZdcSrcIdMap::slink(state.m_rodSourceId);
222  // -------------------------------------------------------------------------
223  // Check Rob status
224  if (rob.nstatus() > 0) {
225  ROBPointer robData;
226  rob.status(robData);
227  if (*robData != 0) {
228  ATH_MSG_WARNING("ROB status error - skipping fragment");
229  m_errorTool->robError(state.m_rodSourceId, *robData);
230  return StatusCode::FAILURE;
231  }
232  }
233  // -------------------------------------------------------------------------
234  RODPointer payloadBeg;
235  RODPointer payloadEnd;
237 
238  rob.rod_data(payloadBeg);
239  payloadEnd = payloadBeg + rob.rod_ndata();
240  payload = payloadBeg;
241  // -------------------------------------------------------------------------
242  if (payload == payloadEnd) {
243  ATH_MSG_DEBUG("ROB fragment empty");
244  return StatusCode::FAILURE;
245  }
246  // -------------------------------------------------------------------------
247 
248 
249  uint16_t rodVer = rob.rod_version() & 0xffff;
250  state.m_verCode = ((rodVer & 0xfff) << 4) | 1;
251  uint32_t rodRunNumber = rob.rod_run_no() & 0xffffff;
252 
253 
254  if (sourceID != state.m_subDetectorID) {
255  ATH_MSG_ERROR("Wrong subdetector source id for requested objects: " << state.m_rodSourceId);
256  return StatusCode::FAILURE;
257  }
258 
259  ATH_MSG_DEBUG("Treating crate " << rodCrate << " slink " << rodSlink);
260 
261  state.m_caloUserHeader = ZdcCaloUserHeader(*payload);
262  if (!state.m_caloUserHeader.isValid()) {
263  ATH_MSG_ERROR("Invalid or missing user header");
264  return StatusCode::FAILURE;
265  }
266 
268  "Run number: " << MSG::dec << rodRunNumber << endmsg
269  << "Version code: 0x" << MSG::hex << int(state.m_verCode) << MSG::dec
270  << endmsg << "LUT triggered slice offset: "
271  << int(state.m_caloUserHeader.lut()) << endmsg
272  << "FADC triggered slice offset: " << int(state.m_caloUserHeader.ppFadc())
273  << endmsg << "FADC baseline lower bound: "
274  << int(state.m_caloUserHeader.ppLowerBound()));
275 
276  int indata = 0;
277  uint8_t blockType = 0;
278  int subBlock = 0;
279 
280  for (; payload != payloadEnd; ++payload) {
281  if (ZdcCaloUserHeader::isValid(*payload) && (subBlock == 0)) {
282 
284  indata = 0;
285  CHECK(processPpmBlock_(state));
286 
287  state.m_ppLuts.clear();
288  state.m_ppFadcs.clear();
289  state.m_ppBlock.clear();
290 
291  blockType = (*payload >> 28) & 0xf;
292 
293  if ((blockType & 0xd) == 0xc) {
294  state.m_subBlockHeader = ZdcSubBlockHeader(*payload);
296  "SubBlock version #" << int(state.m_subBlockHeader.version())
297  << " format #" << int(state.m_subBlockHeader.format())
298  << " seqNum (compVer) #" << int(state.m_subBlockHeader.seqNum())
299  << " nslice1 #" << int(state.m_subBlockHeader.nSlice1())
300  << " nslice2 #" << int(state.m_subBlockHeader.nSlice2())
301  );
302  subBlock = blockType & 0xe;
303  } else if (blockType == (subBlock | 1)) {
304  //m_subBlockStatus = ZdcSubBlockStatus(*payload);
305  subBlock = 0;
306  }
307  } else {
308  switch(state.m_subDetectorID){
309  case eformat::TDAQ_CALO_PREPROC:
310  CHECK(processPpmWord_(state, *payload, indata));
311  break;
312  case eformat::FORWARD_ZDC:
313  CHECK(processPpmWord_(state, *payload, indata));
314  break;
315  default:
316  break;
317  }
318  indata++;
319  }
320  }
321  CHECK(processPpmBlock_(state));
322  return StatusCode::SUCCESS;
323 }

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

◆ 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_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_errorTool

ToolHandle<ZdcL1CaloErrorByteStreamTool> ZdcByteStreamReadV1V2Tool::m_errorTool
private

Definition at line 213 of file ZdcByteStreamReadV1V2Tool.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_ppmSourceIDs

std::vector<uint32_t> ZdcByteStreamReadV1V2Tool::m_ppmSourceIDs
private

Definition at line 220 of file ZdcByteStreamReadV1V2Tool.h.

◆ m_ppmSourceIDsMuon

std::vector<uint32_t> ZdcByteStreamReadV1V2Tool::m_ppmSourceIDsMuon
private

Definition at line 221 of file ZdcByteStreamReadV1V2Tool.h.

◆ m_ppmSourceIDsSpare

std::vector<uint32_t> ZdcByteStreamReadV1V2Tool::m_ppmSourceIDsSpare
private

Definition at line 222 of file ZdcByteStreamReadV1V2Tool.h.

◆ m_robDataProvider

ServiceHandle<IROBDataProviderSvc> ZdcByteStreamReadV1V2Tool::m_robDataProvider
private

Channel mapping tool.

Service for reading bytestream

Definition at line 217 of file ZdcByteStreamReadV1V2Tool.h.

◆ m_srcIdMap

ZdcSrcIdMap* ZdcByteStreamReadV1V2Tool::m_srcIdMap
private

Definition at line 223 of file ZdcByteStreamReadV1V2Tool.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.

◆ m_zdcID

const ZdcID* ZdcByteStreamReadV1V2Tool::m_zdcID
private

Definition at line 224 of file ZdcByteStreamReadV1V2Tool.h.


The documentation for this class was generated from the following files:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
ZdcSrcIdMap::crate
static int crate(uint32_t code)
moduleID -> crate
Definition: ZdcSrcIdMap.cxx:55
ZdcByteStreamReadV1V2Tool::convert
StatusCode convert(const IROBDataProviderSvc::VROBFRAG &robFrags, xAOD::TriggerTowerContainer *const ttCollection) const
Convert ROB fragments to trigger towers.
Definition: ZdcByteStreamReadV1V2Tool.cxx:126
ZdcCablingService::getInstance
static const ZdcCablingService * getInstance()
get pointer to service instance
Definition: ZdcCablingService.cxx:14
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:216
ZdcByteStreamReadV1V2Tool::RODPointer
OFFLINE_FRAGMENTS_NAMESPACE::PointerType RODPointer
Definition: ZdcByteStreamReadV1V2Tool.h:102
python.CaloRecoConfig.f
f
Definition: CaloRecoConfig.py:127
StateLessPT_NewConfig.proxy
proxy
Definition: StateLessPT_NewConfig.py:392
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
plotting.yearwise_efficiency.channel
channel
Definition: yearwise_efficiency.py:28
ZdcByteStreamReadV1V2Tool::m_ppmSourceIDs
std::vector< uint32_t > m_ppmSourceIDs
Definition: ZdcByteStreamReadV1V2Tool.h:220
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
vtune_athena.format
format
Definition: vtune_athena.py:14
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:575
ZdcByteStreamReadV1V2Tool::getPpmAdcSamplesR4_
std::vector< uint16_t > getPpmAdcSamplesR4_(State &state, BitReader &br, uint8_t encoding, uint8_t minIndex) const
Definition: ZdcByteStreamReadV1V2Tool.cxx:840
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
ZdcByteStreamReadV1V2Tool::initSourceIDs
void initSourceIDs()
Definition: ZdcByteStreamReadV1V2Tool.cxx:1075
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
xAOD::TriggerTowerAuxContainer
TriggerTowerAuxContainer_v2 TriggerTowerAuxContainer
Define the latest version of the TriggerTower auxiliary container.
Definition: TriggerTowerAuxContainer.h:14
ZdcByteStreamReadV1V2Tool::m_zdcID
const ZdcID * m_zdcID
Definition: ZdcByteStreamReadV1V2Tool.h:224
CaloCondBlobAlgs_fillNoiseFromASCII.gain
gain
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:110
ZdcSrcIdMap::getRobID
static uint32_t getRobID(uint32_t rod_id)
ROD -> ROB.
Definition: ZdcSrcIdMap.cxx:30
L1Topo::blockType
L1Topo::BlockTypes blockType(const uint32_t word, uint32_t offset=28, uint32_t size=0x0f)
Function to return the block type of a data word from L1Topo
Definition: BlockTypes.cxx:9
ZdcDigits
Definition: ZdcDigits.h:28
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
ZdcByteStreamReadV1V2Tool::processPpmBlockR3V1_
StatusCode processPpmBlockR3V1_(State &state) const
Definition: ZdcByteStreamReadV1V2Tool.cxx:873
ZdcSubBlockHeader
L1Calo User Header class.
Definition: ZdcSubBlockHeader.h:20
ZdcByteStreamReadV1V2Tool::processPpmBlock_
StatusCode processPpmBlock_(State &state) const
Definition: ZdcByteStreamReadV1V2Tool.cxx:344
ZdcCablingService::h2s_channel_id
Identifier h2s_channel_id(int crate, int channel) const
Definition: ZdcCablingService.cxx:326
ZdcByteStreamReadV1V2Tool::ROBPointer
OFFLINE_FRAGMENTS_NAMESPACE::PointerType ROBPointer
Definition: ZdcByteStreamReadV1V2Tool.h:101
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
ZdcByteStreamReadV1V2Tool::addTriggerTowerV2_
StatusCode addTriggerTowerV2_(State &state, uint8_t crate, uint8_t module, uint8_t channel, const std::vector< uint8_t > &lcpVal, const std::vector< uint8_t > &lcpBcidVec, const std::vector< uint8_t > &ljeVal, const std::vector< uint8_t > &ljeSat80Vec, const std::vector< uint16_t > &adcVal, const std::vector< uint8_t > &adcExt, const std::vector< int16_t > &pedCor, const std::vector< uint8_t > &pedEn) const
Definition: ZdcByteStreamReadV1V2Tool.cxx:955
ZdcByteStreamReadV1V2Tool::convertTT2ZD
ZdcDigitsCollection * convertTT2ZD(xAOD::TriggerTowerContainer *const ttCollection) const
Definition: ZdcByteStreamReadV1V2Tool.cxx:1143
xAOD::int16_t
setScaleOne setStatusOne setSaturated int16_t
Definition: gFexGlobalRoI_v1.cxx:55
ZdcByteStreamReadV1V2Tool::processPpmCompressedR3V1_
StatusCode processPpmCompressedR3V1_(State &state) const
Definition: ZdcByteStreamReadV1V2Tool.cxx:469
ZdcByteStreamReadV1V2Tool::interpretPpmHeaderR4V1_
void interpretPpmHeaderR4V1_(BitReader &br, uint8_t numAdc, int8_t &encoding, int8_t &minIndex) const
Definition: ZdcByteStreamReadV1V2Tool.cxx:790
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
ZdcByteStreamReadV1V2Tool::processPpmStandardR4V1_
StatusCode processPpmStandardR4V1_(State &state) const
Definition: ZdcByteStreamReadV1V2Tool.cxx:884
ZdcByteStreamReadV1V2Tool::processPpmStandardR3V1_
StatusCode processPpmStandardR3V1_(State &state) const
Definition: ZdcByteStreamReadV1V2Tool.cxx:942
ZdcByteStreamReadV1V2Tool::ppmSourceIDs
const std::vector< uint32_t > & ppmSourceIDs(const std::string &sgKey) const
Return reference to vector with all possible Source Identifiers.
Definition: ZdcByteStreamReadV1V2Tool.cxx:1103
python.PyAthena.module
module
Definition: PyAthena.py:134
AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
uint
unsigned int uint
Definition: LArOFPhaseFill.cxx:20
asg::AsgTool::AsgTool
AsgTool(const std::string &name)
Constructor specifying the tool instance's name.
Definition: AsgTool.cxx:58
ZdcCaloUserHeader::isValid
bool isValid() const
Definition: ZdcCaloUserHeader.cxx:46
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
slink2ppmChannel
const int slink2ppmChannel[64]
Definition: ZdcByteStreamReadV1V2Tool.cxx:41
ZdcByteStreamReadV1V2Tool::processPpmWord_
StatusCode processPpmWord_(State &state, uint32_t word, int indata) const
Definition: ZdcByteStreamReadV1V2Tool.cxx:325
Identifier32::get_compact
value_type get_compact(void) const
Get the compact id.
Definition: Identifier32.h:171
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:88
perfmonmt-refit.slice
slice
Definition: perfmonmt-refit.py:52
lumiFormat.i
int i
Definition: lumiFormat.py:92
ReadCellNoiseFromCool.chan
chan
Definition: ReadCellNoiseFromCool.py:52
ZdcCablingService::hwid2delay
int hwid2delay(int crate, int channel) const
Definition: ZdcCablingService.cxx:417
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
generateReferenceFile.encoding
encoding
Definition: generateReferenceFile.py:15
ZdcByteStreamReadV1V2Tool::RequestType::PPM
@ PPM
ZdcSrcIdMap::maxSlinks
static int maxSlinks()
Return the maximum possible number of slinks.
Definition: ZdcSrcIdMap.cxx:80
xAOD::TriggerTower_v2
Description of TriggerTower_v2.
Definition: TriggerTower_v2.h:49
ZdcByteStreamReadV1V2Tool::getPpmAdcSamplesR3_
std::vector< uint16_t > getPpmAdcSamplesR3_(State &state, BitReader &br, uint8_t format, uint8_t minIndex) const
Definition: ZdcByteStreamReadV1V2Tool.cxx:552
ZdcSrcIdMap::slink
static int slink(uint32_t code)
moduleID -> slink
Definition: ZdcSrcIdMap.cxx:71
python.xAODType.dummy
dummy
Definition: xAODType.py:4
MSG::name
const std::string & name(Level lvl)
Convenience function for translating message levels to strings.
Definition: MsgLevel.cxx:19
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
delay
double delay(std::size_t d)
Definition: JetTrigTimerTest.cxx:14
IROBDataProviderSvc::VROBFRAG
std::vector< const ROBF * > VROBFRAG
Definition: IROBDataProviderSvc.h:29
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
xAOD::TriggerTowerAuxContainer_v2
AuxContainer for TriggerTower_v2.
Definition: TriggerTowerAuxContainer_v2.h:28
ZdcByteStreamReadV1V2Tool::m_robDataProvider
ServiceHandle< IROBDataProviderSvc > m_robDataProvider
Channel mapping tool.
Definition: ZdcByteStreamReadV1V2Tool.h:217
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
plotBeamSpotCompare.xd
xd
Definition: plotBeamSpotCompare.py:220
ZdcL1CaloSubBlock::UNPACK_EXCESS_DATA
@ UNPACK_EXCESS_DATA
Definition: ZdcL1CaloSubBlock.h:42
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
xAOD::TriggerTowerContainer
TriggerTowerContainer_v2 TriggerTowerContainer
Define the latest version of the TriggerTower container.
Definition: TriggerTowerContainer.h:15
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
ZdcByteStreamReadV1V2Tool::processPpmCompressedR4V1_
StatusCode processPpmCompressedR4V1_(State &state) const
Definition: ZdcByteStreamReadV1V2Tool.cxx:639
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
PixelModuleFeMask_create_db.payload
string payload
Definition: PixelModuleFeMask_create_db.py:69
ZdcCablingService::hwid2gain
int hwid2gain(int crate, int channel) const
Definition: ZdcCablingService.cxx:407
ZdcSrcIdMap::getRodID
static uint32_t getRodID(int crate, int slink, int daqOrRoi, eformat::SubDetector subdet)
Make a ROD Source ID.
Definition: ZdcSrcIdMap.cxx:19
fmt
a
TList * a
Definition: liststreamerinfos.cxx:10
ZdcCaloUserHeader
L1Calo User Header class.
Definition: ZdcCaloUserHeader.h:22
h
ReadFloatFromCool.adc
adc
Definition: ReadFloatFromCool.py:48
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
ZdcByteStreamReadV1V2Tool::m_srcIdMap
ZdcSrcIdMap * m_srcIdMap
Definition: ZdcByteStreamReadV1V2Tool.h:223
DEBUG
#define DEBUG
Definition: page_access.h:11
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
ZdcByteStreamReadV1V2Tool::m_errorTool
ToolHandle< ZdcL1CaloErrorByteStreamTool > m_errorTool
Definition: ZdcByteStreamReadV1V2Tool.h:213
ZdcDigitsCollection
Definition: ZdcDigitsCollection.h:20
ZdcByteStreamReadV1V2Tool::processPpmNeutral_
StatusCode processPpmNeutral_(State &state) const
Definition: ZdcByteStreamReadV1V2Tool.cxx:386
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
ZdcByteStreamReadV1V2Tool::ROBIterator
IROBDataProviderSvc::VROBFRAG::const_iterator ROBIterator
Definition: ZdcByteStreamReadV1V2Tool.h:100
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
ZdcSrcIdMap
This class provides conversion between Lower level Source ID to higher level source ID for L1Calo Byt...
Definition: ZdcSrcIdMap.h:24
Identifier::get_identifier32
Identifier32 get_identifier32(void) const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
ZdcByteStreamReadV1V2Tool::processPpmBlockR4V1_
StatusCode processPpmBlockR4V1_(State &state) const
Definition: ZdcByteStreamReadV1V2Tool.cxx:627
SG::DataProxy
Definition: DataProxy.h:44
ZdcByteStreamReadV1V2Tool::m_ppmSourceIDsMuon
std::vector< uint32_t > m_ppmSourceIDsMuon
Definition: ZdcByteStreamReadV1V2Tool.h:221
error
Definition: IImpactPoint3dEstimator.h:70
TileDCSDataPlotter.tt
tt
Definition: TileDCSDataPlotter.py:874
ZdcID
Definition: ZdcID.h:25
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
ZdcByteStreamReadV1V2Tool::m_ppmSourceIDsSpare
std::vector< uint32_t > m_ppmSourceIDsSpare
Definition: ZdcByteStreamReadV1V2Tool.h:222
python.SystemOfUnits.pc
float pc
Definition: SystemOfUnits.py:99
ZdcByteStreamReadV1V2Tool::addTriggerTowerV1_
StatusCode addTriggerTowerV1_(State &state, uint8_t crate, uint8_t module, uint8_t channel, const std::vector< uint16_t > &luts, const std::vector< uint16_t > &fadc) const
Definition: ZdcByteStreamReadV1V2Tool.cxx:1044
fitman.k
k
Definition: fitman.py:528
xAOD::TriggerTower
TriggerTower_v2 TriggerTower
Define the latest version of the TriggerTower class.
Definition: Event/xAOD/xAODTrigL1Calo/xAODTrigL1Calo/TriggerTower.h:16
PlotCalibFromCool.br
br
Definition: PlotCalibFromCool.py:355
ZdcSubBlockHeader::isSubBlockHeader
bool isSubBlockHeader() const
Definition: ZdcSubBlockHeader.cxx:55
ZdcByteStreamReadV1V2Tool::processRobFragment_
StatusCode processRobFragment_(State &state, const ROBIterator &robFrag, const RequestType &requestedType) const
Definition: ZdcByteStreamReadV1V2Tool.cxx:207