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
 Service for reading bytestream. 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 39 of file ZdcByteStreamReadV1V2Tool.h.

Member Typedef Documentation

◆ ROBIterator

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

Definition at line 72 of file ZdcByteStreamReadV1V2Tool.h.

◆ ROBPointer

Definition at line 73 of file ZdcByteStreamReadV1V2Tool.h.

◆ RODPointer

Definition at line 74 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 71 of file ZdcByteStreamReadV1V2Tool.h.

71 { PPM, CPM, CMX };

Constructor & Destructor Documentation

◆ ZdcByteStreamReadV1V2Tool()

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

Definition at line 73 of file ZdcByteStreamReadV1V2Tool.cxx.

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

◆ ~ZdcByteStreamReadV1V2Tool()

virtual ZdcByteStreamReadV1V2Tool::~ZdcByteStreamReadV1V2Tool ( )
inlinevirtual

Definition at line 45 of file ZdcByteStreamReadV1V2Tool.h.

45 {};

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 1039 of file ZdcByteStreamReadV1V2Tool.cxx.

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

◆ 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 1016 of file ZdcByteStreamReadV1V2Tool.cxx.

1025  {
1026 
1027  std::vector<uint8_t> ljeSat80Vec;
1028 
1029  std::vector<int16_t> pedCor;
1030  std::vector<uint8_t> pedEn;
1031 
1032  CHECK(addTriggerTowerV2_(state, crate, module, channel, luts, lcpBcidVec,
1033  luts , ljeSat80Vec, fadc, bcidExt, pedCor, pedEn)
1034  );
1035 
1036  return StatusCode::SUCCESS;
1037 }

◆ 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 950 of file ZdcByteStreamReadV1V2Tool.cxx.

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

◆ convert() [1/4]

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

Convert ROB fragments to trigger towers.

Definition at line 121 of file ZdcByteStreamReadV1V2Tool.cxx.

124 {
125  State state;
126  state.m_subDetectorID = eformat::FORWARD_ZDC;
127  state.m_triggerTowers = ttCollection;
128 
129  ROBIterator rob = robFrags.begin();
130  ROBIterator robEnd = robFrags.end();
131 
132  int robCounter = 1;
133  for (; rob != robEnd; ++rob, ++robCounter) {
135  if (!sc.isSuccess()) {
136 
137  }
138  }
139  return StatusCode::SUCCESS;
140 }

◆ convert() [2/4]

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

Definition at line 148 of file ZdcByteStreamReadV1V2Tool.cxx.

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

◆ convert() [3/4]

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

Definition at line 185 of file ZdcByteStreamReadV1V2Tool.cxx.

186  {
187 
188  //std::cout << "convert " << sgKey << std::endl;
189 
190  const std::vector<uint32_t>& vID(ppmSourceIDs(sgKey));
191 
192  // // get ROB fragments
194  m_robDataProvider->getROBData(Gaudi::Hive::currentContext(), vID, robFrags, "ZdcByteStreamxAODReadTool");
195  ATH_MSG_DEBUG("Number of ROB fragments:" << robFrags.size());
196 
197  CHECK(convert(robFrags, ttCollection));
198  return StatusCode::SUCCESS;
199 }

◆ convert() [4/4]

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

Definition at line 179 of file ZdcByteStreamReadV1V2Tool.cxx.

180  {
181  //return convert(LVL1::TrigT1CaloDefs::xAODTriggerTowerLocation, ttCollection);
182  return convert("ZdcTriggerTowerContainer", ttCollection);
183 }

◆ convertTT2ZD()

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

Definition at line 1138 of file ZdcByteStreamReadV1V2Tool.cxx.

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

◆ 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 114 of file ZdcByteStreamReadV1V2Tool.cxx.

114  {
115  delete m_srcIdMap;
116 
117  return StatusCode::SUCCESS;
118 }

◆ 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 547 of file ZdcByteStreamReadV1V2Tool.cxx.

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

◆ getPpmAdcSamplesR4_()

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

Definition at line 835 of file ZdcByteStreamReadV1V2Tool.cxx.

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

◆ 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 90 of file ZdcByteStreamReadV1V2Tool.cxx.

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

◆ initSourceIDs()

void ZdcByteStreamReadV1V2Tool::initSourceIDs ( )
private

Definition at line 1070 of file ZdcByteStreamReadV1V2Tool.cxx.

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

◆ 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 785 of file ZdcByteStreamReadV1V2Tool.cxx.

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

◆ 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 1098 of file ZdcByteStreamReadV1V2Tool.cxx.

1100 {
1101  if (sgKey.find("Muon") != std::string::npos) {
1102  return m_ppmSourceIDsMuon;
1103  }
1104  else if (sgKey.find("Spare") != std::string::npos) {
1105  return m_ppmSourceIDsSpare;
1106  }
1107 
1108  return m_ppmSourceIDs;
1109 }

◆ print()

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

◆ processPpmBlock_()

StatusCode ZdcByteStreamReadV1V2Tool::processPpmBlock_ ( State state) const
private

