ATLAS Offline Software
DecoratorAlg.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef DECORATOR_ALG_H
6 #define DECORATOR_ALG_H
7 
9 
11 
14 
15 namespace FlavorTagInference {
16  template <typename CONTAINER, typename DECORATOR, typename CONSTITUENTS>
18  {
19  public:
20  using AthReentrantAlgorithm::AthReentrantAlgorithm;
21  using ExtraDependencies = std::set<std::string>;
22  virtual StatusCode initialize() override;
24  virtual StatusCode execute(const EventContext& cxt) const override;
25  virtual StatusCode finalize() override;
26  protected:
28  this, "container", "", "Key for the input collection"};
30  this, "constituentContainer", "",
31  "Key for track inputs container"};
33  this, "electronContainer",
34  "", "key for input electron container"
35  };
36  Gaudi::Property<std::vector<std::string>> m_undeclaredReadDecorKeys {
37  this, "undeclaredReadDecorKeys", {},
38  "List of read handles that we don't read, e.g. static variables" };
39 
40  ToolHandle<DECORATOR> m_decorator{
41  this, "decorator", "", "Decorator tool"};
42 
43  // Keys to keep track of the inputs / outputs
44  std::vector<SG::ReadDecorHandleKey<CONTAINER>> m_aux;
45  std::vector<SG::ReadDecorHandleKey<CONSTITUENTS>> m_constituentAux;
46  std::vector<SG::ReadDecorHandleKey<xAOD::ElectronContainer>> m_electronAux;
47  std::vector<SG::WriteDecorHandleKey<CONTAINER>> m_decor;
48 
49  // aux ids (to lock)
50  std::vector<SG::auxid_t> m_auxids;
51  };
52 }
53 
54 #include "DecoratorAlg.icc"
55 
56 #endif
ReadDecorHandleKey.h
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
FlavorTagInference
This file contains "getter" functions used for accessing tagger inputs from the EDM.
Definition: PhysicsAnalysis/JetTagging/FlavorTagInference/FlavorTagInference/ConstituentsLoader.h:27
FlavorTagInference::DecoratorAlg::m_electronKey
SG::ReadHandleKey< xAOD::ElectronContainer > m_electronKey
Definition: DecoratorAlg.h:32
FlavorTagInference::DecoratorAlg::m_decorator
ToolHandle< DECORATOR > m_decorator
Definition: DecoratorAlg.h:40
SG::ReadHandleKey< CONTAINER >
FlavorTagInference::DecoratorAlg::ExtraDependencies
std::set< std::string > ExtraDependencies
Definition: DecoratorAlg.h:21
FlavorTagInference::DecoratorAlg::m_auxids
std::vector< SG::auxid_t > m_auxids
Definition: DecoratorAlg.h:50
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:74
FlavorTagInference::DecoratorAlg::initializeInternal
virtual StatusCode initializeInternal(ExtraDependencies={})
WriteDecorHandleKey.h
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
ElectronContainer.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
FlavorTagInference::DecoratorAlg::m_aux
std::vector< SG::ReadDecorHandleKey< CONTAINER > > m_aux
Definition: DecoratorAlg.h:44
FlavorTagInference::DecoratorAlg::m_undeclaredReadDecorKeys
Gaudi::Property< std::vector< std::string > > m_undeclaredReadDecorKeys
Definition: DecoratorAlg.h:36
FlavorTagInference::DecoratorAlg::initialize
virtual StatusCode initialize() override
FlavorTagInference::DecoratorAlg::m_decor
std::vector< SG::WriteDecorHandleKey< CONTAINER > > m_decor
Definition: DecoratorAlg.h:47
AthReentrantAlgorithm.h
FlavorTagInference::DecoratorAlg::m_constituentAux
std::vector< SG::ReadDecorHandleKey< CONSTITUENTS > > m_constituentAux
Definition: DecoratorAlg.h:45
FlavorTagInference::DecoratorAlg::m_electronAux
std::vector< SG::ReadDecorHandleKey< xAOD::ElectronContainer > > m_electronAux
Definition: DecoratorAlg.h:46
FlavorTagInference::DecoratorAlg
Definition: DecoratorAlg.h:18
FlavorTagInference::DecoratorAlg::m_constituentKey
SG::ReadHandleKey< CONSTITUENTS > m_constituentKey
Definition: DecoratorAlg.h:29
FlavorTagInference::DecoratorAlg::m_containerKey
SG::ReadHandleKey< CONTAINER > m_containerKey
Definition: DecoratorAlg.h:27
FlavorTagInference::DecoratorAlg::finalize
virtual StatusCode finalize() override
DecoratorAlg.icc
FlavorTagInference::DecoratorAlg::execute
virtual StatusCode execute(const EventContext &cxt) const override