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

#include <LArBadEventCatcher.h>

Inheritance diagram for LArBadEventCatcher:
Collaboration diagram for LArBadEventCatcher:

Public Member Functions

 LArBadEventCatcher (const std::string &name, ISvcLocator *pSvcLocator)
 
 ~LArBadEventCatcher ()
 
StatusCode initialize ()
 
StatusCode execute ()
 
StatusCode finalize ()
 
StatusCode stop ()
 
virtual StatusCode sysInitialize () override
 Override sysInitialize. More...
 
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies. 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 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

std::string decipherFebError (const uint32_t errword) const
 
std::string eventDetails () 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

const LArOnlineIDm_onlineID
 
bool m_checkDigits
 
bool m_checkAccCalibDigits
 
bool m_checkFebHeaders
 
bool m_checkBSErrors
 
uint16_t m_BSErrFailMask
 
unsigned m_nEvent
 
std::size_t m_nDigits
 
std::size_t m_nAccCalibDigits
 
std::size_t m_nFebheaders
 
std::size_t m_thisSize
 
std::vector< std::string > m_keyList
 
bool m_stopJob
 
bool m_stopOnError
 
DataObjIDColl m_extendedExtraObjects
 
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

Algorithm to catch corrupt events

Unlike monitoring algorithms (that wait for the job to finish, need subsequent DQMF checks, etc) this algorithm reacts imedatly if a corrupt event is identfied.It returns a StatusCode::FAILURE in the execute as well as in the finalize and causes athena to exit without any delay.

Definition at line 35 of file LArBadEventCatcher.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ LArBadEventCatcher()

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

Definition at line 14 of file LArBadEventCatcher.cxx.

14  :
15  AthAlgorithm(name,pSvcLocator),
16  m_onlineID(0),
17  m_thisSize(0)
18 {
19  m_keyList.push_back("HIGH");
20  m_keyList.push_back("MEDIUM");
21  m_keyList.push_back("LOW");
22 
23  declareProperty("CheckDigitCont",m_checkDigits=false);
24  declareProperty("CheckAccCalibDigitCont",m_checkAccCalibDigits=false);
25  declareProperty("CheckFebHeader",m_checkFebHeaders=false);
26  declareProperty("CheckBSErrors",m_checkBSErrors=false);
27  declareProperty("KeyList",m_keyList);
28  declareProperty("StopOnError",m_stopOnError=true);
29 
30 
31  m_nDigits=0;
33  m_nFebheaders=0;
34  m_nEvent=0;
36  m_stopJob=false;
37  m_thisSize=0;
38 }

◆ ~LArBadEventCatcher()

LArBadEventCatcher::~LArBadEventCatcher ( )

Definition at line 41 of file LArBadEventCatcher.cxx.

41  {
42 }

Member Function Documentation

◆ decipherFebError()

std::string LArBadEventCatcher::decipherFebError ( const uint32_t  errword) const
private

Definition at line 213 of file LArBadEventCatcher.cxx.

213  {
214 
215  std::string result;
216 
217  if (errword & (0x1U << LArFebErrorSummary::Parity))
218  result+="Parity Error, ";
219  if (errword & (0x1U << LArFebErrorSummary::BCID))
220  result+="BCID Mismatch, ";
221  if (errword & (0x1U << LArFebErrorSummary::SampleHeader))
222  result+="Sample Header Error, ";
223  if (errword & (0x1U << LArFebErrorSummary::EVTID))
224  result+="EVTID Error, ";
225  if (errword & (0x1U << LArFebErrorSummary::ScacStatus))
226  result+="SCAC Status, ";
227  if (errword & (0x1U << LArFebErrorSummary::ScaOutOfRange))
228  result+="SCA out of range, ";
229  if (errword & (0x1U << LArFebErrorSummary::GainMismatch))
230  result+="Gain Mismatch, ";
231  if (errword & (0x1U << LArFebErrorSummary::TypeMismatch))
232  result+="Type Mismatch ";
233  if (errword & (0x1U << LArFebErrorSummary::NumOfSamples))
234  result+="Number of Samples Mismatch, ";
235  if (errword & (0x1U << LArFebErrorSummary::EmptyDataBlock))
236  result+="Empty Data Block, ";
237  if (errword & (0x1U << LArFebErrorSummary::DspBlockSize))
238  result+="DSP Block Size, ";
239  if (errword & (0x1U << LArFebErrorSummary::CheckSum))
240  result+="Checksum error, ";
241  if (errword & (0x1U << LArFebErrorSummary::MissingHeader))
242  result+="Missing Header, ";
243 
244  if (result.size()<2)
245  result="Unknown error";
246  else
247  result.erase(result.end()-2,result.end());
248 
249  return result;
250 }