Definition at line 339 of file ZdcByteStreamReadV1V2Tool.cxx.

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

◆ processPpmBlockR3V1_()

StatusCode ZdcByteStreamReadV1V2Tool::processPpmBlockR3V1_ ( State state) const
private

Definition at line 868 of file ZdcByteStreamReadV1V2Tool.cxx.

868  {
869  if (state.m_subBlockHeader.format() == 1) {
871  return StatusCode::SUCCESS;
872  } else if (state.m_subBlockHeader.format() >= 2) {
873  // TODO: convert compressed
874  return StatusCode::FAILURE;
875  }
876  return StatusCode::FAILURE;
877 }

◆ processPpmBlockR4V1_()

StatusCode ZdcByteStreamReadV1V2Tool::processPpmBlockR4V1_ ( State state) const
private

Definition at line 622 of file ZdcByteStreamReadV1V2Tool.cxx.

622  {
623  if (state.m_subBlockHeader.format() == 1) {
625  return StatusCode::SUCCESS;
626  } else if (state.m_subBlockHeader.format() >= 2) {
627  // TODO: convert compressed
629  return StatusCode::SUCCESS;
630  }
631  return StatusCode::FAILURE;
632 }

◆ processPpmCompressedR3V1_()

StatusCode ZdcByteStreamReadV1V2Tool::processPpmCompressedR3V1_ ( State state) const
private

Definition at line 464 of file ZdcByteStreamReadV1V2Tool.cxx.

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

◆ processPpmCompressedR4V1_()

StatusCode ZdcByteStreamReadV1V2Tool::processPpmCompressedR4V1_ ( State state) const
private

Definition at line 634 of file ZdcByteStreamReadV1V2Tool.cxx.

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

◆ processPpmNeutral_()

StatusCode ZdcByteStreamReadV1V2Tool::processPpmNeutral_ ( State state) const
private

Definition at line 381 of file ZdcByteStreamReadV1V2Tool.cxx.

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

◆ processPpmStandardR3V1_() [1/2]

StatusCode ZdcByteStreamReadV1V2Tool::processPpmStandardR3V1_ ( State state) const
private

Definition at line 937 of file ZdcByteStreamReadV1V2Tool.cxx.

937  {
938  for(const auto& lut : state.m_ppLuts) {
940  state,
941  state.m_subBlockHeader.crate(),
942  state.m_subBlockHeader.module(),
943  lut.first,
944  lut.second,
945  state.m_ppFadcs[lut.first]));
946  }
947  return StatusCode::SUCCESS;
948 }

◆ processPpmStandardR3V1_() [2/2]

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

Definition at line 585 of file ZdcByteStreamReadV1V2Tool.cxx.

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

◆ processPpmStandardR4V1_()

StatusCode ZdcByteStreamReadV1V2Tool::processPpmStandardR4V1_ ( State state) const
private

Definition at line 879 of file ZdcByteStreamReadV1V2Tool.cxx.

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

◆ processPpmWord_()

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

Definition at line 320 of file ZdcByteStreamReadV1V2Tool.cxx.

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

◆ processRobFragment_()

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

Definition at line 202 of file ZdcByteStreamReadV1V2Tool.cxx.

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

◆ 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 184 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 190 of file ZdcByteStreamReadV1V2Tool.h.

◆ m_ppmSourceIDsMuon

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

Definition at line 191 of file ZdcByteStreamReadV1V2Tool.h.

◆ m_ppmSourceIDsSpare

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

Definition at line 192 of file ZdcByteStreamReadV1V2Tool.h.

◆ m_robDataProvider

ServiceHandle<IROBDataProviderSvc> ZdcByteStreamReadV1V2Tool::m_robDataProvider
private

Service for reading bytestream.

Definition at line 187 of file ZdcByteStreamReadV1V2Tool.h.

◆ m_srcIdMap

ZdcSrcIdMap* ZdcByteStreamReadV1V2Tool::m_srcIdMap {}
private

