ATLAS Offline Software
JetAlgorithm.cxx
Go to the documentation of this file.
1 
2 /*
3  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
4 */
5 
6 // JetAlgorithm.cxx
7 
8 #include "JetRec/JetAlgorithm.h"
10 
11 JetAlgorithm::~JetAlgorithm() = default;
12 
13 //**********************************************************************
14 
16  ATH_MSG_INFO("Initializing " << name() << "...");
17  ATH_CHECK( m_exetools.retrieve() );
18  ATH_MSG_INFO(" Tool count: " << m_exetools.size());
19  for ( const ToolHandle<IJetExecuteTool>& tool : m_exetools ) {
20  ATH_MSG_INFO(" " << tool->name());
21  tool->print();
22  }
23  return StatusCode::SUCCESS;
24 }
25 
26 //**********************************************************************
27 
28 StatusCode JetAlgorithm::execute(const EventContext&) const {
29  // Loop over tools.
30  for ( const ToolHandle<IJetExecuteTool>& htool : m_exetools ) {
31  ATH_MSG_DEBUG("Executing tool " << htool->name());
32  const int jstat = htool->execute();
33  if ( jstat != 0 ) ATH_MSG_INFO("Tool " << htool->name() << " returned error " << jstat);
34  else ATH_MSG_DEBUG("Tool execution succeeded");
35  }
36  return StatusCode::SUCCESS;
37 }
38 
39 //**********************************************************************
JetAlgorithm::m_exetools
ToolHandleArray< IJetExecuteTool > m_exetools
Athena configured tools.
Definition: JetAlgorithm.h:32
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
JetAlgorithm::~JetAlgorithm
~JetAlgorithm()
Destructor:
JetAlgorithm.h
IJetExecuteTool.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
JetAlgorithm::initialize
StatusCode initialize() override
Athena algorithm's Hooks.
Definition: JetAlgorithm.cxx:15
AtlCoolConsole.tool
tool
Definition: AtlCoolConsole.py:453
JetAlgorithm::execute
StatusCode execute(const EventContext &ctx) const override
Definition: JetAlgorithm.cxx:28