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

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

#include <PpmByteStreamReadV1V2Tool.h>

Inheritance diagram for LVL1BS::PpmByteStreamReadV1V2Tool:
Collaboration diagram for LVL1BS::PpmByteStreamReadV1V2Tool:

Classes

class  BitReader
 
struct  State
 

Public Member Functions

 PpmByteStreamReadV1V2Tool (const std::string &name)
 
virtual ~PpmByteStreamReadV1V2Tool ()
 
virtual StatusCode initialize () override
 Dummy implementation of the initialisation function. More...
 
virtual StatusCode finalize () override
 
StatusCode convert (xAOD::TriggerTowerContainer *const ttCollection) const
 Convert ROB fragments to trigger towers. More...
 
StatusCode convert (const std::string &sgKey, xAOD::TriggerTowerContainer *const ttCollection) const
 
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 std::map< uint8_t, std::vector< uint16_t > > LutsMap
 
typedef std::map< uint8_t, std::vector< uint16_t > > FadcsMap
 
typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

StatusCode convert (State &state, const IROBDataProviderSvc::VROBFRAG &robFrags) const
 
void initSourceIDs ()
 
const std::vector< uint32_t > & ppmSourceIDs (State &state, const std::string &sgKey) const
 Return reference to vector with all possible Source Identifiers. More...
 
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, std::vector< uint8_t > &&lcpVal, std::vector< uint8_t > &&lcpBcidVec, std::vector< uint8_t > &&ljeVal, std::vector< uint8_t > &&ljeSat80Vec, std::vector< uint16_t > &&adcVal, std::vector< uint8_t > &&adcExt, std::vector< int16_t > &&pedCor, 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, std::vector< uint8_t > &&luts, std::vector< uint8_t > &&lcpBcidVec, std::vector< uint16_t > &&fadc, std::vector< uint8_t > &&bcidExt) const
 
void processSubBlockStatus_ (State &state, uint8_t crate, uint8_t module, uint32_t word) const
 
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< LVL1BS::L1CaloErrorByteStreamToolm_errorTool
 
ToolHandle< LVL1::IL1CaloMappingToolm_ppmMaps
 Channel mapping tool. More...
 
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
 
L1CaloSrcIdMapm_srcIdMap
 
std::atomic< size_t > m_maxSizeSeen
 
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
 

Static Private Attributes

static const uint8_t s_crates = 8
 
static const uint8_t s_modules = 16
 
static const uint8_t s_channels = 64
 
static const uint16_t s_maxtowers = s_crates * s_modules * s_channels
 

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 58 of file PpmByteStreamReadV1V2Tool.h.

Member Typedef Documentation

◆ FadcsMap

typedef std::map<uint8_t, std::vector<uint16_t> > LVL1BS::PpmByteStreamReadV1V2Tool::FadcsMap
private

Definition at line 101 of file PpmByteStreamReadV1V2Tool.h.

◆ LutsMap

typedef std::map<uint8_t, std::vector<uint16_t> > LVL1BS::PpmByteStreamReadV1V2Tool::LutsMap
private

Definition at line 100 of file PpmByteStreamReadV1V2Tool.h.

◆ ROBIterator

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

Definition at line 77 of file PpmByteStreamReadV1V2Tool.h.

◆ ROBPointer

Definition at line 78 of file PpmByteStreamReadV1V2Tool.h.

◆ RODPointer

Definition at line 79 of file PpmByteStreamReadV1V2Tool.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 76 of file PpmByteStreamReadV1V2Tool.h.

76 { PPM, CPM, CMX };

Constructor & Destructor Documentation

◆ PpmByteStreamReadV1V2Tool()

LVL1BS::PpmByteStreamReadV1V2Tool::PpmByteStreamReadV1V2Tool ( const std::string &  name)

Definition at line 63 of file PpmByteStreamReadV1V2Tool.cxx.

64  :
65  AsgTool(name),
66  m_errorTool("LVL1BS::L1CaloErrorByteStreamTool/L1CaloErrorByteStreamTool"),
67  m_ppmMaps("LVL1::PpmMappingTool/PpmMappingTool"),
68  m_robDataProvider("ROBDataProviderSvc", name),
69  m_srcIdMap(nullptr),
70  m_maxSizeSeen(0)
71 {
72  declareInterface<PpmByteStreamReadV1V2Tool>(this);
73  declareProperty("PpmMappingTool", m_ppmMaps,
74  "Crate/Module/Channel to Eta/Phi/Layer mapping tool");
75  declareProperty("ROBDataProviderSvc", m_robDataProvider,
76  "Get ROB source IDs service");
77 }

◆ ~PpmByteStreamReadV1V2Tool()

virtual LVL1BS::PpmByteStreamReadV1V2Tool::~PpmByteStreamReadV1V2Tool ( )
inlinevirtual

Definition at line 64 of file PpmByteStreamReadV1V2Tool.h.

64 {};

Member Function Documentation

◆ addTriggerTowerV1_() [1/2]

StatusCode LVL1BS::PpmByteStreamReadV1V2Tool::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 1001 of file PpmByteStreamReadV1V2Tool.cxx.

1009 {
1010  std::vector<uint8_t> lcpVal;
1011  std::vector<uint8_t> lcpBcidVec;
1012 
1013  std::vector<uint16_t> adcVal;
1014  std::vector<uint8_t> adcExt;
1015 
1016  for(auto lut: luts) {
1017  lcpVal.push_back(BitField::get<uint8_t>(lut, 0, 8));
1018  lcpBcidVec.push_back(BitField::get<uint8_t>(lut, 8, 3));
1019  }
1020 
1021  for(auto f: fadc) {
1022  adcExt.push_back(BitField::get<uint8_t>(f, 0, 1));
1023  adcVal.push_back(BitField::get<uint16_t>(f, 1, 10));
1024  }
1025 
1026  CHECK(addTriggerTowerV1_(state,
1027  crate, module, channel,
1028  std::move(lcpVal), std::move(lcpBcidVec),
1029  std::move(adcVal), std::move(adcExt)));
1030 
1031  return StatusCode::SUCCESS;
1032 }

◆ addTriggerTowerV1_() [2/2]

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

Definition at line 974 of file PpmByteStreamReadV1V2Tool.cxx.

984 {
985  std::vector<uint8_t> ljeSat80Vec;
986 
987  std::vector<int16_t> pedCor;
988  std::vector<uint8_t> pedEn;
989 
991  crate, module, channel,
992  std::move(luts), std::move(lcpBcidVec),
993  std::move(luts) , std::move(ljeSat80Vec),
994  std::move(fadc), std::move(bcidExt),
995  std::move(pedCor), std::move(pedEn))
996  );
997 
998  return StatusCode::SUCCESS;
999 }

◆ addTriggerTowerV2_()

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

Definition at line 928 of file PpmByteStreamReadV1V2Tool.cxx.