◆ declareGaudiProperty() [1/4]

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

◆ eventDetails()

std::string LArBadEventCatcher::eventDetails ( ) const
private

Definition at line 186 of file LArBadEventCatcher.cxx.

186  {
187  std::stringstream result;
188 
189  const xAOD::EventInfo* eventInfo;
190  StatusCode sc = evtStore()->retrieve(eventInfo);
191  if (sc.isFailure())
192  result << "[No EventInfo]";
193  else {
194  unsigned int evtNum = eventInfo->eventNumber();
195  unsigned int runNum = eventInfo->runNumber();
196  result << "Run " << runNum << ", Evt " << evtNum;
197  }
198  result << ", Idx " << m_nEvent << ": ";
199  return result.str();
200 }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< 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< 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 LArBadEventCatcher::execute ( )

Definition at line 65 of file LArBadEventCatcher.cxx.

65  {
66 
68  m_thisSize=0;
69  else
70  m_thisSize=1; //Assume non-empty event if no event-container is checked
71 
72  if (m_checkDigits) {
73  for (size_t i=0;i<m_keyList.size();++i) {
74  if (evtStore()->contains<LArDigitContainer>(m_keyList[i])) {
75  const LArDigitContainer* cont;
76  StatusCode sc=evtStore()->retrieve(cont,m_keyList[i]);
77  if (sc.isFailure()) {
78  ATH_MSG_ERROR ("Can't retrieve LArDigitContainer with key " << m_keyList[i]);
79  return StatusCode::FAILURE;
80  }
81  const size_t currSize=cont->size();
82  m_thisSize=currSize;
83  if (currSize>0) { //We ignore emtpy containers
84  if (m_nDigits==0) m_nDigits=currSize; //Apparently the first event with an non-empty container
85  if (m_nDigits!=currSize) {
86  ATH_MSG_FATAL (eventDetails() <<"Mismatch in size of LArDigitContainer: Have " << currSize << " elements, expected " << m_nDigits);
87  m_stopJob=true;
88  if (m_stopOnError)
89  return StatusCode::FAILURE;
90  } //end if have mismatch
91  }//end if currSize>0
92  }//end if storeGate->contains
93  }//end loop over keys
94  }//end if m_checkDigits
95 
96 
97  if (m_checkFebHeaders) {
98  for (size_t i=0;i<m_keyList.size();++i) {
99  if (evtStore()->contains<LArFebHeaderContainer>(m_keyList[i])) {
100  const LArFebHeaderContainer* cont;
101  StatusCode sc=evtStore()->retrieve(cont,m_keyList[i]);
102  if (sc.isFailure()) {
103  ATH_MSG_ERROR ("Can't retrieve LArFebHeaderContainer with key " << m_keyList[i]);
104  return StatusCode::FAILURE;
105  }
106  const size_t currSize=cont->size();
107  if (currSize>0) { //We ignore emtpy containers
108  if (m_nFebheaders==0) m_nFebheaders=currSize; //Apparently the first event with an non-empty container
109  if (m_nFebheaders!=currSize) {
110  ATH_MSG_FATAL (eventDetails() << "Mismatch in size of LArFebHeaderContainer: Have " << currSize << " elements, expected " << m_nFebheaders);
111  m_stopJob=true;
112  if (m_stopOnError)
113  return StatusCode::FAILURE;
114  } //end if have mismatch
115  }//end if currSize>0
116  }//end if storeGate->contains
117  }//end loop over keys
118  }//end if m_checkFebHeaders
119 
120 
121 
122  if (m_checkAccCalibDigits) {
123  for (size_t i=0;i<m_keyList.size();++i) {
124  if (evtStore()->contains<LArAccumulatedCalibDigitContainer>(m_keyList[i])) {
126  StatusCode sc=evtStore()->retrieve(cont,m_keyList[i]);
127  if (sc.isFailure()) {
128  ATH_MSG_ERROR ("Can't retrieve LArAccumulatedCalibDigitContainer with key " << m_keyList[i]);
129  return StatusCode::FAILURE;
130  }
131  const size_t currSize=cont->size();
132  m_thisSize=currSize;
133  if (currSize>0) { //We ignore emtpy containers
134  if (m_nAccCalibDigits==0) m_nAccCalibDigits=currSize; //Apparently the first event with an non-empty container
135  if (m_nAccCalibDigits!=currSize) {
136  ATH_MSG_FATAL (eventDetails() << "Mismatch in size of LArAccCalibDigitContainer: Have " << currSize << " elements, expected " << m_nAccCalibDigits);
137  m_stopJob=true;
138  if (m_stopOnError)
139  return StatusCode::FAILURE;
140  } //end if have mismatch
141  }//end if currSize>0
142  }//end if storeGate->contains
143  }//end loop over keys
144  }//end if m_checkAccCalibDigits
145 
146 
147  if (m_checkBSErrors) {
148  const LArFebErrorSummary* febErrSum = nullptr;
149  StatusCode sc=evtStore()->retrieve(febErrSum);
150  if (sc.isFailure()) {
151  ATH_MSG_ERROR ("Can't retrieve LArFEBErrorSummary");
152  return sc;
153  }
154 
155  const std::map<unsigned int,uint16_t>& allFebErrs=febErrSum->get_all_febs();
156  std::map<unsigned int,uint16_t>::const_iterator it=allFebErrs.begin();
157  std::map<unsigned int,uint16_t>::const_iterator it_e=allFebErrs.end();
158  for(;it!=it_e;++it) {
159  if (it->second & 0xEFFF) { //FIXME all events have missing header ???
160  //std::cout << std::hex << "Feb: 0x" << it->first << " Err 0x"
161  // << it->second << std::endl;
162  MSG::Level msglvl=MSG::WARNING;
163  if ((it->second & m_BSErrFailMask) && (m_thisSize>0)) {
164  m_stopJob=true;
165  if (m_stopOnError) msglvl=MSG::FATAL; else msglvl=MSG::ERROR;
166  }
167  const HWIdentifier fId(it->first);
168  msg() << msglvl << eventDetails() << "FEB 0x" << std::hex << it->first << " reports the following error(s): "
169  << decipherFebError(it->second) << endmsg;
170  msg() << msglvl << "Feb location: " << m_onlineID->channel_name(fId) << endmsg;
171 
172  if (m_thisSize>0) msg() << msglvl << "This event carries data" << endmsg;
173 
174  if (m_stopJob && m_stopOnError)
175  return StatusCode::FAILURE;
176  }//end if error
177  }//end loop over FEBs
178  }//end if check BS Errs
179 
180 
181  m_nEvent++;
182  return StatusCode::SUCCESS;
183 }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< 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 & AthAlgorithm::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

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

