ATLAS Offline Software
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
()
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
xAOD::iterator
JetConstituentVector::iterator iterator
Definition:
JetConstituentVector.cxx:68
G4TestAlg::G4TestAlg
G4TestAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition:
G4TestAlg.cxx:9
G4TestAlg::execute
StatusCode execute()
Definition:
G4TestAlg.cxx:25
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition:
AthMsgStreamMacros.h:31
AthMsgStreamMacros.h
AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition:
AthCommonDataStore.h:145
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition:
PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition:
Control/AthenaKernel/AthenaKernel/errorcheck.h:422
AthAlgorithm
Definition:
AthAlgorithm.h:47
name
std::string name
Definition:
Control/AthContainers/Root/debug.cxx:195
errorcheck.h
Helpers for checking error return status codes and reporting errors.
G4TestAlg::initialize
StatusCode initialize()
Definition:
G4TestAlg.cxx:16
G4TestAlg::m_testTools
ToolHandleArray< ISimTestTool > m_testTools
Definition:
G4TestAlg.h:23
ISimTestTool.h
G4TestAlg.h
Generated on Fri Jul 5 2024 21:16:13 for ATLAS Offline Software by
1.8.18