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