Definition at line 50 of file AthAlgorithm.cxx.

51 {
52  // If we didn't find any symlinks to add, just return the collection
53  // from the base class. Otherwise, return the extended collection.
54  if (!m_extendedExtraObjects.empty()) {
56  }
57  return Algorithm::extraOutputDeps();
58 }

◆ finalize()

StatusCode LArBadEventCatcher::finalize ( )
inline

Definition at line 51 of file LArBadEventCatcher.h.

51 {return StatusCode::SUCCESS;}

◆ initialize()

StatusCode LArBadEventCatcher::initialize ( )

Get LAr Online ID helper class

Definition at line 45 of file LArBadEventCatcher.cxx.

45  {
46 
48  ATH_MSG_WARNING ("All checks switched off ?!");
49 
50  ATH_MSG_INFO ("LArBadEventChacher initialized");
51 
52 
54 
56  StatusCode sc = detStore()->retrieve(m_onlineID, "LArOnlineID");
57  if (sc.isFailure()) {
58  ATH_MSG_ERROR ("Could not get LArOnlineID helper !");
59  return StatusCode::FAILURE;
60  }
61 
62  return StatusCode::SUCCESS;
63 }

◆ inputHandles()

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

◆ msg() [1/2]

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

MsgStream& AthCommonMsg< 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< 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< 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< 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< 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  }

◆ stop()

StatusCode LArBadEventCatcher::stop ( )

Definition at line 203 of file LArBadEventCatcher.cxx.

203  {
204  if (m_stopJob && m_stopOnError) {
205  ATH_MSG_FATAL ("Fatal error found during execute");
206  return StatusCode::FAILURE;
207  }
208  else
209  return StatusCode::SUCCESS;
210 }

◆ sysInitialize()

StatusCode AthAlgorithm::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< Algorithm > >.

Reimplemented in AthAnalysisAlgorithm, AthFilterAlgorithm, PyAthena::Alg, and AthHistogramAlgorithm.

