ATLAS Offline Software
Loading...
Searching...
No Matches
CaloRingerJetsReader.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5// =============================================================================
7
8#include <algorithm>
9
11#include "PATCore/AcceptData.h"
13
14namespace Ringer {
15
16// =============================================================================
18 const std::string& name,
19 const ::IInterface* parent) :
20 CaloRingerInputReader(type, name, parent),
22{
23
24 // declare interface
25 declareInterface<ICaloRingerJetsReader>(this);
26
27}
28
29// =============================================================================
34
35// =============================================================================
37{
38
40
42
43 if ( m_builderAvailable ) {
44 // Initialize our fctor
50 this
51 );
52 ATH_CHECK( m_clRingsBuilderJetFctor->initialize() );
53 }
54
55 return StatusCode::SUCCESS;
56
57}
58
59// =============================================================================
61{
62 return StatusCode::SUCCESS;
63}
64
65// =============================================================================
67{
68
69 ATH_MSG_DEBUG("Entering " << name() << " execute, m_builderAvailable = " << m_builderAvailable);
70
71 // Retrieve jets
73 // check is only used for serial running; remove when MT scheduler used
74 if(!jets.isValid()) {
75 ATH_MSG_FATAL("Failed to retrieve "<< m_inputJetContainerKey);
76 return StatusCode::FAILURE;
77 }
78
79 // Check if requested to run CaloRings Builder:
80 if ( m_builderAvailable ) {
81 ATH_CHECK( m_clRingsBuilderJetFctor->prepareJetToLoopFor(jets->size()) );
82
83 // loop over our particles:
84 for ( const auto *const jet : *jets ){
85 m_clRingsBuilderJetFctor->operator()( jet );
86 }
87
88 m_clRingsBuilderJetFctor->checkJetRelease();
89 }
90
91 return StatusCode::SUCCESS;
92}
93
94} // namespace Ringer
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_FATAL(x)
#define ATH_MSG_DEBUG(x)
Handle class for reading from StoreGate.
PublicToolHandle< ICaloRingsBuilder > m_crBuilder
Tool CaloRingerInputReader props (python configurables):
Gaudi::Property< bool > m_builderAvailable
Tool CaloRingerInputReader props (non configurables):If CaloRings builder is available.
CaloRingerInputReader(const std::string &type, const std::string &name, const ::IInterface *parent)
Default constructor.
virtual StatusCode initialize() override
Tool main methods:
virtual StatusCode finalize() override
finalize method
BuildCaloRingsJetFctor< xAOD::JetContainer > * m_clRingsBuilderJetFctor
The CaloRings Builder functor:
virtual StatusCode initialize() override
Tool main methods:
virtual StatusCode execute() override
execute method
SG::ReadHandleKey< xAOD::JetContainer > m_inputJetContainerKey
Tool CaloRingerJetsReader props (python configurables):
CaloRingerJetsReader(const std::string &type, const std::string &name, const IInterface *parent)
Default constructor.
singleton-like access to IMessageSvc via open function and helper
IMessageSvc * getMessageSvc(bool quiet=false)
Namespace dedicated for Ringer utilities.