ATLAS Offline Software
Loading...
Searching...
No Matches
RunPartonHistoryAlg.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
6
8
10
11namespace CP {
13 ISvcLocator* pSvcLocator)
14 : EL::AnaAlgorithm(name, pSvcLocator), m_PartonScheme("Ttbar") {
15 declareProperty("partonScheme", m_PartonScheme, "the parton history to run");
16}
17
19 ANA_MSG_INFO("Initializing PartonHistory " << name());
20 ANA_MSG_INFO(" - partonScheme: " << m_PartonScheme);
21
22 // Look up scheme configuration from the registry
23 try {
25 m_PartonHistory = std::make_unique<CalcPartonHistory>(
26 "CP::CalcPartonHistory", cfg.truthCollections);
27 m_PartonHistory->configure(cfg);
28 } catch (const std::runtime_error& e) {
29 ANA_MSG_ERROR(" ==> PartonScheme " << m_PartonScheme
30 << " is not recognised! aborting.");
31 return StatusCode::FAILURE;
32 }
33 ANA_CHECK(m_PartonHistory->setProperty("prefix", m_PartonScheme));
34 ANA_CHECK(m_PartonHistory->initialize());
35 return StatusCode::SUCCESS;
36}
37
39 ANA_CHECK(m_PartonHistory->execute());
40 return StatusCode::SUCCESS;
41}
42
43} // namespace CP
#define ANA_MSG_INFO(xmsg)
Macro printing info messages.
#define ANA_MSG_ERROR(xmsg)
Macro printing error messages.
#define ANA_CHECK(EXP)
check whether the given expression was successful
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
virtual StatusCode initialize() override
virtual StatusCode execute() override
std::unique_ptr< CalcPartonHistory > m_PartonHistory
RunPartonHistoryAlg(const std::string &name, ISvcLocator *pSvcLocator)
AnaAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
constructor with parameters
Select isolated Photons, Electrons and Muons.
const PartonSchemeConfig & getSchemeConfig(const std::string &schemeName)
Returns the configuration for a given scheme name.
This module defines the arguments passed from the BATCH driver to the BATCH worker.
Top-level configuration for a named parton history scheme.