ATLAS Offline Software
Loading...
Searching...
No Matches
xAODMaker::TruthMetaDataTool Class Reference

Tool taking care of copying the truth metadata from file to file. More...

#include <TruthMetaDataTool.h>

Inheritance diagram for xAODMaker::TruthMetaDataTool:
Collaboration diagram for xAODMaker::TruthMetaDataTool:

Public Types

Definition of the StoreGate-like object's definition
typedef ServiceHandle< StoreGateSvcMetaStore_t
 Type of the metadata store object in Athena.
typedef const ServiceHandle< StoreGateSvc > & MetaStorePtr_t
 Type of the metadata store pointer in standalone mode.

Public Member Functions

 TruthMetaDataTool (const std::string &name="TruthMetaDataTool")
 Declare the correct constructor for Athena.
virtual StatusCode initialize ()
 Function initialising the tool.
virtual StatusCode sysInitialize ()
 Function initialising the tool in the correct way in Athena.
virtual void print () const
 Print the state of the tool.
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const
 DeclareInterfaceID (IMetaDataTool, 1, 0)
Functions providing access to the input/output metadata
MetaStorePtr_t inputMetaStore () const
 Accessor for the input metadata store.
MetaStorePtr_t outputMetaStore () const
 Accessor for the output metadata store.
Additional helper functions, not directly mimicking Athena
template<class T>
const T * getProperty (const std::string &name) const
 Get one of the tool's properties.
const std::string & msg_level_name () const __attribute__((deprecated))
 A deprecated function for getting the message level's name.
const std::string & getName (const void *ptr) const
 Get the name of an object that is / should be in the event store.
SG::sgkey_t getKey (const void *ptr) const
 Get the (hashed) key of an object that is in the event store.

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
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.
Functions called by the AsgMetadataTool base class
virtual StatusCode beginInputFile ()
 Function collecting the configuration metadata from the input file.
virtual StatusCode endInputFile ()
 Function called when the currently open input file got completely processed.
virtual StatusCode metaDataStop ()
 Function writing out the collected metadata.
virtual StatusCode beginInputFile (const SG::SourceID &)
 Function collecting the metadata from a new input file.
virtual StatusCode endInputFile (const SG::SourceID &)
 Function collecting the metadata from a new input file.
virtual StatusCode metaDataStop (const SG::SourceID &)
 Function writing the collected metadata to the output.
Callback functions helping in metadata reading/writing
void setUseIncidents (const bool flag)
virtual void handle (const Incident &inc)
 Function receiving incidents from IncidentSvc/TEvent.
virtual StatusCode beginEvent ()
 Function called when a new events is loaded.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

MetaStore_t m_inputMetaStore
 Object accessing the input metadata store.
MetaStore_t m_outputMetaStore
 Object accessing the output metadata store.
bool m_beginInputFileCalled
 Flag helping to discover when the tool misses the opening of the first input file.
bool m_useIncidents
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared
Tool properties
std::string m_inputKey
 The key of the truth metadata in the input file.
std::string m_outputKey
 The key of the truth metadata for the output file.
Objects accumulating the merged metadata
std::unique_ptr< xAOD::TruthMetaDataContainerm_truthMeta
 The merged trigger menu container.
std::unique_ptr< xAOD::TruthMetaDataAuxContainerm_truthMetaAux
 The merged trigger menu auxiliary container.

Detailed Description

Tool taking care of copying the truth metadata from file to file.

This tool does the heavy lifting when creating/merging DxAOD files to make sure that the truth metadata ends up in the output.

Definition at line 34 of file TruthMetaDataTool.h.

Member Typedef Documentation

◆ MetaStore_t

Type of the metadata store object in Athena.

Definition at line 66 of file AsgMetadataTool.h.

◆ MetaStorePtr_t

Type of the metadata store pointer in standalone mode.

Definition at line 68 of file AsgMetadataTool.h.

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ TruthMetaDataTool()

xAODMaker::TruthMetaDataTool::TruthMetaDataTool ( const std::string & name = "TruthMetaDataTool")

Declare the correct constructor for Athena.

Regular AlgTool constructor

Definition at line 19 of file TruthMetaDataTool.cxx.

