ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Simulation
G4Atlas
G4AtlasTests
src
G4TestAlg.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
G4AtlasTests/G4TestAlg.h
"
6
#include "
G4AtlasTests/ISimTestTool.h
"
7
#include "
AthenaBaseComps/AthMsgStreamMacros.h
"
8
#include "
AthenaKernel/errorcheck.h
"
9
G4TestAlg::G4TestAlg
(
const
std::string& name, ISvcLocator* pSvcLocator)
10
:
AthAlgorithm
(name, pSvcLocator),
m_testTools
(this)
11
{
12
declareProperty
(
"SimTestTools"
,
m_testTools
,
"ISimTestTools to be run for each event"
);
13
}
14
15
16
StatusCode
G4TestAlg::initialize
()
17
{
18
ATH_MSG_INFO
(
"Initializing"
);
19
//initialize the digi test tools
20
CHECK
(
m_testTools
.retrieve());
21
return
StatusCode::SUCCESS;
22
}
23
24
25
StatusCode
G4TestAlg::execute
(
const
EventContext&
/*ctx*/
)
26
{
27
ToolHandleArray<ISimTestTool>::iterator simTestTool(
m_testTools
.begin());
28
const
ToolHandleArray<ISimTestTool>::iterator endOfSimTestTools(
m_testTools
.end());
29
while
(simTestTool != endOfSimTestTools && ((**(simTestTool++)).processEvent()).isSuccess()) ;
30
return
StatusCode::SUCCESS;
31
}
32
AthMsgStreamMacros.h
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition
AthMsgStreamMacros.h:31
errorcheck.h
Helpers for checking error return status codes and reporting errors.
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition
Control/AthenaKernel/AthenaKernel/errorcheck.h:422
G4TestAlg.h
ISimTestTool.h
AthAlgorithm::AthAlgorithm
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Definition
AthAlgorithm.cxx:10
AthCommonAlgorithm< Gaudi::Algorithm >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Definition
AthCommonDataStore.h:145
G4TestAlg::m_testTools
ToolHandleArray< ISimTestTool > m_testTools
Definition
G4TestAlg.h:23
G4TestAlg::G4TestAlg
G4TestAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition
G4TestAlg.cxx:9
G4TestAlg::initialize
StatusCode initialize()
Definition
G4TestAlg.cxx:16
G4TestAlg::execute
StatusCode execute(const EventContext &ctx)
Execute method.
Definition
G4TestAlg.cxx:25
Generated on
for ATLAS Offline Software by
1.17.0