ATLAS Offline Software
Loading...
Searching...
No Matches
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$
12
13
14#include "xAODTestAlg.h"
15
16
17namespace DMTest {
18
19
25xAODTestAlg::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
47StatusCode 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
#define ATH_CHECK
Evaluate an expression and check for errors.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
An algorithm that can be simultaneously executed in multiple threads.
virtual StatusCode initialize() override
Algorithm initialization; called at the beginning of the job.
xAODTestAlg(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
virtual StatusCode execute(const EventContext &ctx) const override
Algorithm event processing.
ToolHandleArray< ITestTool > m_tools
Definition xAODTestAlg.h:52
Definition B.h:23
Algorithm used to test SG access from tools.