ATLAS Offline Software
Loading...
Searching...
No Matches
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
13
14
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
28class IToolSvc;
29
30
31namespace D3PD {
32
33
46 : public extends<AthAlgTool, ICollectionGetterRegistryTool>
47{
48public:
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
87private:
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
Abstract interface to keep a registry of collection getter tools.
virtual StatusCode add(const std::string &label, ICollectionGetterTool *tool)
Register a new collection getter tool.
std::unordered_map< std::string, D3PD::ICollectionGetterTool * > map_t
Map from getter labels to instances.
ServiceHandle< Gaudi::Interfaces::IOptionsSvc > m_jos
Property: The job options service.
virtual StatusCode initialize()
Standard Gaudi initialize method.
CollectionGetterRegistryTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard Gaudi tool constructor.
virtual StatusCode get(const std::string &label, const INamedInterface *parent, ICollectionGetterTool *&tool)
Get a copy of a registered collection getter tool.
ServiceHandle< IToolSvc > m_toolsvc
Property: The tool service.
Abstract interface to get a collection of objects and iterate over it.
std::string label(const std::string &format, int i)
Definition label.h:19
Block filler tool for noisy FEB information.