Definition at line 66 of file AthAlgorithm.cxx.

66  {
68 
69  if (sc.isFailure()) {
70  return sc;
71  }
72  ServiceHandle<ICondSvc> cs("CondSvc",name());
73  for (auto h : outputHandles()) {
74  if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
75  // do this inside the loop so we don't create the CondSvc until needed
76  if ( cs.retrieve().isFailure() ) {
77  ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
78  return StatusCode::SUCCESS;
79  }
80  if (cs->regHandle(this,*h).isFailure()) {
81  sc = StatusCode::FAILURE;
82  ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
83  << " with CondSvc");
84  }
85  }
86  }
87  return sc;
88 }

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< 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< 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_BSErrFailMask

uint16_t LArBadEventCatcher::m_BSErrFailMask
private

Definition at line 73 of file LArBadEventCatcher.h.

◆ m_checkAccCalibDigits

bool LArBadEventCatcher::m_checkAccCalibDigits
private

Definition at line 68 of file LArBadEventCatcher.h.

◆ m_checkBSErrors

bool LArBadEventCatcher::m_checkBSErrors
private

Definition at line 70 of file LArBadEventCatcher.h.

◆ m_checkDigits

bool LArBadEventCatcher::m_checkDigits
private

Definition at line 67 of file LArBadEventCatcher.h.

◆ m_checkFebHeaders

bool LArBadEventCatcher::m_checkFebHeaders
private

Definition at line 69 of file LArBadEventCatcher.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

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

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthAlgorithm::m_extendedExtraObjects
privateinherited

Definition at line 79 of file AthAlgorithm.h.

◆ m_keyList

std::vector<std::string> LArBadEventCatcher::m_keyList
private

Definition at line 78 of file LArBadEventCatcher.h.

◆ m_nAccCalibDigits

std::size_t LArBadEventCatcher::m_nAccCalibDigits
private

Definition at line 76 of file LArBadEventCatcher.h.

◆ m_nDigits

std::size_t LArBadEventCatcher::m_nDigits
private

Definition at line 76 of file LArBadEventCatcher.h.

◆ m_nEvent

unsigned LArBadEventCatcher::m_nEvent
private

Definition at line 74 of file LArBadEventCatcher.h.

◆ m_nFebheaders

std::size_t LArBadEventCatcher::m_nFebheaders
private

Definition at line 76 of file LArBadEventCatcher.h.

◆ m_onlineID

const LArOnlineID* LArBadEventCatcher::m_onlineID
private

Definition at line 63 of file LArBadEventCatcher.h.

◆ m_stopJob

bool LArBadEventCatcher::m_stopJob
private

Definition at line 80 of file LArBadEventCatcher.h.

◆ m_stopOnError

bool LArBadEventCatcher::m_stopOnError
private

Definition at line 81 of file LArBadEventCatcher.h.

◆ m_thisSize

std::size_t LArBadEventCatcher::m_thisSize
private

