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

#include <EventInfoAttListTool.h>

Inheritance diagram for EventInfoAttListTool:
Collaboration diagram for EventInfoAttListTool:

Public Member Functions

 EventInfoAttListTool (const std::string &type, const std::string &name, const IInterface *parent)
 Standard Constructor. More...
 
StatusCode initialize () override
 Overriding initialize, finalize and execute. More...
 
StatusCode finalize () override
 finialize - called once at the end More...
 
bool isValid ()
 
const coral::AttributeListSpecification & getAttributeSpecification ()
 
const AthenaAttributeList getAttributeList (const xAOD::EventInfo &einfo)
 
const AthenaAttributeList getAttributeList (const EventInfo &einfo)
 
std::unique_ptr< AthenaAttributeListgetAttributeListPtr (const xAOD::EventInfo &einfo)
 
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
 

Static Public Member Functions

static const InterfaceID & interfaceID ()
 AlgTool and IAlgTool interface methods. More...
 

Protected Member Functions

StatusCode eventTag (AthenaAttributeList &eventTagCol, const xAOD::EventInfo &eventInfo)
 the various components to build their own fragments of tag More...
 
StatusCode eventTag (AthenaAttributeList &eventTagCol, const EventInfo &eventInfo)
 build the tag associate to the event information More...
 
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...
 

Protected Attributes

coral::AttributeListSpecification * m_attribListSpec {}
 

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

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 28 of file EventInfoAttListTool.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ EventInfoAttListTool()

EventInfoAttListTool::EventInfoAttListTool ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

Standard Constructor.

the constructor

Definition at line 32 of file EventInfoAttListTool.cxx.

33  :
35 {
36  declareInterface<EventInfoAttListTool>( this );
37 }

Member Function Documentation

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

◆ eventTag() [1/2]

StatusCode EventInfoAttListTool::eventTag ( AthenaAttributeList eventTagCol,
const EventInfo eventInfo 
)
protected

build the tag associate to the event information

Event Type

Definition at line 162 of file EventInfoAttListTool.cxx.

164 {
165 
167  bool isSimulation = eventInfo.event_type()->test(EventType::IS_SIMULATION);
168  bool isTestBeam = eventInfo.event_type()->test(EventType::IS_TESTBEAM);
169  bool isCalibration = eventInfo.event_type()->test(EventType::IS_CALIBRATION);
170  eventTag["IsSimulation"] .data<bool>() = isSimulation;
171  eventTag["IsCalibration"].data<bool>() = isCalibration;
172  eventTag["IsTestBeam"] .data<bool>() = isTestBeam;
173 
174  // run number and Event number
175  unsigned int runNumber = eventInfo.event_ID()->run_number();
176  unsigned int condRunNumber = runNumber;
177  unsigned long long eventNumber = eventInfo.event_ID()->event_number();
178  unsigned int lumiBlock = eventInfo.event_ID()->lumi_block();
179  unsigned int mcChannel = 0;
180  if (isSimulation) mcChannel = eventInfo.event_type()->mc_channel_number();;
181  eventTag["McChannel"] .data<unsigned int>() = mcChannel;
182  eventTag["RunNumber"] .data<unsigned int>() = runNumber;
183  eventTag["EventNumber"] .data<unsigned long long>() = eventNumber;
184  eventTag["LumiBlockN"] .data<unsigned int>() = lumiBlock;
185  eventTag["ConditionsRun"].data<unsigned int>() = condRunNumber;
186 
187  unsigned long timeStamp = eventInfo.event_ID()->time_stamp();
188  unsigned long timeStampNS = eventInfo.event_ID()->time_stamp_ns_offset();
189  unsigned long bunchId = eventInfo.event_ID()->bunch_crossing_id();
190  eventTag["EventTime"] .data<unsigned int>() = timeStamp;
191  eventTag["EventTimeNanoSec"].data<unsigned int>() = timeStampNS;
192  eventTag["BunchId"] .data<unsigned int>() = bunchId;
193 
194  // event weight
195  // used for event weighting in monte carlo or just an event count in data
196  float evweight = 1;
197  if (isSimulation) evweight = eventInfo.event_type()->mc_event_weight();
198  eventTag["EventWeight"].data<float>() = evweight;
199 
200  return StatusCode::SUCCESS;
201 
202 }

