ATLAS Offline Software
xAODTestAlg.cxx
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration.
3  */
4 
5 // $Id$
14 #include "xAODTestAlg.h"
15 
16 
17 namespace DMTest {
18 
19 
25 xAODTestAlg::xAODTestAlg (const std::string &name, ISvcLocator *pSvcLocator)
26  : AthReentrantAlgorithm (name, pSvcLocator),
27  m_tools (this)
28 {
29  declareProperty ("Tools", m_tools);
30 }
31 
32 
37 {
38  ATH_CHECK( m_tools.retrieve() );
39  return StatusCode::SUCCESS;
40 }
41 
42 
43 
47 StatusCode xAODTestAlg::execute (const EventContext& ctx) const
48 {
49  for (const auto& t : m_tools)
50  ATH_CHECK( t->doit (ctx) );
51  return StatusCode::SUCCESS;
52 }
53 
54 
55 } // namespace DMTest
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
DMTest::xAODTestAlg::initialize
virtual StatusCode initialize() override
Algorithm initialization; called at the beginning of the job.
Definition: xAODTestAlg.cxx:36
DMTest::xAODTestAlg::xAODTestAlg
xAODTestAlg(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Definition: xAODTestAlg.cxx:25
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
xAODTestAlg.h
Algorithm used to test SG access from tools.
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
DMTest::xAODTestAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override
Algorithm event processing.
Definition: xAODTestAlg.cxx:47
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
DMTest::xAODTestAlg::m_tools
ToolHandleArray< ITestTool > m_tools
Definition: xAODTestAlg.h:52
DMTest
Definition: B.h:23