Definition at line 77 of file LArBadEventCatcher.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
LArFebErrorSummary::CheckSum
@ CheckSum
Definition: LArFebErrorSummary.h:28
LArBadEventCatcher::m_BSErrFailMask
uint16_t m_BSErrFailMask
Definition: LArBadEventCatcher.h:73
LArBadEventCatcher::m_checkBSErrors
bool m_checkBSErrors
Definition: LArBadEventCatcher.h:70
LArBadEventCatcher::m_checkDigits
bool m_checkDigits
Definition: LArBadEventCatcher.h:67
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
LArFebErrorSummary::get_all_febs
const std::map< unsigned int, uint16_t > & get_all_febs() const
get all febs with error
Definition: LArFebErrorSummary.cxx:47
get_generator_info.result
result
Definition: get_generator_info.py:21
python.Constants.FATAL
int FATAL
Definition: Control/AthenaCommon/python/Constants.py:19
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
xAOD::EventInfo_v1::eventNumber
uint64_t eventNumber() const
The current event's event number.
AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
LArBadEventCatcher::m_nAccCalibDigits
std::size_t m_nAccCalibDigits
Definition: LArBadEventCatcher.h:76
LArBadEventCatcher::eventDetails
std::string eventDetails() const
Definition: LArBadEventCatcher.cxx:186
skel.it
it
Definition: skel.GENtoEVGEN.py:396
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
skel.runNum
runNum
Definition: skel.ABtoEVGEN.py:137
HWIdentifier
Definition: HWIdentifier.h:13
xAOD::EventInfo_v1::runNumber
uint32_t runNumber() const
The current event's run number.
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
AthCommonDataStore< AthCommonMsg< 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
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:27
AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
LArBadEventCatcher::m_nDigits
std::size_t m_nDigits
Definition: LArBadEventCatcher.h:76
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
LArFebErrorSummary::TypeMismatch
@ TypeMismatch
Definition: LArFebErrorSummary.h:28
AthCommonDataStore
Definition: AthCommonDataStore.h:52
TrigConf::MSGTC::Level
Level
Definition: Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/MsgStream.h:21
AthAlgorithm::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthAlgorithm.cxx:66
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
AthCommonDataStore< AthCommonMsg< Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
lumiFormat.i
int i
Definition: lumiFormat.py:85
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
LArFebErrorSummary::ScacStatus
@ ScacStatus
Definition: LArFebErrorSummary.h:27
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
LArBadEventCatcher::m_checkAccCalibDigits
bool m_checkAccCalibDigits
Definition: LArBadEventCatcher.h:68
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
LArBadEventCatcher::m_nFebheaders
std::size_t m_nFebheaders
Definition: LArBadEventCatcher.h:76
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
LArFebErrorSummary::EmptyDataBlock
@ EmptyDataBlock
Definition: LArFebErrorSummary.h:28
LArFebErrorSummary::EVTID
@ EVTID
Definition: LArFebErrorSummary.h:27
LArBadEventCatcher::m_stopJob
bool m_stopJob
Definition: LArBadEventCatcher.h:80
xAOD::EventInfo_v1
Class describing the basic event information.
Definition: EventInfo_v1.h:43
LArFebErrorSummary::DspBlockSize
@ DspBlockSize
Definition: LArFebErrorSummary.h:28
AthAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Definition: AthAlgorithm.h:79
a
TList * a
Definition: liststreamerinfos.cxx:10
h
LArFebErrorSummary::Parity
@ Parity
Definition: LArFebErrorSummary.h:27
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
LArFebErrorSummary
Holds information from the FEB Error Summary.
Definition: LArFebErrorSummary.h:23
LArBadEventCatcher::decipherFebError
std::string decipherFebError(const uint32_t errword) const
Definition: LArBadEventCatcher.cxx:213
AthCommonMsg< Algorithm >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
LArBadEventCatcher::m_nEvent
unsigned m_nEvent
Definition: LArBadEventCatcher.h:74
LArBadEventCatcher::m_thisSize
std::size_t m_thisSize
Definition: LArBadEventCatcher.h:77
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
LArDigitContainer
Container class for LArDigit.
Definition: LArDigitContainer.h:24
LArBadEventCatcher::m_keyList
std::vector< std::string > m_keyList
Definition: LArBadEventCatcher.h:78
LArFebHeaderContainer
Container class for LArFebHeader.
Definition: LArFebHeaderContainer.h:20
LArFebErrorSummary::SampleHeader
@ SampleHeader
Definition: LArFebErrorSummary.h:27
AthAlgorithm::AthAlgorithm
AthAlgorithm()
Default constructor:
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
LArFebErrorSummary::ScaOutOfRange
@ ScaOutOfRange
Definition: LArFebErrorSummary.h:27
LArFebErrorSummary::BCID
@ BCID
Definition: LArFebErrorSummary.h:27
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
LArBadEventCatcher::m_checkFebHeaders
bool m_checkFebHeaders
Definition: LArBadEventCatcher.h:69
LArOnlineID_Base::channel_name
std::string channel_name(const HWIdentifier id) const
Return a string corresponding to a feedthrough name given an identifier.
Definition: LArOnlineID_Base.cxx:219
LArAccumulatedCalibDigitContainer
Container class for LArAccumulatedCalibDigit.
Definition: LArAccumulatedCalibDigitContainer.h:25
LArBadEventCatcher::m_onlineID
const LArOnlineID * m_onlineID
Definition: LArBadEventCatcher.h:63
LArFebErrorSummary::NumOfSamples
@ NumOfSamples
Definition: LArFebErrorSummary.h:28
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
LArBadEventCatcher::m_stopOnError
bool m_stopOnError
Definition: LArBadEventCatcher.h:81
fitman.k
k
Definition: fitman.py:528
LArFebErrorSummary::MissingHeader
@ MissingHeader
Definition: LArFebErrorSummary.h:28
LArFebErrorSummary::GainMismatch
@ GainMismatch
Definition: LArFebErrorSummary.h:28
ServiceHandle< ICondSvc >