Definition at line 193 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 194 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:121
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:74
StateLessPT_NewConfig.proxy
proxy
Definition: StateLessPT_NewConfig.py:392
plotting.yearwise_efficiency.channel
channel
Definition: yearwise_efficiency.py:24
ZdcByteStreamReadV1V2Tool::m_ppmSourceIDs
std::vector< uint32_t > m_ppmSourceIDs
Definition: ZdcByteStreamReadV1V2Tool.h:190
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
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:557
ZdcByteStreamReadV1V2Tool::getPpmAdcSamplesR4_
std::vector< uint16_t > getPpmAdcSamplesR4_(State &state, BitReader &br, uint8_t encoding, uint8_t minIndex) const
Definition: ZdcByteStreamReadV1V2Tool.cxx:835
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
ZdcByteStreamReadV1V2Tool::initSourceIDs
void initSourceIDs()
Definition: ZdcByteStreamReadV1V2Tool.cxx:1070
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:194
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
Identifier::get_identifier32
Identifier32 get_identifier32() const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
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:868
ZdcSubBlockHeader
L1Calo User Header class.
Definition: ZdcSubBlockHeader.h:20
ZdcByteStreamReadV1V2Tool::processPpmBlock_
StatusCode processPpmBlock_(State &state) const
Definition: ZdcByteStreamReadV1V2Tool.cxx:339
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:73
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
dbg::ptr
void * ptr(T *p)
Definition: SGImplSvc.cxx:74
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:950
ZdcByteStreamReadV1V2Tool::convertTT2ZD
ZdcDigitsCollection * convertTT2ZD(xAOD::TriggerTowerContainer *const ttCollection) const
Definition: ZdcByteStreamReadV1V2Tool.cxx:1138
xAOD::int16_t
setScaleOne setStatusOne setSaturated int16_t
Definition: gFexGlobalRoI_v1.cxx:55
Identifier32::get_compact
value_type get_compact() const
Get the compact id.
Definition: Identifier32.h:44
ZdcByteStreamReadV1V2Tool::processPpmCompressedR3V1_
StatusCode processPpmCompressedR3V1_(State &state) const
Definition: ZdcByteStreamReadV1V2Tool.cxx:464
ITkPixEncoding::lut
constexpr auto lut(Generator &&f)
Definition: ITkPixQCoreEncodingLUT.h:19
ZdcByteStreamReadV1V2Tool::interpretPpmHeaderR4V1_
void interpretPpmHeaderR4V1_(BitReader &br, uint8_t numAdc, int8_t &encoding, int8_t &minIndex) const
Definition: ZdcByteStreamReadV1V2Tool.cxx:785
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
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
ZdcByteStreamReadV1V2Tool::processPpmStandardR4V1_
StatusCode processPpmStandardR4V1_(State &state) const
Definition: ZdcByteStreamReadV1V2Tool.cxx:879
ZdcByteStreamReadV1V2Tool::processPpmStandardR3V1_
StatusCode processPpmStandardR3V1_(State &state) const
Definition: ZdcByteStreamReadV1V2Tool.cxx:937
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:1098
python.PyAthena.module
module
Definition: PyAthena.py:131
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
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
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:36
ZdcByteStreamReadV1V2Tool::processPpmWord_
StatusCode processPpmWord_(State &state, uint32_t word, int indata) const
Definition: ZdcByteStreamReadV1V2Tool.cxx:320
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:93
perfmonmt-refit.slice
slice
Definition: perfmonmt-refit.py:52
lumiFormat.i
int i
Definition: lumiFormat.py:85
ReadCellNoiseFromCool.chan
chan
Definition: ReadCellNoiseFromCool.py:52
ZdcCablingService::hwid2delay
int hwid2delay(int crate, int channel) const
Definition: ZdcCablingService.cxx:417
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
MuonR4::State
CalibratedSpacePoint::State State
Definition: SpacePointCalibrator.cxx:24
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:547
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
hist_file_dump.f
f
Definition: hist_file_dump.py:135
delay
double delay(std::size_t d)
Definition: JetTrigTimerTest.cxx:14
IROBDataProviderSvc::VROBFRAG
std::vector< const ROBF * > VROBFRAG
Definition: IROBDataProviderSvc.h:27
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
Service for reading bytestream.
Definition: ZdcByteStreamReadV1V2Tool.h:187
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
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:228
ZdcByteStreamReadV1V2Tool::processPpmCompressedR4V1_
StatusCode processPpmCompressedR4V1_(State &state) const
Definition: ZdcByteStreamReadV1V2Tool.cxx:634
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:193
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:623
ZdcByteStreamReadV1V2Tool::m_errorTool
ToolHandle< ZdcL1CaloErrorByteStreamTool > m_errorTool
Definition: ZdcByteStreamReadV1V2Tool.h:184
ZdcDigitsCollection
Definition: ZdcDigitsCollection.h:20
ZdcByteStreamReadV1V2Tool::processPpmNeutral_
StatusCode processPpmNeutral_(State &state) const
Definition: ZdcByteStreamReadV1V2Tool.cxx:381
ZdcByteStreamReadV1V2Tool::ROBIterator
IROBDataProviderSvc::VROBFRAG::const_iterator ROBIterator
Definition: ZdcByteStreamReadV1V2Tool.h:72
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
ZdcSrcIdMap
This class provides conversion between Lower level Source ID to higher level source ID for L1Calo Byt...
Definition: ZdcSrcIdMap.h:24
ZdcByteStreamReadV1V2Tool::processPpmBlockR4V1_
StatusCode processPpmBlockR4V1_(State &state) const
Definition: ZdcByteStreamReadV1V2Tool.cxx:622
SG::DataProxy
Definition: DataProxy.h:45
ZdcByteStreamReadV1V2Tool::m_ppmSourceIDsMuon
std::vector< uint32_t > m_ppmSourceIDsMuon
Definition: ZdcByteStreamReadV1V2Tool.h:191
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:192
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:1039
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:202
Identifier
Definition: IdentifierFieldParser.cxx:14