941 {
942  uint32_t coolId = ::coolId(crate, module, channel);
943 
944  int layer = 0;
945  double eta = 0.;
946  double phi = 0.;
947 
948  bool isData = m_ppmMaps->mapping(crate, module, channel, eta, phi, layer);
949 
950  if (!isData && !state.m_ppmIsRetSpare && !state.m_ppmIsRetMuon){
951  return StatusCode::SUCCESS;
952  }
953 
954  if (!isData) {
955  const int pin = channel % 16;
956  const int asic = channel / 16;
957  eta = 16 * crate + module;
958  phi = 4 * pin + asic;
959  }
960 
962  state.m_triggerTowers->push_back(tt);
963 
964  tt->initialize(coolId, eta, phi,
965  std::move(lcpVal), std::move(ljeVal),
966  std::move(pedCor), std::move(pedEn),
967  std::move(lcpBcidVec), std::move(adcVal),
968  std::move(adcExt), std::move(ljeSat80Vec),
969  0, state.m_caloUserHeader.lut(),
970  state.m_caloUserHeader.ppFadc());
971  return StatusCode::SUCCESS;
972 }

◆ convert() [1/3]

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

Definition at line 138 of file PpmByteStreamReadV1V2Tool.cxx.

140 {
141  State state;
142  state.m_triggerTowers = ttCollection;
143  const std::vector<uint32_t>& vID(ppmSourceIDs(state, sgKey));
144  // // get ROB fragments
146  m_robDataProvider->getROBData(vID, robFrags, "PpmByteStreamxAODReadTool");
147  ATH_MSG_DEBUG("Number of ROB fragments:" << robFrags.size());
148 
149  CHECK(convert(state, robFrags));
150  return StatusCode::SUCCESS;
151 }

◆ convert() [2/3]

StatusCode LVL1BS::PpmByteStreamReadV1V2Tool::convert ( State state,
const IROBDataProviderSvc::VROBFRAG robFrags 
) const
private

Definition at line 105 of file PpmByteStreamReadV1V2Tool.cxx.

108 {
109  if (m_maxSizeSeen > state.m_triggerTowers->capacity()){
110  state.m_triggerTowers->reserve (m_maxSizeSeen);
111  }
112 
113  state.m_subDetectorID = eformat::TDAQ_CALO_PREPROC;
114 
115  ROBIterator rob = robFrags.begin();
116  ROBIterator robEnd = robFrags.end();
117 
118  int robCounter = 1;
119  for (; rob != robEnd; ++rob, ++robCounter) {
120 
122  if (!sc.isSuccess()) {
123 
124  }
125  }
126 
127  CxxUtils::atomic_fetch_max (&m_maxSizeSeen, state.m_triggerTowers->size());
128  return StatusCode::SUCCESS;
129 }

◆ convert() [3/3]

StatusCode LVL1BS::PpmByteStreamReadV1V2Tool::convert ( xAOD::TriggerTowerContainer *const  ttCollection) const

Convert ROB fragments to trigger towers.

Definition at line 132 of file PpmByteStreamReadV1V2Tool.cxx.

134 {
136 }

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

Definition at line 98 of file PpmByteStreamReadV1V2Tool.cxx.

98  {
99  delete m_srcIdMap;
100 
101  return StatusCode::SUCCESS;
102 }

◆ 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 > LVL1BS::PpmByteStreamReadV1V2Tool::getPpmAdcSamplesR3_ ( State state,
BitReader br,
uint8_t  format,
uint8_t  minIndex 
) const
private

Definition at line 498 of file PpmByteStreamReadV1V2Tool.cxx.

501 {
502  std::vector<uint16_t> adc = {0, 0, 0, 0, 0};
503  uint8_t minAdc = 0;
504 
505  for(uint8_t i = 0; i <5; ++i) {
506  uint8_t longField = 0;
507  uint8_t numBits = 0;
508  if (format > 2) {
509  longField = br.getField(1);
510  numBits = longField == 0? 4: (format * 2);
511  } else {
512  numBits = i == 0? 4: (format + 2);
513  }
514 
515  if (i == 0) {
516  minAdc = br.getField(numBits);
517  if (longField == 0) {
518  minAdc += state.m_caloUserHeader.ppLowerBound();
519  }
520  } else {
521  adc[i] = minAdc + br.getField(numBits);
522  }
523  }
524 
525  if (minIndex == 0) {
526  adc[0] = minAdc;
527  } else {
528  adc[0] = adc[minIndex];
529  adc[minIndex] = minAdc;
530  }
531  return adc;
532 }

◆ getPpmAdcSamplesR4_()

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

Definition at line 785 of file PpmByteStreamReadV1V2Tool.cxx.

789 {
790  uint8_t numAdc = state.m_subBlockHeader.nSlice2();
791 
792  if (encoding == 6) {
793  uint16_t val = br.getField(6);
794  return std::vector<uint16_t>(numAdc, val);
795  } else if ( encoding < 3) {
796  std::vector<uint16_t> adc(numAdc, 0);
797  uint16_t minAdc = br.getField(5) + state.m_caloUserHeader.ppLowerBound();
798  adc[minIndex] = minAdc;
799  for(uint8_t i = 1; i < numAdc; ++i) {
800  adc[i == minIndex? 0: i] = br.getField(encoding + 2) + minAdc;
801  }
802  return adc;
803  } else {
804  std::vector<uint16_t> adc(numAdc, 0);
805  uint16_t minAdc = br.getField(1)
806  ? br.getField(encoding * 2)
807  : (br.getField(5) +
808  state.m_caloUserHeader.ppLowerBound());
809 
810  adc[minIndex] = minAdc;
811  for (uint8_t i = 1; i < numAdc; ++i) {
812  adc[minIndex == i? 0: i] = br.getField(
813  br.getField(1)? encoding * 2: 4
814  ) + minAdc;
815  }
816  return adc;
817  }
818 }

◆ getProperty()

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

Get one of the tool's properties.

◆ initialize()

StatusCode LVL1BS::PpmByteStreamReadV1V2Tool::initialize ( )
overridevirtual

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 83 of file PpmByteStreamReadV1V2Tool.cxx.

83  {
84  ATH_MSG_DEBUG("Initializing " << name());
85 
86  m_srcIdMap = new L1CaloSrcIdMap();
87  CHECK(m_errorTool.retrieve());
88  CHECK(m_ppmMaps.retrieve());
89  CHECK(m_robDataProvider.retrieve());
90 
91  initSourceIDs();
92 
93  return StatusCode::SUCCESS;
94 }

◆ initSourceIDs()

void LVL1BS::PpmByteStreamReadV1V2Tool::initSourceIDs ( )
private

Definition at line 1037 of file PpmByteStreamReadV1V2Tool.cxx.

1038 {
1039  const int crates = 8;
1040 
1041  m_ppmSourceIDs.clear();
1042  m_ppmSourceIDsSpare.clear();
1043  m_ppmSourceIDsMuon.clear();
1044 
1045  for (int crate = 0; crate < crates; ++crate) {
1046  for (int slink = 0; slink < m_srcIdMap->maxSlinks(); ++slink) {
1047  const uint32_t rodId = m_srcIdMap->getRodID(crate, slink, 0,
1048  eformat::TDAQ_CALO_PREPROC);
1049  const uint32_t robId = m_srcIdMap->getRobID(rodId);
1050  m_ppmSourceIDs.push_back(robId);
1051  if (crate > 1 && crate < 6) {
1052  m_ppmSourceIDsSpare.push_back(robId);
1053  if (crate < 4 && slink == 0) {
1054  m_ppmSourceIDsMuon.push_back(robId);
1055  }
1056  }
1057  }
1058  }
1059 }

