ATLAS Offline Software
Loading...
Searching...
No Matches
IndexAssociationFillerTool.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-2017 CERN for the benefit of the ATLAS collaboration
5*/
6
7// $Id: IndexAssociationFillerTool.h 618070 2014-09-22 19:05:34Z ssnyder $
14
15
16#ifndef D3PDMAKERCORECOMPS_INDEXASSOCIATIONTOOL_H
17#define D3PDMAKERCORECOMPS_INDEXASSOCIATIONTOOL_H
18
19
27#include "GaudiKernel/ToolHandle.h"
28
29
30namespace D3PD {
31
32
34
35
62 : public extends<AthAlgTool, IBlockFillerTool>, public AddVariable
63{
64public:
71 IndexAssociationFillerTool (const std::string& type,
72 const std::string& name,
73 const IInterface* parent);
74
75
77 virtual StatusCode initialize() override;
78
79
88 virtual StatusCode configureD3PD (IAddVariable* tree,
89 const std::type_info& ti) override;
90
91
97 virtual StatusCode book() override;
98
99
126 virtual StatusCode fillUntyped (const void* p,
127 bool again = false) override;
128
129
130private:
132 ToolHandle<ISingleAssociationTool> m_associator;
133
136 std::string m_targetLabel;
137
139 std::string m_prefix;
140
142 std::string m_blockName;
143
145 ToolHandle<ICollectionGetterRegistryTool> m_registry;
146
150
153
157
160};
161
162
163} // namespace D3PD
164
165
166#endif // not D3PDMAKERCORECOMPS_INDEXASSOCIATIONTOOL_H
167
Common implementation of IAddVariable.
Abstract interface for tool to fill a block in the D3PD.
Abstract interface to keep a registry of collection getter tools.
Abstract interface to form a single association.
Cache pointer -> index mappings for a Getter used for index assocs.
Helper to convert pointers.
AddVariable(const std::string &prefix, const std::string &blockName=s_emptyString)
Constructor.
Common interface for adding a variable to a tuple.
Abstract interface to get a collection of objects and iterate over it.
std::string m_blockName
Property: the name of this block.
TypeConverter m_converter
Helper to convert from pointer returned by the associator to pointer into the index container.
virtual StatusCode book() override
Declare tuple variables.
std::string m_prefix
Property: The variable name prefix.
ToolHandle< ISingleAssociationTool > m_associator
Property: The association tool instance.
bool m_allowMissing
Property: Don't give an error if the target getter fails to find the input objects.
virtual StatusCode fillUntyped(const void *p, bool again=false) override
Fill one block.
virtual StatusCode initialize() override
Standard Gaudi initialize method.
std::string m_targetLabel
Property: The label of the collection getter defining the collection within which to index.
IndexMap m_map
Map from objects to indices.
virtual StatusCode configureD3PD(IAddVariable *tree, const std::type_info &ti) override
Configure during initialization: type-check.
ToolHandle< ICollectionGetterRegistryTool > m_registry
Property: The ICollectionGetterRegistryTool instance.
IndexAssociationFillerTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard Gaudi tool constructor.
This is helper for converting between pointers of different types, given dynamically by std::type_inf...
Block filler tool for noisy FEB information.
TChain * tree