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

#include <LArRawDataReadingAlg.h>

Inheritance diagram for LArRawDataReadingAlg:
Collaboration diagram for LArRawDataReadingAlg:

Public Member Functions

 LArRawDataReadingAlg (const std::string &name, ISvcLocator *pSvcLocator)
 
StatusCode initialize () override
 
StatusCode execute (const EventContext &ctx) const override
 
virtual StatusCode sysInitialize () override
 Override sysInitialize. More...
 
virtual bool isClonable () const override
 Specify if the algorithm is clonable. More...
 
virtual unsigned int cardinality () const override
 Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant. More...
 
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm. More...
 
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies. More...
 
virtual bool filterPassed (const EventContext &ctx) const
 
virtual void setFilterPassed (bool state, const EventContext &ctx) const
 
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 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

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

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

SG::WriteHandleKey< LArRawChannelContainerm_rawChannelKey
 
SG::WriteHandleKey< LArDigitContainerm_digitKey {this,"LArDigitKey","FREE"}
 
SG::WriteHandleKey< LArFebHeaderContainerm_febHeaderKey {this,"LArFebHeaderKey","LArFebHeader"}
 
SG::ReadHandleKey< xAOD::EventInfom_eventInfoKey {this, "eventInfoKey", "EventInfo", "Key for EventInfo object"}
 
ServiceHandle< IROBDataProviderSvcm_robDataProviderSvc {this,"ROBDataProviderSvc","ROBDataProviderSvc"}
 
BooleanProperty m_verifyChecksum {this,"VerifyChecksum",true,"Calculate and compare checksums to detect data transmission errors"}
 
BooleanProperty m_failOnCorruption {this,"FailOnCorruption",false,"Return FAILURE if data corruption is found"}
 
const LArOnlineIDm_onlineId =nullptr
 
bool m_doRawChannels =true
 
bool m_doDigits =true
 
bool m_doFebHeaders =true
 
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks. More...
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

Definition at line 25 of file LArRawDataReadingAlg.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ LArRawDataReadingAlg()

LArRawDataReadingAlg::LArRawDataReadingAlg ( const std::string &  name,
ISvcLocator *  pSvcLocator 
)

Definition at line 23 of file LArRawDataReadingAlg.cxx.

23  :
24  AthReentrantAlgorithm(name, pSvcLocator) {}

Member Function Documentation

◆ cardinality()

unsigned int AthReentrantAlgorithm::cardinality ( ) const
overridevirtualinherited

Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.

Override this to return 0 for reentrant algorithms.

Override this to return 0 for reentrant algorithms.

Definition at line 55 of file AthReentrantAlgorithm.cxx.

56 {
57  return 0;
58 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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; }

◆ execute()

StatusCode LArRawDataReadingAlg::execute ( const EventContext &  ctx) const
override

Definition at line 43 of file LArRawDataReadingAlg.cxx.