◆ 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 LVL1BS::PpmByteStreamReadV1V2Tool::interpretPpmHeaderR4V1_ ( BitReader br,
uint8_t  numAdc,
int8_t &  encoding,
int8_t &  minIndex 
) const
private

Definition at line 734 of file PpmByteStreamReadV1V2Tool.cxx.

737 {
738  uint8_t minHeader = 0;
739 
740  if (numAdc == 5) {
741  minHeader = br.getField(4);
742 
743  minIndex = minHeader % 5;
744  if (minHeader < 15){ // Encodings 0-5
745  if (minHeader < 10) {
746  encoding = minHeader / 5;
747  } else {
748  encoding = 2 + br.getField(2);
749  }
750  } else {
751  encoding = 6;
752  }
753  } else {
754  uint8_t numBits = 0;
755  if (numAdc ==3 ) {
756  numBits = 2;
757  } else if (numAdc == 7) {
758  numBits = 3;
759  } else if (numAdc < 16) {
760  numBits = 4;
761  }
762 
763  if (numBits > 0) {
764  uint8_t fieldSize = 1 << numBits;
765  minHeader = br.getField(numBits);
766  uint8_t encValue = fieldSize - 1;
767  if (minHeader == encValue) { // Encoding 6
768  encoding = 6;
769  minIndex = 0;
770  } else {
771  minHeader += br.getField(2) << numBits;
772  minIndex = minHeader % fieldSize;
773  encValue = 3 * fieldSize;
774 
775  if (minHeader < encValue) { // Encodings 0-2
776  encoding = minHeader / fieldSize;
777  } else {
778  encoding = 3 + br.getField(2);
779  }
780  }
781  }
782  }
783 }

◆ 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 > & LVL1BS::PpmByteStreamReadV1V2Tool::ppmSourceIDs ( State state,
const std::string &  sgKey 
) const
private

Return reference to vector with all possible Source Identifiers.

Definition at line 1063 of file PpmByteStreamReadV1V2Tool.cxx.

1066 {
1067  state.m_ppmIsRetMuon = false;
1068  state.m_ppmIsRetSpare = false;
1069 
1070  if (sgKey.find("Muon") != std::string::npos) {
1071  state.m_ppmIsRetMuon = true;
1072  } else if (sgKey.find("Spare") != std::string::npos) {
1073  state.m_ppmIsRetSpare = true;
1074  }
1075 
1076  if (state.m_ppmIsRetSpare) {
1077  return m_ppmSourceIDsSpare;
1078  }
1079 
1080  if (state.m_ppmIsRetMuon) {
1081  return m_ppmSourceIDsMuon;
1082  }
1083 
1084  return m_ppmSourceIDs;
1085 }

◆ print()

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

◆ processPpmBlock_()

StatusCode LVL1BS::PpmByteStreamReadV1V2Tool::processPpmBlock_ ( State state) const
private

Definition at line 291 of file PpmByteStreamReadV1V2Tool.cxx.

292 {
293  if (state.m_ppBlock.size() > 0) {
294  if (state.m_subBlockHeader.format() == 0) {
296  CHECK(sc);
297  return sc;
298  }
299 
300  if (state.m_verCode == 0x31) {
302  CHECK(sc);
303  return sc;
304  }
305 
306  if (state.m_verCode == 0x41 || state.m_verCode == 0x42) {
308  CHECK(sc);
309  return sc;
310  }
311  }
312 
313  if (state.m_ppLuts.size() > 0) {
314  if (state.m_verCode == 0x21 || state.m_verCode == 0x31) {
316  CHECK(sc);
317  return sc;
318  }
319  ATH_MSG_ERROR("Unknown PPM subheader format '"
320  << int(state.m_subBlockHeader.format())
321  << "' for rob version '"
322  << MSG::hex << int(state.m_verCode)
323  << MSG::dec << "'" );
324  return StatusCode::FAILURE;
325  }
326  return StatusCode::SUCCESS;
327 }

◆ processPpmBlockR3V1_()

StatusCode LVL1BS::PpmByteStreamReadV1V2Tool::processPpmBlockR3V1_ ( State state) const
private

Definition at line 820 of file PpmByteStreamReadV1V2Tool.cxx.

821 {
822  if (state.m_subBlockHeader.format() == 1) {
824  return StatusCode::SUCCESS;
825  } else if (state.m_subBlockHeader.format() >= 2) {
826  // TODO: convert compressed
827  return StatusCode::FAILURE;
828  }
829  return StatusCode::FAILURE;
830 }

◆ processPpmBlockR4V1_()

StatusCode LVL1BS::PpmByteStreamReadV1V2Tool::processPpmBlockR4V1_ ( State state) const
private

Definition at line 575 of file PpmByteStreamReadV1V2Tool.cxx.

576 {
577  if (state.m_subBlockHeader.format() == 1) {
579  return StatusCode::SUCCESS;
580  } else if (state.m_subBlockHeader.format() >= 2) {
582  return StatusCode::SUCCESS;
583  }
584  return StatusCode::FAILURE;
585 }

◆ processPpmCompressedR3V1_()

StatusCode LVL1BS::PpmByteStreamReadV1V2Tool::processPpmCompressedR3V1_ ( State state) const
private

Definition at line 414 of file PpmByteStreamReadV1V2Tool.cxx.

415 {
416  BitReader br (state.m_ppBlock);
417  uint8_t chan = 0;
418  try{
419  while (chan < 64) {
420  uint8_t present = 1;
421  if (state.m_subBlockHeader.format() == 3) {
422  present = br.getField(1);
423  }
424 
425  if (present == 1) {
426  uint8_t lutVal = 0;
427  uint8_t fmt = 6;
428  uint8_t lutSat=0;
429  uint8_t lutExt=0;
430  uint8_t lutPeak=0;
431 
432  std::vector<uint16_t> adcVal = {0 , 0, 0, 0, 0};
433  std::vector<uint8_t> adcExt = {0 , 0, 0, 0, 0};
434 
435  uint8_t minHeader = br.getField(4);
436  uint8_t minIndex = minHeader % 5;
437  if (minHeader < 15) { // Formats 0-5
438  if (minHeader < 10) { // Formats 0-1
439  fmt = minHeader / 5;
440  } else { // Formats 2-5
441  fmt = 2 + br.getField( 2);
442  uint8_t haveLut = br.getField(1);
443  if (fmt == 2) {
444  if (haveLut == 1) {
445  lutVal = br.getField(3);
446  lutPeak = 1; // Even if LutVal==0 it seems
447  }
448  } else {
449  uint8_t haveExt = br.getField(1);
450  if (haveLut == 1) {
451  lutVal = br.getField(8);
452  lutExt = br.getField(1);
453  lutSat = br.getField(1);
454  lutPeak = br.getField(1);
455  }
456 
457  if (haveExt == 1){
458  for(uint8_t i = 0; i < 5; ++i) {
459  adcExt[i] = br.getField(1);
460  }
461  } else {
462  adcExt[2] = lutExt;
463  }
464  }
465  }
466  adcVal = getPpmAdcSamplesR3_(state, br, fmt, minIndex);
467  } else {
468  uint8_t haveAdc = br.getField(1);
469  if (haveAdc == 1) {
470  uint16_t val = br.getField(10);
471  for(uint8_t i = 0; i < 5; ++i) {
472  adcVal[i] = val;
473  }
474  }
475  }
476  // Add Trigger Tower
477  //std::vector<uint8_t> luts = {lutVal};
479  state,
480  state.m_subBlockHeader.crate(),
481  state.m_subBlockHeader.module(),
482  chan,
483  std::vector<uint8_t> {lutVal},
484  std::vector<uint8_t> {uint8_t(lutExt | (lutSat << 1) | (lutPeak << 2))},
485  std::move(adcVal),
486  std::move(adcExt)
487  ));
488  }
489  chan++;
490  }
491  }catch (const std::out_of_range& ex) {
492  ATH_MSG_WARNING("Excess Data in Sub-block");
493  m_errorTool->rodError(state.m_rodSourceId, L1CaloSubBlock::UNPACK_EXCESS_DATA);
494  }
495  return StatusCode::SUCCESS;
496 }