20 : asg::AsgMetadataTool( name ),
22
23 declareProperty( "InputKey", m_inputKey = "TruthMetaData" );
24 declareProperty( "OutputKey", m_outputKey = "TruthMetaData" );
25
26#ifndef XAOD_STANDALONE
27 declareInterface< ::IMetaDataTool >( this );
28#endif // XAOD_STANDALONE
29 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
std::unique_ptr< xAOD::TruthMetaDataAuxContainer > m_truthMetaAux
The merged trigger menu auxiliary container.
std::unique_ptr< xAOD::TruthMetaDataContainer > m_truthMeta
The merged trigger menu container.
std::string m_outputKey
The key of the truth metadata for the output file.
std::string m_inputKey
The key of the truth metadata in the input file.

Member Function Documentation

◆ beginEvent()

StatusCode asg::AsgMetadataTool::beginEvent ( )
protectedvirtualinherited

◆ beginInputFile() [1/2]

StatusCode xAODMaker::TruthMetaDataTool::beginInputFile ( )
protectedvirtual

Function collecting the configuration metadata from the input file.

Reimplemented from asg::AsgMetadataTool.

Definition at line 45 of file TruthMetaDataTool.cxx.

45 {
46
47 // If the input file doesn't have any trigger configuration metadata,
48 // then finish right away:
50 return StatusCode::SUCCESS;
51 }
52
53 // Retrieve the input container:
54 const Cont_t* input = nullptr;
56
57 // Create an output container if it doesn't exist yet:
58 if( ( ! m_truthMeta ) && ( ! m_truthMetaAux ) ) {
59 ATH_MSG_DEBUG( "Creating output container" );
60 m_truthMeta = std::make_unique<xAOD::TruthMetaDataContainer>( );
61 m_truthMetaAux = std::make_unique<xAOD::TruthMetaDataAuxContainer>( );
62 m_truthMeta->setStore( m_truthMetaAux.get() );
63 }
64
65 // Loop over the configurations of the input file:
66 for( const xAOD::TruthMetaData* meta : *input ) {
67
68 // Check if this configuration is already in the output container:
69 bool exists = false;
70 for( const xAOD::TruthMetaData* existing : *m_truthMeta ) {
71 if( existing->mcChannelNumber() == meta->mcChannelNumber() ){
72 static const SG::ConstAccessor<std::string> generatorsAcc ("generators");
73 if (!generatorsAcc.isAvailable (*existing) ||
74 !generatorsAcc.isAvailable (*meta) ||
75 existing->generators() == meta->generators() ) {
76 exists = true;
77 break;
78 }
79 }
80 }
81 if( exists ) {
82 continue;
83 }
84
85 // If it's a new configuration, put it into the output container:
86 ATH_MSG_VERBOSE( "Copying configuration with ChannelID: "
87 << meta->mcChannelNumber() );
89 m_truthMeta->push_back( out );
90 *out = *meta;
91 }
92
93 // Return gracefully:
94 return StatusCode::SUCCESS;
95 }
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_DEBUG(x)
MetaStorePtr_t inputMetaStore() const
Accessor for the input metadata store.
bool exists(const std::string &filename)
does a file exist
bool contains(const std::string &s, const std::string &regx)
does a string contain the substring
Definition hcg.cxx:114
retrieve(aClass, aKey=None)
Definition PyKernel.py:110
xAOD::TruthMetaDataContainer Cont_t
TruthMetaData_v1 TruthMetaData
Typedef to implementation.

◆ beginInputFile() [2/2]

virtual StatusCode xAODMaker::TruthMetaDataTool::beginInputFile ( const SG::SourceID & )
inlineprotectedvirtual

Function collecting the metadata from a new input file.

Implements IMetaDataTool.

Definition at line 64 of file TruthMetaDataTool.h.

64{return beginInputFile();}
virtual StatusCode beginInputFile()
Function collecting the configuration metadata from the input file.

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }

◆ DeclareInterfaceID()

IMetaDataTool::DeclareInterfaceID ( IMetaDataTool ,
1 ,
0  )
inherited

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

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

◆ endInputFile() [1/2]

StatusCode xAODMaker::TruthMetaDataTool::endInputFile ( )
protectedvirtual

Function called when the currently open input file got completely processed.

Dummy implementation that can be overridden by the derived tool.

Reimplemented from asg::AsgMetadataTool.