43  {
44  LArRawChannelContainer* rawChannels=nullptr;
45  LArDigitContainer* digits=nullptr;
46  LArFebHeaderContainer* febHeaders=nullptr;
47 
48  if (m_doRawChannels) {
50  ATH_CHECK(rawChannelsHdl.record(std::make_unique<LArRawChannelContainer>()));
51  rawChannels=rawChannelsHdl.ptr();
52  rawChannels->reserve(182468); //Total number of LAr readout channels
53  }
54 
55  if (m_doDigits) {
57  ATH_CHECK(digitsHdl.record(std::make_unique<LArDigitContainer>()));
58  digits=digitsHdl.ptr();
59  digits->reserve(1000); //Approximate number of Digits above threshold
60  }
61 
62  if (m_doFebHeaders) {
64  ATH_CHECK(febHeadersHdl.record(std::make_unique<LArFebHeaderContainer>()));
65  febHeaders=febHeadersHdl.ptr();
66  febHeaders->reserve(1524); //Total number of LAr Front End Boards
67  }
68 
69  //Get full events and filter out LAr ROBs
70  const RawEvent* fullEvent=m_robDataProviderSvc->getEvent(ctx);
71  std::map<eformat::SubDetectorGroup, std::vector<const uint32_t*> > rawEventTOC;
72  eformat::helper::build_toc(*fullEvent, rawEventTOC);
73  auto larRobs=rawEventTOC.find(eformat::LAR);
74  if (larRobs==rawEventTOC.end()) {
75  ATH_MSG_DEBUG("No LAr data found in this event. Recording empty LArRawChannelContainer");
76  return StatusCode::SUCCESS;
77  }
78 
79 
80  std::unique_ptr<LArRodBlockStructure> rodBlock;
81  uint16_t rodMinorVersion=0x0;
82  uint32_t rodBlockType=0x0;
83 
84 
85  for (const uint32_t* robPtr : larRobs->second) {
87  ATH_MSG_VERBOSE("Decoding ROB fragment 0x" << std::hex << rob.rob_source_id () << " with " << std::dec << rob.rod_fragment_size_word() << " ROB words");
88 
89  if (rob.rod_fragment_size_word() <3) {
90  if (m_failOnCorruption) {
91  ATH_MSG_ERROR("Encountered corrupt ROD fragment, less than 3 words!");
92  return StatusCode::FAILURE;
93  }else {
94  continue;
95  }
96  } else if(rob.rob_source_id()& 0x1000 ){
97  //ATH_MSG_DEBUG(" skip Latome fragment with source ID "<< std::hex << rob.rob_source_id()
98  rodBlock=nullptr;
99  continue;
100  } else if(!(rob.rod_source_id()>>12& 0x0F) //0xnn0nnn must be
101  && !((rob.rod_source_id()>>20) == 4) ){ //0x4nnnnn must be
102 
103  ATH_MSG_WARNING("Found not LAr fragment " << " event: "<<ctx.eventID().event_number());
105  ATH_MSG_WARNING("Rob source id.: 0x"<< std::hex << rob.rob_source_id () <<std::dec <<" ROD Source id: 0x"<<std::hex<<rob.rod_source_id()<<std::dec<<" Lvl1ID: "<<eventInfo->extendedLevel1ID());
106  continue;
107  }
108 
109 
110  eformat::helper::Version ver(rob.rod_version());
111  //(re-)init rodBlock only once per event or if (very unlikly or even impossible) some FEBs have a differnt firmware
112  if (rodBlock==nullptr || rodMinorVersion !=ver.minor_version() || rodBlockType!=(rob.rod_detev_type()&0xff)) {
113  rodMinorVersion=ver.minor_version();
114  rodBlockType=rob.rod_detev_type()&0xff;
115  ATH_MSG_VERBOSE("Found version " << rodMinorVersion << " of Rod Block Type " << rodBlockType);
116  if (rodBlockType==4) { //Physics mode
117  switch(rodMinorVersion) {
118  case 12: //Physics mode v6 09.03.2011 for LHC
119  rodBlock.reset(new LArRodBlockPhysicsV6);
120  break;
121  case 11: //Physics mode v5 16.06.2008 for LHC
122  case 10: //Physics mode v5 16.06.2008 for LHC
123  rodBlock.reset(new LArRodBlockPhysicsV5);
124  break;
125  default: // Unknown version of rod block type 4 (Physics mode)
126  if (m_failOnCorruption) {
127  ATH_MSG_ERROR("Found unsupported ROD Block version " << rodMinorVersion
128  << " of ROD block type " << rodBlockType << ". ROD Source id: 0x" <<std::hex<<rob.rod_source_id());
129  return StatusCode::FAILURE;
130  }
131  else {
132  ATH_MSG_WARNING("Found unsupported ROD Block version " << rodMinorVersion
133  << " of ROD block type " << rodBlockType << ". ROD Source id: 0x" <<std::hex<<rob.rod_source_id());
134  continue;
135  }
136  }// end switch(rodMinorVersion)
137  }//end rodBlockType==4 (physics mode)
138  else if (rodBlockType==2) { //Transparent mode
139  switch(rodMinorVersion) {
140  case 4:
142  break;
143  case 12:
144  rodBlock.reset(new LArRodBlockCalibrationV3);
145  break;
146  default:
147  ATH_MSG_WARNING("Found unsupported ROD Block version " << rodMinorVersion
148  << " of ROD block type " << rodBlockType);
149  return m_failOnCorruption ? StatusCode::FAILURE : StatusCode::SUCCESS;
150  }
151  }
152  }//End if need to re-init RodBlock
153 
154  const uint32_t* pData=rob.rod_data();
155  const uint32_t nData=rob.rod_ndata();
156  if (nData==0) {
157  if (m_failOnCorruption) {
158  ATH_MSG_ERROR("ROD 0x"<<std::hex<<rob.rod_source_id() << std::dec << " reports data block size 0");
159  return StatusCode::FAILURE;
160  }
161  else {
162  ATH_MSG_WARNING("ROD 0x"<<std::hex<<rob.rod_source_id() << std::dec << " reports data block size 0");
163  continue; //Jump to next ROD
164  }
165  }
166 
167  if (!rodBlock->setFragment(pData,nData)) {
168  ATH_MSG_ERROR("Failed to assign fragment pointer to LArRodBlockStructure");
169  return StatusCode::FAILURE;
170  }
171 
172  if(m_verifyChecksum) {
173  const uint32_t onsum = rodBlock->onlineCheckSum();
174  const uint32_t offsum = rodBlock->offlineCheckSum();
175  if(onsum!=offsum) {
176  if (m_failOnCorruption) {
177  ATH_MSG_ERROR("Checksum error:");
178  ATH_MSG_ERROR("online checksum = 0x" << MSG::hex << onsum);
179  ATH_MSG_ERROR("offline checksum = 0x" << MSG::hex << offsum << MSG::dec);
180  return StatusCode::FAILURE;
181  } else {
182  continue; //Jump to the next ROD-block
183  }
184  }
185  }
186 
187  //Loop over FEBs in ROD:
188  do {
189  HWIdentifier fId(Identifier32(rodBlock->getFEBID()));
190  if (!m_onlineId->isValidId(fId)) {
191  if (m_failOnCorruption){
192  ATH_MSG_ERROR("Invalid FEB identifer 0x" << std::hex << fId.get_identifier32().get_compact());
193  return StatusCode::FAILURE;
194  } else {
195  ATH_MSG_WARNING("Invalid FEB identifer 0x" << std::hex << fId.get_identifier32().get_compact());
196  continue; //Jump to next FEB
197  }
198  }
199  const int NthisFebChannel=m_onlineId->channelInSlotMax(fId);
200 
201  //Decode RawChanels (if requested)
202  if (m_doRawChannels) {
203  int32_t energy;
204  int32_t time;
205  int32_t quality;
206  uint32_t gain;
207  int fcNb;
208  while (rodBlock->getNextEnergy(fcNb,energy,time,quality,gain)) {
209  if (fcNb>=NthisFebChannel)
210  continue;
211 
212  HWIdentifier cId = m_onlineId->channel_Id(fId,fcNb);
213  uint16_t iquality = 0;
214  uint16_t iprovenance = LArProv::DSPCALC; //0x1000
215  if (quality>0) {
216  iprovenance |= LArProv::QTPRESENT; //0x2000
217  iquality = (quality & 0xFFFF);
218  }
219  rawChannels->emplace_back(cId, energy, time, iquality, iprovenance, (CaloGain::CaloGain)gain);
220  }//end getNextEnergyLoop
221  }//end if m_doRawChannels
222 
223  //Decode LArDigits (if requested)
224  if (m_doDigits) {
225  uint32_t gain;
226  int fcNb;
227  std::vector<short> samples;
228  while (rodBlock->getNextRawData(fcNb,samples,gain)) {
229  if (fcNb>=NthisFebChannel)
230  continue;
231  if (samples.size()==0) continue; // Ignore missing cells
232  HWIdentifier cId = m_onlineId->channel_Id(fId,fcNb);
233  digits->emplace_back(new LArDigit(cId, (CaloGain::CaloGain)gain, std::move(samples)));
234  samples.clear();
235  }//end getNextRawData loop
236  }//end if m_doDigits
237 
238  //Decode FebHeaders (if requested)
239  if (m_doFebHeaders) {
240  std::unique_ptr<LArFebHeader> larFebHeader(new LArFebHeader(fId));
241  LArFebHeaderReader::fillFebHeader(larFebHeader.get(),rodBlock.get(),rob);
242  febHeaders->push_back(std::move(larFebHeader));
243  }//end if m_doFebHeaders
244 
245  }while (rodBlock->nextFEB()); //Get NextFeb
246  } //end loop over ROBs
247  return StatusCode::SUCCESS;
248 }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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

