|
ATLAS Offline Software
|
Go to the documentation of this file.
11 #ifndef XAOD_STANDALONE
13 # include "GaudiKernel/Incident.h"
14 # include "GaudiKernel/IIncidentSvc.h"
15 #endif // not XAOD_STANDALONE
17 #ifdef XAOD_STANDALONE
21 #endif // XAOD_STANDALONE
25 #ifdef XAOD_STANDALONE
28 #endif // XAOD_STANDALONE
32 #ifdef XAOD_STANDALONE
36 m_inputMetaStore(
"StoreGateSvc/InputMetaDataStore",
name ),
37 m_outputMetaStore(
"StoreGateSvc/MetaDataStore",
name ),
39 m_beginInputFileCalled( false ),
43 #ifdef XAOD_STANDALONE
53 if(
event->addListener(
this ).isFailure() ) {
54 ATH_MSG_ERROR(
"Couldn't register the tool for xAOD callbacks" );
56 #else // XAOD_STANDALONE
58 declareInterface< IIncidentListener >(
this );
59 #endif // XAOD_STANDALONE
64 #ifdef XAOD_STANDALONE
72 if(
event->removeListener(
this ).isFailure() ) {
79 if(FSMState() == Gaudi::StateMachine::INITIALIZED) {
81 if( incSvc.retrieve().isSuccess() ) {
82 incSvc->removeListener(
this );
85 #endif // XAOD_STANDALONE
90 #ifdef XAOD_STANDALONE
92 #else // XAOD_STANDALONE
94 #endif // XAOD_STANDALONE
99 #ifdef XAOD_STANDALONE
101 #else // XAOD_STANDALONE
103 #endif // XAOD_STANDALONE
112 #ifndef XAOD_STANDALONE
119 incSvc->addListener(
this, IncidentType::BeginEvent, 0,
false );
124 #endif // not XAOD_STANDALONE
127 return StatusCode::SUCCESS;
136 if( inc.type() == IncidentType::BeginInputFile ) {
140 throw std::runtime_error(
"Couldn't call beginInputFile()" );
142 }
else if( inc.type() == IncidentType::EndInputFile ) {
145 throw std::runtime_error(
"Couldn't call endInputFile()" );
147 }
else if( inc.type() == IncidentType::BeginEvent ) {
155 throw std::runtime_error(
"Couldn't call beginInputFile()" );
160 throw std::runtime_error(
"Couldn't call beginEvent()" );
163 #ifdef XAOD_STANDALONE
164 }
else if( inc.type() == IncidentType::MetaDataStop ) {
167 throw std::runtime_error(
"Couldn't call metaDataStop()" );
170 #endif // XAOD_STANDALONE
172 ATH_MSG_WARNING(
"Unknown incident type received in AsgMetaDataTool: " << inc.type() );
183 return StatusCode::SUCCESS;
191 return StatusCode::SUCCESS;
199 return StatusCode::SUCCESS;
207 return StatusCode::SUCCESS;
Base interface for getting objects out of the input file.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
#define ATH_MSG_VERBOSE(x)
static TVirtualEvent * event()
Access the currently active TVirtualEvent object.
POOL::TEvent event(POOL::TEvent::kClassAccess)
::StatusCode StatusCode
StatusCode definition for legacy code.
#define ATH_MSG_WARNING(x)
Tool for accessing xAOD files outside of Athena.