Definition at line 97 of file TruthMetaDataTool.cxx.

97 {
98 return StatusCode::SUCCESS;
99 }

◆ endInputFile() [2/2]

virtual StatusCode xAODMaker::TruthMetaDataTool::endInputFile ( const SG::SourceID & )
inlineprotectedvirtual

Function collecting the metadata from a new input file.

Implements IMetaDataTool.

Definition at line 67 of file TruthMetaDataTool.h.

67{return endInputFile();}
virtual StatusCode endInputFile()
Function called when the currently open input file got completely processed.

◆ evtStore()

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.

◆ 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

◆ getKey()

SG::sgkey_t asg::AsgTool::getKey ( const void * ptr) const
inherited

Get the (hashed) key of an object that is in the event store.

This is a bit of a special one. StoreGateSvc and xAOD::TEvent both provide ways for getting the SG::sgkey_t key for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.

In order to allow tools to efficiently perform this operation, they can use this helper function.

See also
asg::AsgTool::getName
Parameters
ptrThe bare pointer to the object that the event store should know about
Returns
The hashed key of the object in the store. If not found, an invalid (zero) key.

Definition at line 119 of file AsgTool.cxx.

119 {
120
121#ifdef XAOD_STANDALONE
122 // In case we use @c xAOD::TEvent, we have a direct function call
123 // for this.
124 return evtStore()->event()->getKey( ptr );
125#else
126 const SG::DataProxy* proxy = evtStore()->proxy( ptr );
127 return ( proxy == nullptr ? 0 : proxy->sgkey() );
128#endif // XAOD_STANDALONE
129 }
ServiceHandle< StoreGateSvc > & evtStore()

◆ getName()

const std::string & asg::AsgTool::getName ( const void * ptr) const
inherited

Get the name of an object that is / should be in the event store.

This is a bit of a special one. StoreGateSvc and xAOD::TEvent both provide ways for getting the std::string name for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.

In order to allow tools to efficiently perform this operation, they can use this helper function.

See also
asg::AsgTool::getKey
Parameters
ptrThe bare pointer to the object that the event store should know about
Returns
The string name of the object in the store. If not found, an empty string.

Definition at line 106 of file AsgTool.cxx.

106 {
107
108#ifdef XAOD_STANDALONE
109 // In case we use @c xAOD::TEvent, we have a direct function call
110 // for this.
111 return evtStore()->event()->getName( ptr );
112#else
113 const SG::DataProxy* proxy = evtStore()->proxy( ptr );
114 static const std::string dummy = "";
115 return ( proxy == nullptr ? dummy : proxy->name() );
116#endif // XAOD_STANDALONE
117 }

◆ getProperty()

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

Get one of the tool's properties.

◆ handle()

void asg::AsgMetadataTool::handle ( const Incident & inc)
protectedvirtualinherited

Function receiving incidents from IncidentSvc/TEvent.

Reimplemented in Trig::TrigDecisionTool.

Definition at line 135 of file AsgMetadataTool.cxx.

135 {
136
137 // Tell the user what's happening:
138 ATH_MSG_VERBOSE( "Callback received with incident: " << inc.type() );
139
140 // Call the appropriate member function:
141 if( inc.type() == IncidentType::BeginInputFile ) {
143 if( beginInputFile().isFailure() ) {
144 ATH_MSG_FATAL( "Failed to call beginInputFile()" );
145 throw std::runtime_error( "Couldn't call beginInputFile()" );
146 }
147 } else if( inc.type() == IncidentType::EndInputFile ) {
148 if( endInputFile().isFailure() ) {
149 ATH_MSG_FATAL( "Failed to call endInputFile()" );
150 throw std::runtime_error( "Couldn't call endInputFile()" );
151 }
152 } else if( inc.type() == IncidentType::BeginEvent ) {
153 // If the tool didn't catch the begin input file incident for the
154 // first input file of the job, then call the appropriate function
155 // now.
156 if( ! m_beginInputFileCalled ) {
158 if( beginInputFile().isFailure() ) {
159 ATH_MSG_FATAL( "Failed to call beginInputFile()" );
160 throw std::runtime_error( "Couldn't call beginInputFile()" );
161 }
162 }
163 if( beginEvent().isFailure() ) {
164 ATH_MSG_FATAL( "Failed to call beginEvent()" );
165 throw std::runtime_error( "Couldn't call beginEvent()" );
166 }
167
168 #ifdef XAOD_STANDALONE
169 } else if( inc.type() == IncidentType::MetaDataStop ) {
170 if( metaDataStop().isFailure() ) {
171 ATH_MSG_FATAL( "Failed to call metaDataStop()" );
172 throw std::runtime_error( "Couldn't call metaDataStop()" );
173 }
174
175 #endif // XAOD_STANDALONE
176 } else {
177 ATH_MSG_WARNING( "Unknown incident type received in AsgMetaDataTool: " << inc.type() );
178 }
179
180 return;
181 }
#define ATH_MSG_FATAL(x)
#define ATH_MSG_WARNING(x)
virtual StatusCode beginInputFile()
Function called when a new input file is opened.
virtual StatusCode beginEvent()
Function called when a new events is loaded.
bool m_beginInputFileCalled
Flag helping to discover when the tool misses the opening of the first input file.
virtual StatusCode endInputFile()
Function called when the currently open input file got completely processed.
virtual StatusCode metaDataStop()
Function called when the tool should write out its metadata.