◆ eventTag() [2/2]

StatusCode EventInfoAttListTool::eventTag ( AthenaAttributeList eventTagCol,
const xAOD::EventInfo eventInfo 
)
protected

the various components to build their own fragments of tag

build the tag associate to the event information

Event Type

Definition at line 116 of file EventInfoAttListTool.cxx.

118 {
119  // Note: for any attribute added here, please confirm the corresponding EventInfo member being
120  // retained in DAOD smart slimming:
121  // PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/EventInfoContent.py
122 
124  bool isSimulation = eventInfo.eventType(xAOD::EventInfo::IS_SIMULATION);
125  bool isTestBeam = eventInfo.eventType(xAOD::EventInfo::IS_TESTBEAM);
126  bool isCalibration = eventInfo.eventType(xAOD::EventInfo::IS_CALIBRATION);
127  eventTag["IsSimulation"] .data<bool>() = isSimulation;
128  eventTag["IsCalibration"].data<bool>() = isCalibration;
129  eventTag["IsTestBeam"] .data<bool>() = isTestBeam;
130 
131  // run number and Event number
132  unsigned int runNumber = eventInfo.runNumber();
133  unsigned int condRunNumber = runNumber;
134  unsigned long long eventNumber = eventInfo.eventNumber();
135  unsigned int lumiBlock = eventInfo.lumiBlock();
136  unsigned int mcChannel = 0;
137  if (isSimulation) mcChannel = eventInfo.mcChannelNumber();
138  eventTag["McChannel"] .data<unsigned int>() = mcChannel;
139  eventTag["RunNumber"] .data<unsigned int>() = runNumber;
140  eventTag["EventNumber"] .data<unsigned long long>() = eventNumber;
141  eventTag["LumiBlockN"] .data<unsigned int>() = lumiBlock;
142  eventTag["ConditionsRun"].data<unsigned int>() = condRunNumber;
143 
144  unsigned long timeStamp = eventInfo.timeStamp();
145  unsigned long timeStampNS = eventInfo.timeStampNSOffset();
146  unsigned long bunchId = eventInfo.bcid();
147  eventTag["EventTime"] .data<unsigned int>() = timeStamp;
148  eventTag["EventTimeNanoSec"].data<unsigned int>() = timeStampNS;
149  eventTag["BunchId"] .data<unsigned int>() = bunchId;
150 
151  // event weight
152  // used for event weighting in monte carlo or just an event count in data
153  float evweight = 1;
154  if (isSimulation) evweight = eventInfo.mcEventWeight();
155  eventTag["EventWeight"].data<float>() = evweight;
156 
157  return StatusCode::SUCCESS;
158 
159 }

◆ 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 EventInfoAttListTool::finalize ( )
override

finialize - called once at the end

Definition at line 205 of file EventInfoAttListTool.cxx.

205  {
206  ATH_MSG_DEBUG("in finalize()");
207  m_attribListSpec->release();
208  m_attribListSpec = nullptr;
209  return AthAlgTool::finalize();
210 }

◆ getAttributeList() [1/2]

const AthenaAttributeList EventInfoAttListTool::getAttributeList ( const EventInfo einfo)

Definition at line 82 of file EventInfoAttListTool.cxx.

82  {
83 
84  // Create attributeList with appropriate attributes
86 
87  StatusCode sc = this->eventTag (eventTag, eventInfo);
88  if (sc.isFailure()) {
89  ATH_MSG_WARNING("Unable to build Tag Fragments for the Event");
90  }
91 
92  ATH_MSG_DEBUG("EventInfoAttListTool - getAttributeList() return success");
93 
94  return eventTag;
95 }