◆ extraOutputDeps()

const DataObjIDColl & AthReentrantAlgorithm::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 79 of file AthReentrantAlgorithm.cxx.

80 {
81  // If we didn't find any symlinks to add, just return the collection
82  // from the base class. Otherwise, return the extended collection.
83  if (!m_extendedExtraObjects.empty()) {
85  }
86  return Algorithm::extraOutputDeps();
87 }

◆ filterPassed()

virtual bool AthReentrantAlgorithm::filterPassed ( const EventContext &  ctx) const
inlinevirtualinherited

Definition at line 135 of file AthReentrantAlgorithm.h.

135  {
136  return execState( ctx ).filterPassed();
137  }

◆ initialize()

StatusCode LArRawDataReadingAlg::initialize ( )
override

Definition at line 26 of file LArRawDataReadingAlg.cxx.

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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.

◆ isClonable()

bool AthReentrantAlgorithm::isClonable ( ) const
overridevirtualinherited

◆ msg() [1/2]

MsgStream& AthCommonMsg< Gaudi::Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

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

Definition at line 27 of file AthCommonMsg.h.

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

◆ msgLvl()

bool AthCommonMsg< Gaudi::Algorithm >::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< Gaudi::Algorithm > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

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

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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  }

◆ setFilterPassed()

virtual void AthReentrantAlgorithm::setFilterPassed ( bool  state,
const EventContext &  ctx 
) const
inlinevirtualinherited

