ATLAS Offline Software
Loading...
Searching...
No Matches
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
9G4TestAlg::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
17{
18 ATH_MSG_INFO ( "Initializing" );
19 //initialize the digi test tools
20 CHECK(m_testTools.retrieve());
21 return StatusCode::SUCCESS;
22}
23
24
25StatusCode 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
#define ATH_MSG_INFO(x)
Helpers for checking error return status codes and reporting errors.
#define CHECK(...)
Evaluate an expression and check for errors.
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
ToolHandleArray< ISimTestTool > m_testTools
Definition G4TestAlg.h:23
G4TestAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition G4TestAlg.cxx:9
StatusCode initialize()
Definition G4TestAlg.cxx:16
StatusCode execute()
Definition G4TestAlg.cxx:25