ATLAS Offline Software
GlobalSimulationAlg.cxx
Go to the documentation of this file.
1 // Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2 
3 #include "GlobalSimulationAlg.h"
4 #include "TrigConfData/L1Menu.h"
5 
7 
8 #include <fstream>
9 
10 namespace GlobalSim {
11 
13  ISvcLocator *pSvcLocator):
14  AthReentrantAlgorithm(name, pSvcLocator) {
15  }
16 
18 
19  ATH_MSG_INFO("number of AlgTools " << m_algTools.size());
20 
21  if (m_enableDumps) {
22  std::stringstream ss;
23  for (const auto& tool : m_algTools) {
24  ss << tool->toString() << '\n';
25  ss << "=========\n";
26  }
27  std::ofstream out(name() + "_init.log");
28  out << ss.str();
29  out.close();
30  }
31 
32  return StatusCode::SUCCESS;
33  }
34 
35 
36 
37  StatusCode GlobalSimulationAlg::execute(const EventContext& ctx) const {
38  ATH_MSG_DEBUG("Executing ...");
39 
40 
41  for (const auto& tool : m_algTools) {
42  ATH_MSG_DEBUG("Running Algtool " << tool.name());
43  CHECK(tool -> run(ctx));
44  }
45 
46  return StatusCode::SUCCESS;
47  }
48 }
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
run
int run(int argc, char *argv[])
Definition: ttree2hdf5.cxx:28
GlobalSimulationAlg.h
GlobalSim::GlobalSimulationAlg::GlobalSimulationAlg
GlobalSimulationAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition: GlobalSimulationAlg.cxx:12
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
GlobalSim::GlobalSimulationAlg::m_algTools
ToolHandleArray< IGlobalSimAlgTool > m_algTools
Definition: GlobalSimulationAlg.h:40
GlobalSim
AlgTool to obtain a selection of eFex RoIs read in from the event store.
Definition: dump.h:8
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
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
GlobalSim::GlobalSimulationAlg::m_enableDumps
Gaudi::Property< bool > m_enableDumps
Definition: GlobalSimulationAlg.h:47
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
AtlCoolConsole.tool
tool
Definition: AtlCoolConsole.py:453
GlobalSim::GlobalSimulationAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override
Definition: GlobalSimulationAlg.cxx:37
L1Menu.h
checker_macros.h
Define macros for attributes used to control the static checker.
GlobalSim::GlobalSimulationAlg::initialize
virtual StatusCode initialize() override
Definition: GlobalSimulationAlg.cxx:17