◆ getAttributeList() [2/2]

const AthenaAttributeList EventInfoAttListTool::getAttributeList ( const xAOD::EventInfo einfo)

Definition at line 65 of file EventInfoAttListTool.cxx.

65  {
66 
67  // Create attributeList with appropriate attributes
69 
70  StatusCode sc = this->eventTag (eventTag, eventInfo);
71  if (sc.isFailure()) {
72  ATH_MSG_WARNING("Unable to build Tag Fragments for the Event");
73  }
74 
75  ATH_MSG_DEBUG("EventInfoAttListTool - getAttributeList() return success");
76 
77  return eventTag;
78 }

◆ getAttributeListPtr()

std::unique_ptr< AthenaAttributeList > EventInfoAttListTool::getAttributeListPtr ( const xAOD::EventInfo einfo)

Definition at line 99 of file EventInfoAttListTool.cxx.

100 {
101  // Create attributeList with appropriate attributes
102  auto eventTag = std::make_unique<AthenaAttributeList> ( *m_attribListSpec );
103 
104  StatusCode sc = this->eventTag (*eventTag, eventInfo);
105  if (sc.isFailure()) {
106  ATH_MSG_WARNING("Unable to build Tag Fragments for the Event");
107  }
108 
109  ATH_MSG_DEBUG("EventInfoAttListTool - getAttributeList() return success");
110 
111  return eventTag;
112 }

◆ getAttributeSpecification()

const coral::AttributeListSpecification& EventInfoAttListTool::getAttributeSpecification ( )

◆ initialize()

StatusCode EventInfoAttListTool::initialize ( )
override

Overriding initialize, finalize and execute.

initialization - called once at the beginning

Definition at line 40 of file EventInfoAttListTool.cxx.

40  {
41  ATH_MSG_DEBUG("in initialize()");
42 
43  m_attribListSpec = new coral::AttributeListSpecification();
44  // Note: for any attribute added here, please confirm the corresponding EventInfo member being
45  // retained in DAOD smart slimming:
46  // PhysicsAnalysis/DerivationFramework/DerivationFrameworkCore/python/EventInfoContent.py
47  m_attribListSpec->extend("IsSimulation", "bool");
48  m_attribListSpec->extend("IsCalibration", "bool");
49  m_attribListSpec->extend("IsTestBeam", "bool");
50  m_attribListSpec->extend("McChannel", "unsigned int");
51  m_attribListSpec->extend("RunNumber", "unsigned int");
52  m_attribListSpec->extend("EventNumber", "unsigned long long");
53  m_attribListSpec->extend("LumiBlockN", "unsigned int");
54  m_attribListSpec->extend("ConditionsRun", "unsigned int");
55  m_attribListSpec->extend("EventTime", "unsigned int");
56  m_attribListSpec->extend("EventTimeNanoSec","unsigned int");
57  m_attribListSpec->extend("BunchId", "unsigned int");
58  m_attribListSpec->extend("EventWeight", "float");
59 
60  return AthAlgTool::initialize();
61 }

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

◆ interfaceID()

static const InterfaceID& EventInfoAttListTool::interfaceID ( )
inlinestatic

AlgTool and IAlgTool interface methods.

Definition at line 38 of file EventInfoAttListTool.h.

38 { return IID_EventInfoAttListTool; };

◆ isValid()

bool EventInfoAttListTool::isValid ( )

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

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

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

coral::AttributeListSpecification* EventInfoAttListTool::m_attribListSpec {}
protected

Definition at line 60 of file EventInfoAttListTool.h.

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