◆ processPpmCompressedR4V1_()

StatusCode LVL1BS::PpmByteStreamReadV1V2Tool::processPpmCompressedR4V1_ ( State state) const
private

Definition at line 587 of file PpmByteStreamReadV1V2Tool.cxx.

588 {
589  BitReader br (state.m_ppBlock);
590  uint8_t numAdc = state.m_subBlockHeader.nSlice2();
591  uint8_t numLut = state.m_subBlockHeader.nSlice1();
592  int16_t pedCorBase = -20;
593 
594 
595  try{
596  for(uint8_t chan = 0; chan < s_channels; ++chan) {
597  uint8_t present = 1;
598 
599  std::vector<uint8_t> haveLut(numLut, 0);
600  std::vector<uint8_t> lcpVal(numLut, 0);
601 
602  std::vector<uint8_t> lcpExt(numLut, 0);
603  std::vector<uint8_t> lcpSat(numLut, 0);
604  std::vector<uint8_t> lcpPeak(numLut, 0);
605  std::vector<uint8_t> lcpBcidVec(numLut, 0);
606 
607  std::vector<uint8_t> ljeVal(numLut, 0);
608 
609  std::vector<uint8_t> ljeLow(numLut, 0);
610  std::vector<uint8_t> ljeHigh(numLut, 0);
611  std::vector<uint8_t> ljeRes(numLut, 0);
612  std::vector<uint8_t> ljeSat80Vec(numLut, 0);
613 
614  std::vector<uint16_t> adcVal(numAdc, 0);
615  std::vector<uint8_t> adcExt(numAdc, 0);
616  std::vector<int16_t> pedCor(numLut, 0);
617  std::vector<uint8_t> pedEn(numLut, 0);
618 
619  int8_t encoding = -1;
620  int8_t minIndex = -1;
621 
622  if (state.m_subBlockHeader.format() == 3) {
623  present = br.getField(1);
624  }
625  if (present == 1) {
626  interpretPpmHeaderR4V1_(br, numAdc, encoding, minIndex);
627  CHECK((encoding != -1) && (minIndex != -1));
628  // First get the LIT related quantities
629  if (encoding < 3) {
630  // Get the peal finder bits
631  for(uint i=0; i < numLut; ++i) {
632  lcpPeak[i] = br.getField(1);
633  }
634  // Get Sat80 low bits
635  if (encoding > 0) {
636  for (uint8_t i = 0; i < numLut; ++i) {
637  ljeLow[i] = br.getField(1);
638  }
639  }
640  // Get LutCP and LutJEP values (these are
641  // only present if the peak finder is set).
642  if (encoding == 2) {
643  for (uint8_t i = 0; i < numLut; ++i) {
644  if (lcpPeak[i] == 1) {
645  lcpVal[i] = br.getField(4);
646  }
647  }
648  for(uint8_t i = 0; i < numLut; ++i) {
649  if (lcpPeak[i] == 1){
650  ljeVal[i] = br.getField(3);
651  }
652  }
653  }
654  } else if (encoding < 6) {
655  // Get LUT presence flag for each LUT slice.
656  for(uint8_t i = 0; i < numLut; ++i){
657  haveLut[i] = br.getField(1);
658  }
659 
660  // Get external BCID bits (if block is present).
661  uint8_t haveExt = br.getField(1);
662 
663  if (haveExt == 1) {
664  for (uint8_t i = 0; i < numAdc; ++i) {
665  adcExt[i] = br.getField(1);
666  }
667  }
668 
669  for(uint8_t i = 0; i < numLut; ++i){
670  if (haveLut[i] == 1) {
671  lcpVal[i] = br.getField(8);
672  lcpExt[i] = br.getField(1);
673  lcpSat[i] = br.getField(1);
674  lcpPeak[i] = br.getField(1);
675  }
676  }
677  // Get JEP LUT values and corresponding bits.
678  for(uint8_t i = 0; i < numLut; ++i){
679  if (haveLut[i] == 1) {
680  ljeVal[i] = br.getField(8);
681  ljeLow[i] = br.getField(1);
682  ljeHigh[i] = br.getField(1);
683  ljeRes[i] = br.getField(1);
684  }
685  }
686 
687  }
688 
689  }
690  // Next get the ADC related quantities (all encodings).
691  adcVal = getPpmAdcSamplesR4_(state, br, encoding, minIndex);
692  // Finally get the pedestal correction.
693  if ((encoding < 3) || (encoding == 6)) {
694  for (uint8_t i = 0; i < numLut; ++i)
695  {
696  pedCor[i] = br.getField(6) + pedCorBase;
697  if (state.m_subBlockHeader.compVer() > 0) {
698  pedEn[i] = 1;
699  }
700  }
701  } else {
702  // At the moment there is an enabled bit for every LUT slice
703  // (even though its really a global flag).
704  // The correction values is a twos complement signed value.
705  for (uint8_t i = 0; i < numLut; ++i)
706  {
707  uint16_t val = br.getField(10);
708  pedCor[i] = ::pedCorrection(val);
709  pedEn[i] = br.getField(1);
710  }
711  }
712 
713  for(uint8_t i=0; i < numLut; ++i){
714  lcpBcidVec[i] = uint8_t((lcpPeak[i] << 2) | (lcpSat[i] << 1) | lcpExt[i]);
715  ljeSat80Vec[i] = uint8_t((ljeRes[i] << 2) | (ljeHigh[i] << 1) | ljeLow[i]);
716  }
718  state.m_subBlockHeader.crate(), state.m_subBlockHeader.module(),
719  chan,
720  std::move(lcpVal), std::move(lcpBcidVec),
721  std::move(ljeVal), std::move(ljeSat80Vec),
722  std::move(adcVal), std::move(adcExt),
723  std::move(pedCor), std::move(pedEn)));
724  } // for
725  } catch (const std::out_of_range& ex) {
726  ATH_MSG_WARNING("Excess Data in Sub-block");
727  m_errorTool->rodError(state.m_rodSourceId, L1CaloSubBlock::UNPACK_EXCESS_DATA);
728  }
729  //Check status workd
730  return StatusCode::SUCCESS;
731 
732 }