◆ initialize()

StatusCode xAODMaker::TruthMetaDataTool::initialize ( void )
virtual

Function initialising the tool.

Reimplemented from asg::AsgTool.

Definition at line 31 of file TruthMetaDataTool.cxx.

31 {
32
33 // Greet the user:
34 ATH_MSG_DEBUG( "Initialising TruthMetaDataTool" );
35 ATH_MSG_DEBUG( " InputKey = " << m_inputKey );
36 ATH_MSG_DEBUG( " OutputKey = " << m_outputKey );
37
38 // Reset the internal variable(s):
39 m_truthMeta.reset(); m_truthMetaAux.reset();
40
41 // Retrun gracefully:
42 return StatusCode::SUCCESS;
43 }

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

◆ inputMetaStore()

AsgMetadataTool::MetaStorePtr_t asg::AsgMetadataTool::inputMetaStore ( ) const
inherited

Accessor for the input metadata store.

Definition at line 93 of file AsgMetadataTool.cxx.

93 {
94
95#ifdef XAOD_STANDALONE
96 return &m_inputMetaStore;
97#else // XAOD_STANDALONE
98 return m_inputMetaStore;
99#endif // XAOD_STANDALONE
100 }
MetaStore_t m_inputMetaStore
Object accessing the input metadata store.

◆ metaDataStop() [1/2]

StatusCode xAODMaker::TruthMetaDataTool::metaDataStop ( )
protectedvirtual

Function writing out the collected metadata.

Reimplemented from asg::AsgMetadataTool.

Definition at line 101 of file TruthMetaDataTool.cxx.

101 {
102
103 // The output may already have trigger configuration metadata in it.
104 // For instance from TrigConf::xAODMenuWriter. In this case let that
105 // object take precedence.
107 ATH_MSG_DEBUG( "xAOD::TruthMetaDataContainer already in the output" );
108 return StatusCode::SUCCESS;
109 }
110
111 // Record the truth metadata, if any was found in the processed input files.
112 if( m_truthMeta.get() && m_truthMetaAux.get() ) {
113 ATH_MSG_DEBUG( "Recording truth metadata" );
114 ATH_CHECK( outputMetaStore()->record( m_truthMeta.release(),
115 m_outputKey ) );
116 ATH_CHECK( outputMetaStore()->record( m_truthMetaAux.release(),
117 m_outputKey + "Aux." ) );
118 }
119
120 // Return gracefully:
121 return StatusCode::SUCCESS;
122 }
MetaStorePtr_t outputMetaStore() const
Accessor for the output metadata store.

◆ metaDataStop() [2/2]

virtual StatusCode xAODMaker::TruthMetaDataTool::metaDataStop ( const SG::SourceID & )
inlineprotectedvirtual

Function writing the collected metadata to the output.

Definition at line 70 of file TruthMetaDataTool.h.

70{return metaDataStop();}
virtual StatusCode metaDataStop()
Function writing out the collected metadata.

◆ msg()

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg_level_name()

const std::string & asg::AsgTool::msg_level_name ( ) const
inherited

A deprecated function for getting the message level's name.

Instead of using this, weirdly named function, user code should get the string name of the current minimum message level (in case they really need it...), with:

