ATLAS Offline Software
Loading...
Searching...
No Matches
KLFitterFinalizeOutputAlg.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
7
9
10namespace EventReco {
11
13 ISvcLocator *pSvcLocator)
14 : EL::AnaAlgorithm(name, pSvcLocator) {}
15
19 ANA_CHECK(m_systematicsList.initialize());
20 return StatusCode::SUCCESS;
21}
22
24 for (const auto &sys : m_systematicsList.systematicsVector()) {
25 // for events, where the KLFitterResultContainer was not created (e.g. event
26 // didn't pass any of the regions' selections) we have to record an empty
27 // container -- this ensures that every single event has at least empty
28 // container (no KLFitter permutations)
29 if (!m_inHandle.isValid(sys)) {
30 auto resultAuxContainer =
31 std::make_unique<xAOD::KLFitterResultAuxContainer>();
32 auto resultContainer = std::make_unique<xAOD::KLFitterResultContainer>();
33 resultContainer->setStore(resultAuxContainer.get());
34 ANA_CHECK(m_outHandle.record(std::move(resultContainer),
35 std::move(resultAuxContainer), sys));
36 }
37 }
38 return StatusCode::SUCCESS;
39}
40
41} // namespace EventReco
#define ANA_CHECK(EXP)
check whether the given expression was successful
AnaAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
constructor with parameters
CP::SysReadHandle< xAOD::KLFitterResultContainer > m_inHandle
KLFitterFinalizeOutputAlg(const std::string &name, ISvcLocator *pSvcLocator)
CP::SysWriteHandle< xAOD::KLFitterResultContainer, xAOD::KLFitterResultAuxContainer > m_outHandle
This module defines the arguments passed from the BATCH driver to the BATCH worker.