◆ processPpmNeutral_()

StatusCode LVL1BS::PpmByteStreamReadV1V2Tool::processPpmNeutral_ ( State state) const
private

Definition at line 329 of file PpmByteStreamReadV1V2Tool.cxx.

330 {
331  uint8_t numLut = state.m_subBlockHeader.nSlice1();
332  uint8_t numFadc = state.m_subBlockHeader.nSlice2();
333  uint8_t totSlice = 3 * numLut + numFadc;
334 
335  uint8_t channel = 0;
336  for ( int asic = 0 ; asic < 4 ; ++asic ) {
337  for ( int mcm = 0 ; mcm < 16 ; ++mcm ) {
338  // ----------------------------------------------------------------------
339  std::vector<uint32_t> rotated(totSlice);
340 
341  for ( uint8_t slice = 0 ; slice < totSlice ; ++slice ) {
342  for ( uint8_t bit = 0 ; bit < 11 ; ++bit ) {
343  if ( state.m_ppBlock[slice * 11 + asic * (11 * totSlice) + bit + 1] & (1 << mcm))
344  rotated[slice] |= (1 << bit);
345  }
346  }
347 
348  bool nonZeroData = false;
349  for (uint8_t slice = 0; slice < numLut; ++slice) {
350  if (rotated[slice]
351  || rotated[slice + numLut]
352  || rotated[slice + 2 * numLut + numFadc]) { // CP, JET
353  nonZeroData = true;
354  break;
355  }
356  }
357 
358  std::vector<uint8_t> lcpVal;
359  std::vector<uint8_t> lcpBcidVec;
360  std::vector<uint8_t> ljeVal;
361  std::vector<uint8_t> ljeSat80Vec;
362  std::vector<int16_t> pedCor;
363  std::vector<uint8_t> pedEn;
364 
365  std::vector<uint16_t> adcVal;
366  std::vector<uint8_t> adcExt;
367 
368  if (nonZeroData) {
369  for (uint8_t slice = 0; slice < numLut; ++slice) {
370  lcpVal.push_back(rotated[slice] & 0xff);
371  ljeVal.push_back(rotated[slice + numLut] & 0xff);
372  pedCor.push_back(::pedCorrection(rotated[slice + 2 * numLut + numFadc] & 0x3ff));
373 
374  lcpBcidVec.push_back((rotated[slice] >> 8) & 0x7);
375  ljeSat80Vec.push_back((rotated[slice + numLut] >> 8) & 0x7);
376  pedEn.push_back((rotated[slice + 2 * numLut + numFadc] >> 10) & 0x1);
377  }
378  }
379 
380  for (uint8_t slice = 0; slice < numFadc; ++slice) {
381  if (rotated[slice + numLut]) { // CP, JET
382  nonZeroData = true;
383  break;
384  }
385  }
386 
387  if (nonZeroData) {
388  for (uint8_t slice = 0; slice < numFadc; ++ slice) {
389  adcVal.push_back(rotated[slice + 2 * numLut] & 0x3ff);
390  adcExt.push_back((rotated[slice + 2 * numLut] >> 10 & 0x1) & 0x3ff);
391  }
392  }
393 
395  state,
396  state.m_subBlockHeader.crate(),
397  state.m_subBlockHeader.module(),
398  channel,
399  std::move(lcpVal),
400  std::move(lcpBcidVec),
401  std::move(ljeVal),
402  std::move(ljeSat80Vec),
403  std::move(adcVal),
404  std::move(adcExt),
405  std::move(pedCor),
406  std::move(pedEn)));
407  // ---------------------------------------------------------------------
408  channel++;
409  }
410  }
411  return StatusCode::SUCCESS;
412 }

◆ processPpmStandardR3V1_() [1/2]

StatusCode LVL1BS::PpmByteStreamReadV1V2Tool::processPpmStandardR3V1_ ( State state) const
private

Definition at line 892 of file PpmByteStreamReadV1V2Tool.cxx.

893 {
894  for(auto lut : state.m_ppLuts) {
896  state,
897  state.m_subBlockHeader.crate(),
898  state.m_subBlockHeader.module(),
899  lut.first,
900  lut.second,
901  state.m_ppFadcs[lut.first]));
902  }
903  return StatusCode::SUCCESS;
904 }

◆ processPpmStandardR3V1_() [2/2]

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

Definition at line 536 of file PpmByteStreamReadV1V2Tool.cxx.

539 {
540 
541  StatusCode sc = StatusCode::SUCCESS;
542  if (state.m_subBlockHeader.seqNum() == 63) { // Error block
543  ATH_MSG_DEBUG("Error PPM subblock");
544  //TODO: errorTool
545  } else {
546  const uint8_t numAdc = state.m_subBlockHeader.nSlice2();
547  const uint8_t numLut = state.m_subBlockHeader.nSlice1();
548  const uint8_t nTotal = numAdc + numLut;
549  const uint8_t wordsPerBlock = 8; // 16 towers (4 MCMs) / 2 per word
550  const uint8_t iBlk = inData / wordsPerBlock;
551  uint8_t iChan = state.m_subBlockHeader.seqNum() + 2 * (inData % wordsPerBlock);
552 
553  if (iBlk < numLut) { // First all LUT values
554  for(uint8_t i = 0; i < 2; ++i) {
555  uint16_t subword = (word >> 16 * i) & 0x7ff;
556  state.m_ppLuts[iChan].push_back(subword);
557  iChan++;
558  }
559  } else if (iBlk < nTotal) { // Next all FADC values
560  for(uint8_t i = 0; i < 2; ++i) {
561  uint16_t subword = (word >> (16 * i)) & 0x7ff;
562  state.m_ppFadcs[iChan].push_back(subword);
563  iChan++;
564  }
565 
566  } else{
567  ATH_MSG_WARNING("Error decoding Ppm word (run1)");
568  sc = StatusCode::FAILURE;
569  }
570 
571  }
572  return sc;
573 }

◆ processPpmStandardR4V1_()

StatusCode LVL1BS::PpmByteStreamReadV1V2Tool::processPpmStandardR4V1_ ( State state) const
private

Definition at line 832 of file PpmByteStreamReadV1V2Tool.cxx.