The documentation for this class was generated from the following files:
python.tests.PyTestsLib.finalize
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
Definition: PyTestsLib.py:50
xAOD::EventInfo_v1::eventNumber
uint64_t eventNumber() const
The current event's event number.
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
initialize
void initialize()
Definition: run_EoverP.cxx:894
xAOD::EventInfo_v1::IS_CALIBRATION
@ IS_CALIBRATION
true: calibration, false: physics
Definition: EventInfo_v1.h:155
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
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
xAOD::EventInfo_v1::timeStampNSOffset
uint32_t timeStampNSOffset() const
Nanosecond time offset wrt. the time stamp.
xAOD::EventInfo_v1::IS_SIMULATION
@ IS_SIMULATION
true: simulation, false: data
Definition: EventInfo_v1.h:151
EventType::mc_event_weight
float mc_event_weight(unsigned int iweight=0) const
Access to MC weight.
Definition: EventType.cxx:175
xAOD::EventInfo_v1::runNumber
uint32_t runNumber() const
The current event's run number.
EventType::mc_channel_number
number_type mc_channel_number() const
Access to the MC generator channel number (was used as run number for generator events)
Definition: EventType.cxx:165
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:27
xAOD::EventInfo_v1::mcChannelNumber
uint32_t mcChannelNumber() const
The MC generator's channel number.
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
EventType::IS_CALIBRATION
static const EventTypeCode IS_CALIBRATION
true: IS_CALIBRATION, false: IS_PHYSICS
Definition: EventType.h:157
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
EventInfo::event_ID
EventID * event_ID()
the unique identification of the event.
Definition: EventInfo/EventInfo/EventInfo.h:224
test_pyathena.parent
parent
Definition: test_pyathena.py:15
AthenaAttributeList
An AttributeList represents a logical row of attributes in a metadata table. The name and type of eac...
Definition: PersistentDataModel/PersistentDataModel/AthenaAttributeList.h:45
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
xAOD::eventNumber
eventNumber
Definition: EventInfo_v1.cxx:124
xAOD::EventInfo_v1::lumiBlock
uint32_t lumiBlock() const
The current event's luminosity block number.
EventType::IS_SIMULATION
static const EventTypeCode IS_SIMULATION
true: IS_SIMULATION, false: IS_DATA
Definition: EventType.h:151
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
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
EventInfoAttListTool::eventTag
StatusCode eventTag(AthenaAttributeList &eventTagCol, const xAOD::EventInfo &eventInfo)
the various components to build their own fragments of tag
Definition: EventInfoAttListTool.cxx:116
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
xAOD::timeStamp
setEventNumber timeStamp
Definition: EventInfo_v1.cxx:128
DeMoAtlasDataLoss.runNumber
string runNumber
Definition: DeMoAtlasDataLoss.py:64
EventType::IS_TESTBEAM
static const EventTypeCode IS_TESTBEAM
true: IS_TESTBEAM, false: IS_FROM_ATLAS_DET
Definition: EventType.h:154
a
TList * a
Definition: liststreamerinfos.cxx:10
h
EventType::test
bool test(EventTypeCode type_code) const
Tests for standard characteristics.
Definition: EventType.cxx:62
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
xAOD::EventInfo_v1::timeStamp
uint32_t timeStamp() const
POSIX time in seconds from 1970. January 1st.
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
xAOD::EventInfo_v1::mcEventWeight
float mcEventWeight(size_t i=0) const
The weight of one specific MC event used in the simulation.
Definition: EventInfo_v1.cxx:203
xAOD::EventInfo_v1::bcid
uint32_t bcid() const
The bunch crossing ID of the event.
xAOD::lumiBlock
setTeId lumiBlock
Definition: L2StandAloneMuon_v1.cxx:327
xAOD::EventInfo_v1::IS_TESTBEAM
@ IS_TESTBEAM
true: testbeam, false: full detector
Definition: EventInfo_v1.h:153
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
EventInfoAttListTool::m_attribListSpec
coral::AttributeListSpecification * m_attribListSpec
Definition: EventInfoAttListTool.h:60
EventInfo::event_type
EventType * event_type()
the type of the event, e.g. simulation, testbeam, etc
Definition: EventInfo/EventInfo/EventInfo.h:234
fitman.k
k
Definition: fitman.py:528
xAOD::EventInfo_v1::eventType
bool eventType(EventType type) const
Check for one particular bitmask value.