 |
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() ) {
83 incSvc->removeListener(
this );
85 catch (
const GaudiException&) {
90 #endif // XAOD_STANDALONE
95 #ifdef XAOD_STANDALONE
97 #else // XAOD_STANDALONE
99 #endif // XAOD_STANDALONE
104 #ifdef XAOD_STANDALONE
106 #else // XAOD_STANDALONE
108 #endif // XAOD_STANDALONE
117 #ifndef XAOD_STANDALONE
124 incSvc->addListener(
this, IncidentType::BeginEvent, 0,
false );
129 #endif // not XAOD_STANDALONE
132 return StatusCode::SUCCESS;
141 if( inc.type() == IncidentType::BeginInputFile ) {
145 throw std::runtime_error(
"Couldn't call beginInputFile()" );
147 }
else if( inc.type() == IncidentType::EndInputFile ) {
150 throw std::runtime_error(
"Couldn't call endInputFile()" );
152 }
else if( inc.type() == IncidentType::BeginEvent ) {
160 throw std::runtime_error(
"Couldn't call beginInputFile()" );
165 throw std::runtime_error(
"Couldn't call beginEvent()" );
168 #ifdef XAOD_STANDALONE
169 }
else if( inc.type() == IncidentType::MetaDataStop ) {
172 throw std::runtime_error(
"Couldn't call metaDataStop()" );
175 #endif // XAOD_STANDALONE
177 ATH_MSG_WARNING(
"Unknown incident type received in AsgMetaDataTool: " << inc.type() );
188 return StatusCode::SUCCESS;
196 return StatusCode::SUCCESS;
204 return StatusCode::SUCCESS;
212 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.