833 {
834  BitReader br (state.m_ppBlock);
835  uint8_t numAdc = state.m_subBlockHeader.nSlice2();
836  uint8_t numLut = state.m_subBlockHeader.nSlice1();
837  uint8_t crate = state.m_subBlockHeader.crate();
838  uint8_t module = state.m_subBlockHeader.module();
839 
840  for (uint8_t chan = 0; chan < 64; ++chan) {
841 
842  //for (uint8_t k = 0; k < 4; ++k) {
843  std::vector<uint8_t> lcpVal;
844  std::vector<uint8_t> lcpBcidVec;
845 
846  std::vector<uint8_t> ljeVal;
847  std::vector<uint8_t> ljeSat80Vec;
848 
849 
850 
851  std::vector<uint16_t> adcVal;
852  std::vector<uint8_t> adcExt;
853  std::vector<int16_t> pedCor;
854  std::vector<uint8_t> pedEn;
855  try {
856  for (int i = 0; i < numLut; ++i) {
857  lcpVal.push_back(br.getField(8));
858  lcpBcidVec.push_back(br.getField(3));
859  }
860 
861  for (int i = 0; i < numLut; ++i) {
862  ljeVal.push_back(br.getField(8));
863  ljeSat80Vec.push_back(br.getField(3));
864  }
865 
866  for (int i = 0; i < numAdc; ++i) {
867  adcVal.push_back(br.getField(10));
868  adcExt.push_back(br.getField(1));
869  }
870 
871  for (int i = 0; i < numLut; ++i) {
872  uint16_t pc = br.getField(10);
873  pedCor.push_back(pedCorrection(pc));
874  pedEn.push_back(br.getField(1));
875  }
876  } catch (const std::out_of_range& ex) {
877  ATH_MSG_WARNING("Excess Data in Sub-block");
878  m_errorTool->rodError(state.m_rodSourceId, L1CaloSubBlock::UNPACK_EXCESS_DATA);
879  }
880  CHECK(
881  addTriggerTowerV2_(state,
882  crate, module, chan,
883  std::move(lcpVal), std::move(lcpBcidVec),
884  std::move(ljeVal), std::move(ljeSat80Vec),
885  std::move(adcVal), std::move(adcExt),
886  std::move(pedCor), std::move(pedEn)));
887  }
888 
889  return StatusCode::SUCCESS;
890 }

◆ processPpmWord_()

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

Definition at line 271 of file PpmByteStreamReadV1V2Tool.cxx.

274 {
275  if ( (state.m_subBlockHeader.format() == 0)
276  || (state.m_subBlockHeader.format() >= 2)
277  || (state.m_verCode >= 0x41)) {
278  state.m_ppBlock.push_back(word);
279  } else if ((state.m_verCode == 0x21) || (state.m_verCode == 0x31)) {
280  return processPpmStandardR3V1_(state, word, indata);
281  } else {
282  ATH_MSG_ERROR("Unsupported PPM version:format ("
283  << state.m_verCode << ":" << state.m_subBlockHeader.format()
284  <<") combination");
285  return StatusCode::FAILURE;
286  }
287  return StatusCode::SUCCESS;
288 }

◆ processRobFragment_()

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

Definition at line 154 of file PpmByteStreamReadV1V2Tool.cxx.

157 {
158  auto rob = **robIter;
159 
161  "Treating ROB fragment source id #" << MSG::hex << rob.rob_source_id());
162 
163 
164  state.m_rodSourceId = rob.rod_source_id();
165  state.m_robSourceId = rob.source_id();
166  const auto sourceID = (state.m_rodSourceId >> 16) & 0xff;
167  const auto rodCrate = m_srcIdMap->crate(state.m_rodSourceId);
168  const auto rodSlink = m_srcIdMap->slink(state.m_rodSourceId);
169  // -------------------------------------------------------------------------
170  // Check Rob status
171  if (rob.nstatus() > 0) {
172  ROBPointer robData;
173  rob.status(robData);
174  if (*robData != 0) {
175  ATH_MSG_WARNING("ROB status error - skipping fragment");
176  m_errorTool->robError(state.m_rodSourceId, *robData);
177  return StatusCode::FAILURE;
178  }
179  }
180  // -------------------------------------------------------------------------
181  RODPointer payloadBeg;
182  RODPointer payloadEnd;
184 
185  rob.rod_data(payloadBeg);
186  payloadEnd = payloadBeg + rob.rod_ndata();
187  payload = payloadBeg;
188  // -------------------------------------------------------------------------
189  if (payload == payloadEnd) {
190  ATH_MSG_DEBUG("ROB fragment empty");
191  return StatusCode::FAILURE;
192  }
193  // -------------------------------------------------------------------------
194 
195 
196  uint16_t rodVer = rob.rod_version() & 0xffff;
197  uint32_t rodRunNumber = rob.rod_run_no() & 0xffffff;
198  state.m_verCode = ((rodVer & 0xfff) << 4) | 1;
199 
200 
201  if (sourceID != state.m_subDetectorID) {
202  ATH_MSG_ERROR("Wrong subdetector source id for requested objects: " << state.m_rodSourceId);
203  return StatusCode::FAILURE;
204  }
205 
206  ATH_MSG_DEBUG("Treating crate " << rodCrate << " slink " << rodSlink);
207  state.m_caloUserHeader = CaloUserHeader(*payload);
208  if (!state.m_caloUserHeader.isValid()) {
209  ATH_MSG_ERROR("Invalid or missing user header");
210  return StatusCode::FAILURE;
211  }
212 
214  "Run number: " << MSG::dec << rodRunNumber << endmsg
215  << "Version code: 0x" << MSG::hex << int(state.m_verCode) << MSG::dec
216  << endmsg << "LUT triggered slice offset: "
217  << int(state.m_caloUserHeader.lut()) << endmsg
218  << "FADC triggered slice offset: " << int(state.m_caloUserHeader.ppFadc())
219  << endmsg << "FADC baseline lower bound: "
220  << int(state.m_caloUserHeader.ppLowerBound()));
221 
222  int indata = 0;
223  uint8_t blockType = 0;
224  int subBlock = 0;
225 
226  for (; payload != payloadEnd; ++payload) {
227  if (CaloUserHeader::isValid(*payload) && (subBlock == 0)) {
228 
230  indata = 0;
231  CHECK(processPpmBlock_(state));
232 
233  state.m_ppLuts.clear();
234  state.m_ppFadcs.clear();
235  state.m_ppBlock.clear();
236 
237  blockType = (*payload >> 28) & 0xf;
238 
239  if ((blockType & 0xd) == 0xc) {
240  state.m_subBlockHeader = SubBlockHeader(*payload);
242  "SubBlock version #" << int(state.m_subBlockHeader.version())
243  << " format #" << int(state.m_subBlockHeader.format())
244  << " seqNum (compVer) #" << int(state.m_subBlockHeader.seqNum())
245  << " nslice1 #" << int(state.m_subBlockHeader.nSlice1())
246  << " nslice2 #" << int(state.m_subBlockHeader.nSlice2())
247  );
248  subBlock = blockType & 0xe;
249  } else if (blockType == (subBlock | 1)) {
250  processSubBlockStatus_(state, state.m_subBlockHeader.crate(), state.m_subBlockHeader.module(), *payload);
251  subBlock = 0;
252  }
253  } else {
254  switch(state.m_subDetectorID){
255  case eformat::TDAQ_CALO_PREPROC:
256  CHECK(processPpmWord_(state, *payload, indata));
257  break;
258  default:
259  break;
260  }
261  indata++;
262  }
263  }
264  CHECK(processPpmBlock_(state));
265  state.m_ppLuts.clear();
266  state.m_ppFadcs.clear();
267  state.m_ppBlock.clear();
268  return StatusCode::SUCCESS;
269 }

◆ processSubBlockStatus_()

void LVL1BS::PpmByteStreamReadV1V2Tool::processSubBlockStatus_ ( State state,
uint8_t  crate,
uint8_t  module,
uint32_t  word 
) const
private

Definition at line 906 of file PpmByteStreamReadV1V2Tool.cxx.