MSG::name( msg().level() )

This function's name doesn't follow the ATLAS coding rules, and as such will be removed in the not too distant future.

Returns
The string name of the current minimum message level that's printed

Definition at line 101 of file AsgTool.cxx.

101 {
102
103 return MSG::name( msg().level() );
104 }
MsgStream & msg() const
const std::string & name(Level lvl)
Convenience function for translating message levels to strings.
Definition MsgLevel.cxx:19

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

◆ outputMetaStore()

AsgMetadataTool::MetaStorePtr_t asg::AsgMetadataTool::outputMetaStore ( ) const
inherited

Accessor for the output metadata store.

Definition at line 102 of file AsgMetadataTool.cxx.

102 {
103
104#ifdef XAOD_STANDALONE
105 return &m_outputMetaStore;
106#else // XAOD_STANDALONE
107 return m_outputMetaStore;
108#endif // XAOD_STANDALONE
109 }
MetaStore_t m_outputMetaStore
Object accessing the output metadata store.

◆ print()

◆ 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();
384 }
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)

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

◆ setUseIncidents()

void asg::AsgMetadataTool::setUseIncidents ( const bool flag)
inlineprotectedinherited

Definition at line 132 of file AsgMetadataTool.h.

133 {
135 }
bool flag
Definition master.py:29

◆ sysInitialize()

StatusCode asg::AsgMetadataTool::sysInitialize ( )
virtualinherited

Function initialising the tool in the correct way in Athena.

This function is used to set up the callbacks from IncidentSvc in Athena at the right time during initialisation, without the user having to do anything special in his/her code.

Reimplemented from AthCommonDataStore< AthCommonMsg< AlgTool > >.

Definition at line 115 of file AsgMetadataTool.cxx.

115 {
116
117#ifndef XAOD_STANDALONE
118 if (m_useIncidents) {
119 // Connect to the IncidentSvc:
120 ServiceHandle< IIncidentSvc > incSvc( "IncidentSvc", name() );
121 ATH_CHECK( incSvc.retrieve() );
122
123 // Set up the right callbacks: don't rethrow exceptions, any failure and we should end
124 incSvc->addListener( this, IncidentType::BeginEvent, 0, false );
125 }
126 // Let the base class do its thing:
127 ATH_CHECK( AlgTool::sysInitialize() );
128
129#endif // not XAOD_STANDALONE
130
131 // Return gracefully:
132 return StatusCode::SUCCESS;
133 }

◆ 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) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka

Member Data Documentation

◆ m_beginInputFileCalled

bool asg::AsgMetadataTool::m_beginInputFileCalled
privateinherited

Flag helping to discover when the tool misses the opening of the first input file.

Definition at line 126 of file AsgMetadataTool.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_inputKey

std::string xAODMaker::TruthMetaDataTool::m_inputKey
private

The key of the truth metadata in the input file.

Definition at line 79 of file TruthMetaDataTool.h.

◆ m_inputMetaStore

MetaStore_t asg::AsgMetadataTool::m_inputMetaStore
privateinherited

Object accessing the input metadata store.

Definition at line 119 of file AsgMetadataTool.h.

◆ m_outputKey

std::string xAODMaker::TruthMetaDataTool::m_outputKey
private

The key of the truth metadata for the output file.

Definition at line 81 of file TruthMetaDataTool.h.

◆ m_outputMetaStore

MetaStore_t asg::AsgMetadataTool::m_outputMetaStore
privateinherited

Object accessing the output metadata store.

Definition at line 121 of file AsgMetadataTool.h.

◆ m_truthMeta

std::unique_ptr< xAOD::TruthMetaDataContainer > xAODMaker::TruthMetaDataTool::m_truthMeta
private

The merged trigger menu container.

Definition at line 89 of file TruthMetaDataTool.h.

◆ m_truthMetaAux

std::unique_ptr< xAOD::TruthMetaDataAuxContainer > xAODMaker::TruthMetaDataTool::m_truthMetaAux
private

The merged trigger menu auxiliary container.

Definition at line 91 of file TruthMetaDataTool.h.

◆ m_useIncidents

bool asg::AsgMetadataTool::m_useIncidents
privateinherited

Definition at line 128 of file AsgMetadataTool.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: