ATLAS Offline Software
|
Tool to keep a registry of collection getter tools. More...
#include <CollectionGetterRegistryTool.h>
Public Member Functions | |
CollectionGetterRegistryTool (const std::string &type, const std::string &name, const IInterface *parent) | |
Standard Gaudi tool constructor. More... | |
virtual StatusCode | initialize () |
Standard Gaudi initialize method. More... | |
virtual StatusCode | add (const std::string &label, ICollectionGetterTool *tool) |
Register a new collection getter tool. More... | |
virtual StatusCode | get (const std::string &label, const INamedInterface *parent, ICollectionGetterTool *&tool) |
Get a copy of a registered collection getter tool. More... | |
Private Types | |
typedef std::unordered_map< std::string, D3PD::ICollectionGetterTool * > | map_t |
Map from getter labels to instances. More... | |
Private Attributes | |
ServiceHandle< Gaudi::Interfaces::IOptionsSvc > | m_jos |
Property: The job options service. More... | |
ServiceHandle< IToolSvc > | m_toolsvc |
Property: The tool service. More... | |
map_t | m_collection_map |
Tool to keep a registry of collection getter tools.
In order to represent associations by an index, we need to be able to get access to the collection within which we're indexing. We do this by optionally associating a label with a collection getter tool (this will typically be the object prefix). We can then look up the label here and make a copy of the matching getter tool. (We make a copy rather than using the original instance since the collection getters are stateful.)
Definition at line 45 of file CollectionGetterRegistryTool.h.
|
private |
Map from getter labels to instances.
Definition at line 95 of file CollectionGetterRegistryTool.h.
D3PD::CollectionGetterRegistryTool::CollectionGetterRegistryTool | ( | const std::string & | type, |
const std::string & | name, | ||
const IInterface * | parent | ||
) |
Standard Gaudi tool constructor.
type | The name of the tool type. |
name | The tool name. |
parent | The tool's Gaudi parent. |
Definition at line 29 of file CollectionGetterRegistryTool.cxx.
|
virtual |
Register a new collection getter tool.
label | Label for the tool. |
tool | The tool instance. |
Definition at line 62 of file CollectionGetterRegistryTool.cxx.
|
virtual |
Get a copy of a registered collection getter tool.
label | Label for the tool. |
parent | Parent for the new tool. |
tool | The new tool instance. |
The new tool will be a private tool, owned by parent
.
Definition at line 88 of file CollectionGetterRegistryTool.cxx.
|
virtual |
Standard Gaudi initialize
method.
Definition at line 48 of file CollectionGetterRegistryTool.cxx.
|
private |
Definition at line 96 of file CollectionGetterRegistryTool.h.
|
private |
Property: The job options service.
Definition at line 89 of file CollectionGetterRegistryTool.h.
|
private |
Property: The tool service.
Definition at line 92 of file CollectionGetterRegistryTool.h.