908 {
909  LVL1::DataError errorBits(0);
910  errorBits.set(LVL1::DataError::SubStatusWord, payload);
911 
912  const uint32_t error = errorBits.error();
913  int curr = state.m_triggerTowers->size() - 1;
914  for(int i=0; i < s_channels; ++i){
915  if (curr < 0){
916  break;
917  }
918  auto tt = (*state.m_triggerTowers)[curr--];
919  if (tt->coolId() >> 16 & crateModuleMask(crate, module)){
920  tt->setErrorWord(error);
921  }else{
922  break;
923  }
924  }
925 }

◆ 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<LVL1BS::L1CaloErrorByteStreamTool> LVL1BS::PpmByteStreamReadV1V2Tool::m_errorTool
private

Definition at line 201 of file PpmByteStreamReadV1V2Tool.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_maxSizeSeen

std::atomic<size_t> LVL1BS::PpmByteStreamReadV1V2Tool::m_maxSizeSeen
mutableprivate

Definition at line 213 of file PpmByteStreamReadV1V2Tool.h.

◆ m_ppmMaps

ToolHandle<LVL1::IL1CaloMappingTool> LVL1BS::PpmByteStreamReadV1V2Tool::m_ppmMaps
private

Channel mapping tool.

Definition at line 203 of file PpmByteStreamReadV1V2Tool.h.

◆ m_ppmSourceIDs

std::vector<uint32_t> LVL1BS::PpmByteStreamReadV1V2Tool::m_ppmSourceIDs
private

Definition at line 208 of file PpmByteStreamReadV1V2Tool.h.

◆ m_ppmSourceIDsMuon

std::vector<uint32_t> LVL1BS::PpmByteStreamReadV1V2Tool::m_ppmSourceIDsMuon
private

Definition at line 209 of file PpmByteStreamReadV1V2Tool.h.

◆ m_ppmSourceIDsSpare

std::vector<uint32_t> LVL1BS::PpmByteStreamReadV1V2Tool::m_ppmSourceIDsSpare
private

Definition at line 210 of file PpmByteStreamReadV1V2Tool.h.

◆ m_robDataProvider

ServiceHandle<IROBDataProviderSvc> LVL1BS::PpmByteStreamReadV1V2Tool::m_robDataProvider
private

Service for reading bytestream.

Definition at line 205 of file PpmByteStreamReadV1V2Tool.h.

◆ m_srcIdMap

L1CaloSrcIdMap* LVL1BS::PpmByteStreamReadV1V2Tool::m_srcIdMap
private

Definition at line 211 of file PpmByteStreamReadV1V2Tool.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.

◆ s_channels

const uint8_t LVL1BS::PpmByteStreamReadV1V2Tool::s_channels = 64
staticprivate

Definition at line 219 of file PpmByteStreamReadV1V2Tool.h.

◆ s_crates

const uint8_t LVL1BS::PpmByteStreamReadV1V2Tool::s_crates = 8
staticprivate

Definition at line 217 of file PpmByteStreamReadV1V2Tool.h.

◆ s_maxtowers

const uint16_t LVL1BS::PpmByteStreamReadV1V2Tool::s_maxtowers = s_crates * s_modules * s_channels
staticprivate

Definition at line 220 of file PpmByteStreamReadV1V2Tool.h.

◆ s_modules

const uint8_t LVL1BS::PpmByteStreamReadV1V2Tool::s_modules = 16
staticprivate

Definition at line 218 of file PpmByteStreamReadV1V2Tool.h.


