ATLAS Offline Software
CollectionGetterRegistryTool.h
Go to the documentation of this file.
1 // This file's extension implies that it's C, but it's really -*- C++ -*-.
2 
3 /*
4  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
5 */
6 
15 #ifndef D3PDMAKERCORECOMPS_COLLECTIONGETTERREGISTRYTOOL_H
16 #define D3PDMAKERCORECOMPS_COLLECTIONGETTERREGISTRYTOOL_H
17 
18 
21 #include "GaudiKernel/ToolHandle.h"
22 #include "GaudiKernel/ServiceHandle.h"
23 #include "Gaudi/Interfaces/IOptionsSvc.h"
24 
25 #include <unordered_map>
26 
27 
28 class IToolSvc;
29 
30 
31 namespace D3PD {
32 
33 
46  : public extends1<AthAlgTool, ICollectionGetterRegistryTool>
47 {
48 public:
55  CollectionGetterRegistryTool (const std::string& type,
56  const std::string& name,
57  const IInterface* parent);
58 
59 
61  virtual StatusCode initialize();
62 
63 
69  virtual StatusCode add (const std::string& label,
71 
72 
81  virtual StatusCode get (const std::string& label,
82  const INamedInterface* parent,
84 
85 
86 
87 private:
90 
93 
95  typedef std::unordered_map<std::string, D3PD::ICollectionGetterTool*> map_t;
97 };
98 
99 
100 } // namespace D3PD
101 
102 
103 
104 #endif // not D3PDMAKERCORECOMPS_COLLECTIONGETTERREGISTRYTOOL_H
ICollectionGetterRegistryTool.h
Abstract interface to keep a registry of collection getter tools.
D3PD::CollectionGetterRegistryTool::CollectionGetterRegistryTool
CollectionGetterRegistryTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard Gaudi tool constructor.
Definition: CollectionGetterRegistryTool.cxx:31
PlotCalibFromCool.label
label
Definition: PlotCalibFromCool.py:78
D3PD::CollectionGetterRegistryTool::get
virtual StatusCode get(const std::string &label, const INamedInterface *parent, ICollectionGetterTool *&tool)
Get a copy of a registered collection getter tool.
Definition: CollectionGetterRegistryTool.cxx:89
D3PD::CollectionGetterRegistryTool::m_jos
ServiceHandle< Gaudi::Interfaces::IOptionsSvc > m_jos
Property: The job options service.
Definition: CollectionGetterRegistryTool.h:89
D3PD::ICollectionGetterTool
Abstract interface to get a collection of objects and iterate over it.
Definition: ICollectionGetterTool.h:39
D3PD
Block filler tool for noisy FEB information.
Definition: InnerDetector/InDetMonitoring/InDetGlobalMonitoring/macros/EnhancedPrimaryVertexMonitoring/TrigD3PD/ChainGroup.h:21
D3PD::CollectionGetterRegistryTool::m_collection_map
map_t m_collection_map
Definition: CollectionGetterRegistryTool.h:96
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
D3PD::CollectionGetterRegistryTool
Tool to keep a registry of collection getter tools.
Definition: CollectionGetterRegistryTool.h:47
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
AtlCoolConsole.tool
tool
Definition: AtlCoolConsole.py:453
D3PD::CollectionGetterRegistryTool::initialize
virtual StatusCode initialize()
Standard Gaudi initialize method.
Definition: CollectionGetterRegistryTool.cxx:49
D3PD::CollectionGetterRegistryTool::add
virtual StatusCode add(const std::string &label, ICollectionGetterTool *tool)
Register a new collection getter tool.
Definition: CollectionGetterRegistryTool.cxx:63
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
D3PD::CollectionGetterRegistryTool::m_toolsvc
ServiceHandle< IToolSvc > m_toolsvc
Property: The tool service.
Definition: CollectionGetterRegistryTool.h:92
D3PD::CollectionGetterRegistryTool::map_t
std::unordered_map< std::string, D3PD::ICollectionGetterTool * > map_t
Map from getter labels to instances.
Definition: CollectionGetterRegistryTool.h:95
ServiceHandle< Gaudi::Interfaces::IOptionsSvc >