ATLAS Offline Software
Loading...
Searching...
No Matches
METRecoAlg.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4
5// METRecoAlg.cxx
6
7#include "METRecoAlg.h"
9
10using std::string;
11
12namespace met {
13
14 //**********************************************************************
15
16 METRecoAlg::METRecoAlg(const std::string& name,
17 ISvcLocator* pSvcLocator )
18 : ::AthReentrantAlgorithm( name, pSvcLocator ),
19 m_recotools (this)
20 {
21 declareProperty( "RecoTools", m_recotools);
22 }
23
24 //**********************************************************************
25
26 METRecoAlg::~METRecoAlg() = default;
27
28 //**********************************************************************
29
31 ATH_MSG_VERBOSE("Initializing " << name() << "...");
32
33 ATH_CHECK( m_recotools.retrieve() );
34
35 return StatusCode::SUCCESS;
36 }
37
38 //**********************************************************************
39
40 StatusCode METRecoAlg::finalize() {
41 ATH_MSG_VERBOSE ("Finalizing " << name() << "...");
42 return StatusCode::SUCCESS;
43 }
44
45 //**********************************************************************
46
47 StatusCode METRecoAlg::execute(const EventContext& /*ctx*/) const{
48 ATH_MSG_VERBOSE("Executing " << name() << "...");
49 // Loop over tools.
50
51 // Run the top-level MET tools in sequence
52 for(auto tool : m_recotools) {
53 ATH_MSG_VERBOSE("Running tool: " << tool->name() );
54 if( tool->execute().isFailure() ) {
55 ATH_MSG_ERROR("Failed to execute tool: " << tool->name());
56 return StatusCode::FAILURE;
57 }
58 }
59
60 return StatusCode::SUCCESS;
61 }
62
63 //**********************************************************************
64
65}
66
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_VERBOSE(x)
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
An algorithm that can be simultaneously executed in multiple threads.
virtual StatusCode execute(const EventContext &ctx) const override
ToolHandleArray< IMETRecoTool > m_recotools
Athena configured tools.
Definition METRecoAlg.h:39
METRecoAlg()
Default constructor:
virtual StatusCode finalize() override
~METRecoAlg()
Destructor:
virtual StatusCode initialize() override
Athena algorithm's Hooks.