The documentation for this class was generated from the following files:
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:216
CxxUtils::atomic_fetch_max
T atomic_fetch_max(std::atomic< T > *a, T v, std::memory_order memorder=std::memory_order_seq_cst)
Atomically calculate maximum.
Definition: atomic_fetch_minmax.h:42
LVL1BS::L1CaloSrcIdMap::slink
int slink(uint32_t code) const
Return slink from unpacked moduleID.
Definition: L1CaloSrcIdMap.cxx:68
python.CaloRecoConfig.f
f
Definition: CaloRecoConfig.py:127
LVL1BS::PpmByteStreamReadV1V2Tool::processPpmBlock_
StatusCode processPpmBlock_(State &state) const
Definition: PpmByteStreamReadV1V2Tool.cxx:291
LVL1BS::PpmByteStreamReadV1V2Tool::ROBIterator
IROBDataProviderSvc::VROBFRAG::const_iterator ROBIterator
Definition: PpmByteStreamReadV1V2Tool.h:77
LVL1::DataError
Error data.
Definition: DataError.h:27
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
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
LVL1BS::PpmByteStreamReadV1V2Tool::m_maxSizeSeen
std::atomic< size_t > m_maxSizeSeen
Definition: PpmByteStreamReadV1V2Tool.h:213
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
LVL1BS::PpmByteStreamReadV1V2Tool::processPpmBlockR4V1_
StatusCode processPpmBlockR4V1_(State &state) const
Definition: PpmByteStreamReadV1V2Tool.cxx:575
LVL1BS::PpmByteStreamReadV1V2Tool::m_errorTool
ToolHandle< LVL1BS::L1CaloErrorByteStreamTool > m_errorTool
Definition: PpmByteStreamReadV1V2Tool.h:201
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
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
LVL1BS::L1CaloSrcIdMap::getRobID
uint32_t getRobID(uint32_t rod_id) const
Make a ROB Source ID from a ROD source ID.
Definition: L1CaloSrcIdMap.cxx:27
LVL1BS::PpmByteStreamReadV1V2Tool::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: PpmByteStreamReadV1V2Tool.cxx:1001
LVL1BS::PpmByteStreamReadV1V2Tool::processRobFragment_
StatusCode processRobFragment_(State &state, const ROBIterator &robFrag, const RequestType &requestedType) const
Definition: PpmByteStreamReadV1V2Tool.cxx:154
LVL1BS::PpmByteStreamReadV1V2Tool::convert
StatusCode convert(xAOD::TriggerTowerContainer *const ttCollection) const
Convert ROB fragments to trigger towers.
Definition: PpmByteStreamReadV1V2Tool.cxx:132
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
LVL1BS::PpmByteStreamReadV1V2Tool::processPpmCompressedR3V1_
StatusCode processPpmCompressedR3V1_(State &state) const
Definition: PpmByteStreamReadV1V2Tool.cxx:414
LVL1BS::PpmByteStreamReadV1V2Tool::getPpmAdcSamplesR3_
std::vector< uint16_t > getPpmAdcSamplesR3_(State &state, BitReader &br, uint8_t format, uint8_t minIndex) const
Definition: PpmByteStreamReadV1V2Tool.cxx:498
LVL1BS::SubBlockHeader::isSubBlockHeader
bool isSubBlockHeader() const
Definition: SubBlockHeader.cxx:57
xAOD::int16_t
setScaleOne setStatusOne setSaturated int16_t
Definition: gFexGlobalRoI_v1.cxx:55
LVL1BS::PpmByteStreamReadV1V2Tool::m_srcIdMap
L1CaloSrcIdMap * m_srcIdMap
Definition: PpmByteStreamReadV1V2Tool.h:211
LVL1BS::PpmByteStreamReadV1V2Tool::m_robDataProvider
ServiceHandle< IROBDataProviderSvc > m_robDataProvider
Service for reading bytestream.
Definition: PpmByteStreamReadV1V2Tool.h:205
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
LVL1BS::PpmByteStreamReadV1V2Tool::processSubBlockStatus_
void processSubBlockStatus_(State &state, uint8_t crate, uint8_t module, uint32_t word) const
Definition: PpmByteStreamReadV1V2Tool.cxx:906
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
LVL1BS::PpmByteStreamReadV1V2Tool::m_ppmMaps
ToolHandle< LVL1::IL1CaloMappingTool > m_ppmMaps
Channel mapping tool.
Definition: PpmByteStreamReadV1V2Tool.h:203
LVL1::DataError::SubStatusWord
@ SubStatusWord
Definition: DataError.h:44
python.PyAthena.module
module
Definition: PyAthena.py:134
LVL1BS::PpmByteStreamReadV1V2Tool::m_ppmSourceIDs
std::vector< uint32_t > m_ppmSourceIDs
Definition: PpmByteStreamReadV1V2Tool.h:208
AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
LVL1BS::CaloUserHeader::isValid
bool isValid() const
Definition: CaloUserHeader.cxx:46
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
LVL1BS::PpmByteStreamReadV1V2Tool::s_channels
static const uint8_t s_channels
Definition: PpmByteStreamReadV1V2Tool.h:219
LVL1BS::PpmByteStreamReadV1V2Tool::processPpmStandardR4V1_
StatusCode processPpmStandardR4V1_(State &state) const
Definition: PpmByteStreamReadV1V2Tool.cxx:832
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
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
LVL1BS::PpmByteStreamReadV1V2Tool::interpretPpmHeaderR4V1_
void interpretPpmHeaderR4V1_(BitReader &br, uint8_t numAdc, int8_t &encoding, int8_t &minIndex) const
Definition: PpmByteStreamReadV1V2Tool.cxx:734
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
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
LVL1BS::L1CaloSrcIdMap::crate
int crate(uint32_t code) const
Return crate from unpacked moduleID.
Definition: L1CaloSrcIdMap.cxx:52
LVL1BS::PpmByteStreamReadV1V2Tool::addTriggerTowerV2_
StatusCode addTriggerTowerV2_(State &state, uint8_t crate, uint8_t module, uint8_t channel, std::vector< uint8_t > &&lcpVal, std::vector< uint8_t > &&lcpBcidVec, std::vector< uint8_t > &&ljeVal, std::vector< uint8_t > &&ljeSat80Vec, std::vector< uint16_t > &&adcVal, std::vector< uint8_t > &&adcExt, std::vector< int16_t > &&pedCor, std::vector< uint8_t > &&pedEn) const
Definition: PpmByteStreamReadV1V2Tool.cxx:928
xAOD::TriggerTower_v2
Description of TriggerTower_v2.
Definition: TriggerTower_v2.h:49
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
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
plotBeamSpotCompare.xd
xd
Definition: plotBeamSpotCompare.py:220
LVL1BS::PpmByteStreamReadV1V2Tool::processPpmNeutral_
StatusCode processPpmNeutral_(State &state) const
Definition: PpmByteStreamReadV1V2Tool.cxx:329
LVL1BS::PpmByteStreamReadV1V2Tool::m_ppmSourceIDsSpare
std::vector< uint32_t > m_ppmSourceIDsSpare
Definition: PpmByteStreamReadV1V2Tool.h:210
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
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
LVL1BS::PpmByteStreamReadV1V2Tool::processPpmBlockR3V1_
StatusCode processPpmBlockR3V1_(State &state) const
Definition: PpmByteStreamReadV1V2Tool.cxx:820
LVL1::TrigT1CaloDefs::xAODTriggerTowerLocation
static const std::string xAODTriggerTowerLocation
Definition: TrigT1CaloDefs.h:36
PixelModuleFeMask_create_db.payload
string payload
Definition: PixelModuleFeMask_create_db.py:69
LVL1BS::L1CaloSubBlock::UNPACK_EXCESS_DATA
@ UNPACK_EXCESS_DATA
Definition: L1CaloSubBlock.h:41
LVL1BS::PpmByteStreamReadV1V2Tool::initSourceIDs
void initSourceIDs()
Definition: PpmByteStreamReadV1V2Tool.cxx:1037
LVL1BS::PpmByteStreamReadV1V2Tool::RODPointer
OFFLINE_FRAGMENTS_NAMESPACE::PointerType RODPointer
Definition: PpmByteStreamReadV1V2Tool.h:79
fmt
LVL1BS::PpmByteStreamReadV1V2Tool::processPpmWord_
StatusCode processPpmWord_(State &state, uint32_t word, int indata) const
Definition: PpmByteStreamReadV1V2Tool.cxx:271
a
TList * a
Definition: liststreamerinfos.cxx:10
LVL1BS::PpmByteStreamReadV1V2Tool::RequestType::PPM
@ PPM
h
ReadFloatFromCool.adc
adc
Definition: ReadFloatFromCool.py:48
LVL1BS::PpmByteStreamReadV1V2Tool::m_ppmSourceIDsMuon
std::vector< uint32_t > m_ppmSourceIDsMuon
Definition: PpmByteStreamReadV1V2Tool.h:209
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
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
LVL1BS::PpmByteStreamReadV1V2Tool::processPpmCompressedR4V1_
StatusCode processPpmCompressedR4V1_(State &state) const
Definition: PpmByteStreamReadV1V2Tool.cxx:587
python.grid.isData
def isData(dataset)
Definition: grid.py:491
LVL1BS::PpmByteStreamReadV1V2Tool::processPpmStandardR3V1_
StatusCode processPpmStandardR3V1_(State &state) const
Definition: PpmByteStreamReadV1V2Tool.cxx:892
LVL1BS::L1CaloSrcIdMap::getRodID
uint32_t getRodID(int crate, int slink, int daqOrRoi, eformat::SubDetector subdet) const
Make a ROD Source ID.
Definition: L1CaloSrcIdMap.cxx:16
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
LVL1BS::PpmByteStreamReadV1V2Tool::getPpmAdcSamplesR4_
std::vector< uint16_t > getPpmAdcSamplesR4_(State &state, BitReader &br, uint8_t encoding, uint8_t minIndex) const
Definition: PpmByteStreamReadV1V2Tool.cxx:785
LVL1BS::PpmByteStreamReadV1V2Tool::ROBPointer
OFFLINE_FRAGMENTS_NAMESPACE::PointerType ROBPointer
Definition: PpmByteStreamReadV1V2Tool.h:78
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
LVL1BS::L1CaloSrcIdMap::maxSlinks
int maxSlinks() const
Return the maximum possible number of slinks.
Definition: L1CaloSrcIdMap.cxx:77
SG::DataProxy
Definition: DataProxy.h:44
error
Definition: IImpactPoint3dEstimator.h:70
TileDCSDataPlotter.tt
tt
Definition: TileDCSDataPlotter.py:874
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
python.SystemOfUnits.pc
float pc
Definition: SystemOfUnits.py:99
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
LVL1BS::PpmByteStreamReadV1V2Tool::ppmSourceIDs
const std::vector< uint32_t > & ppmSourceIDs(State &state, const std::string &sgKey) const
Return reference to vector with all possible Source Identifiers.
Definition: PpmByteStreamReadV1V2Tool.cxx:1063