Definition at line 139 of file AthReentrantAlgorithm.h.

139  {
140  execState( ctx ).setFilterPassed( state );
141  }

◆ sysExecute()

StatusCode AthReentrantAlgorithm::sysExecute ( const EventContext &  ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Definition at line 67 of file AthReentrantAlgorithm.cxx.

68 {
69  return Gaudi::Algorithm::sysExecute (ctx);
70 }

◆ sysInitialize()

StatusCode AthReentrantAlgorithm::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.

Reimplemented in InputMakerBase, and HypoBase.

Definition at line 96 of file AthReentrantAlgorithm.cxx.

96  {
98 
99  if (sc.isFailure()) {
100  return sc;
101  }
102 
103  ServiceHandle<ICondSvc> cs("CondSvc",name());
104  for (auto h : outputHandles()) {
105  if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
106  // do this inside the loop so we don't create the CondSvc until needed
107  if ( cs.retrieve().isFailure() ) {
108  ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
109  return StatusCode::SUCCESS;
110  }
111  if (cs->regHandle(this,*h).isFailure()) {
112  sc = StatusCode::FAILURE;
113  ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
114  << " with CondSvc");
115  }
116  }
117  }
118  return sc;
119 }

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_digitKey

SG::WriteHandleKey<LArDigitContainer> LArRawDataReadingAlg::m_digitKey {this,"LArDigitKey","FREE"}
private

Definition at line 36 of file LArRawDataReadingAlg.h.

◆ m_doDigits

bool LArRawDataReadingAlg::m_doDigits =true
private

Definition at line 53 of file LArRawDataReadingAlg.h.

◆ m_doFebHeaders

bool LArRawDataReadingAlg::m_doFebHeaders =true
private

Definition at line 54 of file LArRawDataReadingAlg.h.

◆ m_doRawChannels

bool LArRawDataReadingAlg::m_doRawChannels =true
private

Definition at line 52 of file LArRawDataReadingAlg.h.

◆ m_eventInfoKey

SG::ReadHandleKey<xAOD::EventInfo> LArRawDataReadingAlg::m_eventInfoKey {this, "eventInfoKey", "EventInfo", "Key for EventInfo object"}
private

Definition at line 39 of file LArRawDataReadingAlg.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthReentrantAlgorithm::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 153 of file AthReentrantAlgorithm.h.

◆ m_failOnCorruption

BooleanProperty LArRawDataReadingAlg::m_failOnCorruption {this,"FailOnCorruption",false,"Return FAILURE if data corruption is found"}
private

