ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
AthToolSupport
AsgTools
AsgTools
AsgMetadataTool.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef ASGTOOLS_ASGMETADATATOOL_H
6
#define ASGTOOLS_ASGMETADATATOOL_H
7
8
// Local include(s):
9
#include "
AsgTools/AsgTool.h
"
10
#ifdef XAOD_STANDALONE
11
# include "
AsgTools/SgEventMeta.h
"
12
# include "
xAODRootAccess/TVirtualIncidentListener.h
"
13
#else
// XAOD_STANDALONE
14
# include "GaudiKernel/IIncidentListener.h"
15
#endif
// XAOD_STANDALONE
16
17
// Forward declaration(s):
18
class
Incident;
19
20
namespace
asg
{
21
22
#ifdef XAOD_STANDALONE
24
typedef
xAOD::TVirtualIncidentListener IIncidentListener;
26
typedef
xAOD::TIncident Incident;
27
#endif
// XAOD_STANDALONE
28
47
class
AsgMetadataTool
:
public
AsgTool
,
48
public
virtual
IIncidentListener {
49
50
public
:
52
AsgMetadataTool
(
const
std::string& name );
54
~AsgMetadataTool
();
55
58
59
#ifdef XAOD_STANDALONE
61
typedef
SgEventMeta
MetaStore_t
;
63
typedef
SgEventMeta
*
MetaStorePtr_t
;
64
#else
// XAOD_STANDALONE
66
typedef ServiceHandle< StoreGateSvc > MetaStore_t;
68
typedef
const
ServiceHandle< StoreGateSvc >
&
MetaStorePtr_t
;
69
#endif
// XAOD_STANDALONE
70
72
75
77
MetaStorePtr_t
inputMetaStore
()
const
;
79
MetaStorePtr_t
outputMetaStore
()
const
;
80
82
84
virtual
StatusCode
sysInitialize
();
85
86
87
protected
:
90
91
void
setUseIncidents
(
const
bool
flag);
92
94
virtual
void
handle
(
const
Incident& inc );
95
97
virtual
StatusCode
beginInputFile
();
98
101
virtual
StatusCode
endInputFile
();
102
104
virtual
StatusCode
beginEvent
();
105
107
virtual
StatusCode
metaDataStop
();
108
110
111
private
:
112
#ifdef XAOD_STANDALONE
114
mutable
MetaStore_t
m_inputMetaStore
;
116
mutable
MetaStore_t
m_outputMetaStore
;
117
#else
119
MetaStore_t
m_inputMetaStore
;
121
MetaStore_t
m_outputMetaStore
;
122
#endif
123
126
bool
m_beginInputFileCalled
;
127
128
bool
m_useIncidents
;
129
130
};
// class AsgMetadataTool
131
132
inline
void
AsgMetadataTool::setUseIncidents
(
const
bool
flag)
133
{
134
m_useIncidents
= flag;
135
}
136
137
}
// namespace asg
138
139
#endif
// ASGTOOLS_ASGMETADATATOOL_H
AsgTool.h
SgEventMeta.h
TVirtualIncidentListener.h
ServiceHandle< StoreGateSvc >
asg::AsgMetadataTool::outputMetaStore
MetaStorePtr_t outputMetaStore() const
Accessor for the output metadata store.
Definition
AsgMetadataTool.cxx:102
asg::AsgMetadataTool::beginInputFile
virtual StatusCode beginInputFile()
Function called when a new input file is opened.
Definition
AsgMetadataTool.cxx:185
asg::AsgMetadataTool::beginEvent
virtual StatusCode beginEvent()
Function called when a new events is loaded.
Definition
AsgMetadataTool.cxx:201
asg::AsgMetadataTool::m_useIncidents
bool m_useIncidents
Definition
AsgMetadataTool.h:128
asg::AsgMetadataTool::m_beginInputFileCalled
bool m_beginInputFileCalled
Flag helping to discover when the tool misses the opening of the first input file.
Definition
AsgMetadataTool.h:126
asg::AsgMetadataTool::m_outputMetaStore
MetaStore_t m_outputMetaStore
Object accessing the output metadata store.
Definition
AsgMetadataTool.h:121
asg::AsgMetadataTool::handle
virtual void handle(const Incident &inc)
Function receiving incidents from IncidentSvc/Event.
Definition
AsgMetadataTool.cxx:135
asg::AsgMetadataTool::MetaStorePtr_t
const ServiceHandle< StoreGateSvc > & MetaStorePtr_t
Type of the metadata store pointer in standalone mode.
Definition
AsgMetadataTool.h:68
asg::AsgMetadataTool::AsgMetadataTool
AsgMetadataTool(const std::string &name)
Normal ASG tool constructor with a name.
Definition
AsgMetadataTool.cxx:30
asg::AsgMetadataTool::~AsgMetadataTool
~AsgMetadataTool()
Destructor.
Definition
AsgMetadataTool.cxx:62
asg::AsgMetadataTool::m_inputMetaStore
MetaStore_t m_inputMetaStore
Object accessing the input metadata store.
Definition
AsgMetadataTool.h:119
asg::AsgMetadataTool::setUseIncidents
void setUseIncidents(const bool flag)
Definition
AsgMetadataTool.h:132
asg::AsgMetadataTool::MetaStore_t
ServiceHandle< StoreGateSvc > MetaStore_t
Type of the metadata store object in Athena.
Definition
AsgMetadataTool.h:66
asg::AsgMetadataTool::endInputFile
virtual StatusCode endInputFile()
Function called when the currently open input file got completely processed.
Definition
AsgMetadataTool.cxx:193
asg::AsgMetadataTool::metaDataStop
virtual StatusCode metaDataStop()
Function called when the tool should write out its metadata.
Definition
AsgMetadataTool.cxx:209
asg::AsgMetadataTool::sysInitialize
virtual StatusCode sysInitialize()
Function initialising the tool in the correct way in Athena.
Definition
AsgMetadataTool.cxx:115
asg::AsgMetadataTool::inputMetaStore
MetaStorePtr_t inputMetaStore() const
Accessor for the input metadata store.
Definition
AsgMetadataTool.cxx:93
asg::AsgTool::AsgTool
AsgTool(const std::string &name)
Constructor specifying the tool instance's name.
Definition
AsgTool.cxx:58
asg::SgEventMeta
Wrapper class providing StoreGate-like access to metadata in ROOT.
Definition
SgEventMeta.h:45
asg
Definition
DataHandleTestTool.h:28
Generated on
for ATLAS Offline Software by
1.17.0