Definition at line 46 of file LArRawDataReadingAlg.h.

◆ m_febHeaderKey

SG::WriteHandleKey<LArFebHeaderContainer> LArRawDataReadingAlg::m_febHeaderKey {this,"LArFebHeaderKey","LArFebHeader"}
private

Definition at line 37 of file LArRawDataReadingAlg.h.

◆ m_onlineId

const LArOnlineID* LArRawDataReadingAlg::m_onlineId =nullptr
private

Definition at line 49 of file LArRawDataReadingAlg.h.

◆ m_rawChannelKey

SG::WriteHandleKey<LArRawChannelContainer> LArRawDataReadingAlg::m_rawChannelKey
private
Initial value:
{this,"LArRawChannelKey","LArRawChannels",
"SG key of the LArRawChannelContainer"}

Definition at line 34 of file LArRawDataReadingAlg.h.

◆ m_robDataProviderSvc

ServiceHandle<IROBDataProviderSvc> LArRawDataReadingAlg::m_robDataProviderSvc {this,"ROBDataProviderSvc","ROBDataProviderSvc"}
private

Definition at line 42 of file LArRawDataReadingAlg.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_verifyChecksum

BooleanProperty LArRawDataReadingAlg::m_verifyChecksum {this,"VerifyChecksum",true,"Calculate and compare checksums to detect data transmission errors"}
private

Definition at line 45 of file LArRawDataReadingAlg.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
DataVector::reserve
void reserve(size_type n)
Attempt to preallocate enough memory for a specified number of elements.
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
Identifier32
Definition: Identifier32.h:25
LArRodBlockPhysicsV5
Definition: LArRodBlockPhysicsV5.h:32
LArFebHeaderReader::fillFebHeader
void fillFebHeader(LArFebHeader *lfh, const LArRodBlockStructure *bl, const ROBFragment &robFrag)
Fill info for one FEB Header.
Definition: LArFebHeaderReader.cxx:10
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
DataVector::emplace_back
value_type emplace_back(value_type pElem)
Add an element to the end of the collection.
LArRawDataReadingAlg::m_rawChannelKey
SG::WriteHandleKey< LArRawChannelContainer > m_rawChannelKey
Definition: LArRawDataReadingAlg.h:34
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
CaloCondBlobAlgs_fillNoiseFromASCII.gain
gain
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:110
AthCommonDataStore::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 > renounce(T &h)
Definition: AthCommonDataStore.h:380
RawEvent
OFFLINE_FRAGMENTS_NAMESPACE::FullEventFragment RawEvent
data type for reading raw event
Definition: RawEvent.h:37
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
LArRawDataReadingAlg::m_doFebHeaders
bool m_doFebHeaders
Definition: LArRawDataReadingAlg.h:54
LArRodBlockPhysicsV6
Definition: LArRodBlockPhysicsV6.h:32
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
SG::VarHandleKey::empty
bool empty() const
Test if the key is blank.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:150
HWIdentifier
Definition: HWIdentifier.h:13
LArRodBlockStructure::getNextEnergy
virtual int getNextEnergy(int &channelNumber, int32_t &energy, int32_t &time, int32_t &quality, uint32_t &gain)
Definition: LArRodBlockStructure.h:456
LArRawDataReadingAlg::m_febHeaderKey
SG::WriteHandleKey< LArFebHeaderContainer > m_febHeaderKey
Definition: LArRawDataReadingAlg.h:37
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
LArRawDataReadingAlg::m_digitKey
SG::WriteHandleKey< LArDigitContainer > m_digitKey
Definition: LArRawDataReadingAlg.h:36
LArRodBlockStructure::offlineCheckSum
virtual uint32_t offlineCheckSum() const
Definition: LArRodBlockStructure.cxx:163
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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
LArRawDataReadingAlg::m_doDigits
bool m_doDigits
Definition: LArRawDataReadingAlg.h:53
Pythia8_A14_NNPDF23LO_Var1Down_Common.ver
ver
Definition: Pythia8_A14_NNPDF23LO_Var1Down_Common.py:26
LArRawDataReadingAlg::m_verifyChecksum
BooleanProperty m_verifyChecksum
Definition: LArRawDataReadingAlg.h:45
AthCommonDataStore
Definition: AthCommonDataStore.h:52
AthReentrantAlgorithm::AthReentrantAlgorithm
AthReentrantAlgorithm()
Default constructor:
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
ParticleGun_FastCalo_ChargeFlip_Config.energy
energy
Definition: ParticleGun_FastCalo_ChargeFlip_Config.py:78
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:88
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
LArDigit
Liquid Argon digit base class.
Definition: LArDigit.h:25
eformat::ROBFragment
Definition: L1CaloBsDecoderUtil.h:12
LArOnlineID_Base::channelInSlotMax
int channelInSlotMax(const HWIdentifier Id) const
Return the Maximum channel number of a given feb slot.
Definition: LArOnlineID_Base.cxx:286
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
01SubmitToGrid.samples
samples
Definition: 01SubmitToGrid.py:58
LArProv::QTPRESENT
@ QTPRESENT
Definition: LArProvenance.h:33
LArRawDataReadingAlg::m_doRawChannels
bool m_doRawChannels
Definition: LArRawDataReadingAlg.h:52
LArOnlineID_Base::channel_Id
HWIdentifier channel_Id(int barrel_ec, int pos_neg, int feedthrough, int slot, int channel) const
create channel identifier from fields
Definition: LArOnlineID_Base.cxx:1569
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
LArRodBlockStructure::getFEBID
uint32_t getFEBID() const
Definition: LArRodBlockStructure.h:297
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
LArFebHeader
Holds information from the FEB Header.
Definition: LArFebHeader.h:21
LArOnlineID_Base::isValidId
bool isValidId(const HWIdentifier id) const
Returns false if the identifier is not a LAr-online id or any of the sub-fields is out of range.
Definition: LArOnlineID_Base.cxx:1333
AthReentrantAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Definition: AthReentrantAlgorithm.h:153
LArProv::DSPCALC
@ DSPCALC
Definition: LArProvenance.h:32
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
LArRodBlockCalibrationV3
This class provides decoding/encoding from/to ROD format.
Definition: LArRodBlockCalibrationV3.h:24
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
LArRodBlockStructure::nextFEB
bool nextFEB()
Definition: LArRodBlockStructure.h:497
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
AthReentrantAlgorithm::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthReentrantAlgorithm.cxx:96
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
CaloGain::CaloGain
CaloGain
Definition: CaloGain.h:11
LArRawDataReadingAlg::m_eventInfoKey
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
Definition: LArRawDataReadingAlg.h:39
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
a
TList * a
Definition: liststreamerinfos.cxx:10
h
CaloSwCorrections.time
def time(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:242
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
LArRodBlockStructure::getNextRawData
virtual int getNextRawData(int &channelNumber, std::vector< short > &samples, uint32_t &gain)
Definition: LArRodBlockStructure.cxx:88
LArRawDataReadingAlg::m_onlineId
const LArOnlineID * m_onlineId
Definition: LArRawDataReadingAlg.h:49
LArRodBlockStructure::setFragment
bool setFragment(const uint32_t *p, uint32_t n)
Definition: LArRodBlockStructure.h:252
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
LArDigitContainer
Container class for LArDigit.
Definition: LArDigitContainer.h:24
LArRodBlockTransparentV0
Definition: LArRodBlockTransparentV0.h:53
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
LArFebHeaderContainer
Container class for LArFebHeader.
Definition: LArFebHeaderContainer.h:20
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
LArRodBlockStructure::onlineCheckSum
virtual uint32_t onlineCheckSum() const
Definition: LArRodBlockStructure.cxx:155
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
LArRawDataReadingAlg::m_failOnCorruption
BooleanProperty m_failOnCorruption
Definition: LArRawDataReadingAlg.h:46
LArRawDataReadingAlg::m_robDataProviderSvc
ServiceHandle< IROBDataProviderSvc > m_robDataProviderSvc
Definition: LArRawDataReadingAlg.h:42
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
LAR
@ LAR
Definition: RegSelEnums.h:27
fitman.k
k
Definition: fitman.py:528
LArRawChannelContainer
Container for LArRawChannel (IDC using LArRawChannelCollection)
Definition: LArRawChannelContainer.h:26
ServiceHandle< ICondSvc >