ATLAS Offline Software
Loading...
Searching...
No Matches
IndexMultiAssociationFillerTool.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: IndexMultiAssociationFillerTool.h 618070 2014-09-22 19:05:34Z ssnyder $
14
15
16#ifndef D3PDMAKERCORECOMPS_INDEXMULTIASSOCIATIONFILLERTOOL_H
17#define D3PDMAKERCORECOMPS_INDEXMULTIASSOCIATIONFILLERTOOL_H
18
19
27#include "GaudiKernel/ToolHandle.h"
28#include <vector>
29
30
31namespace D3PD {
32
33
34class ICollectionRegistryTool;
35
36
64 : public extends<AthAlgTool, IBlockFillerTool>, public AddVariable
65{
66public:
73 IndexMultiAssociationFillerTool (const std::string& type,
74 const std::string& name,
75 const IInterface* parent);
76
77
79 virtual StatusCode initialize() override;
80
81
90 virtual StatusCode configureD3PD (IAddVariable* tree,
91 const std::type_info& ti) override;
92
93
99 virtual StatusCode book() override;
100
101
128 virtual StatusCode fillUntyped (const void* p,
129 bool again = false) override;
130
131
132private:
134 ToolHandle<IMultiAssociationTool> m_associator;
135
138 std::string m_targetLabel;
139
141 std::string m_prefix;
142
144 std::string m_blockName;
145
147 ToolHandle<ICollectionGetterRegistryTool> m_registry;
148
152
154 std::vector<int>* m_index;
155
159
162};
163
164
165} // namespace D3PD
166
167
168#endif // not D3PDMAKERCORECOMPS_INDEXMULTIASSOCIATIONFILLERTOOL_H
169
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 multi-way 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.
ToolHandle< IMultiAssociationTool > m_associator
Property: The association tool instance.
ToolHandle< ICollectionGetterRegistryTool > m_registry
Property: The ICollectionGetterRegistryTool instance.
IndexMultiAssociationFillerTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard Gaudi tool constructor.
std::string m_targetLabel
Property: The label of the collection getter defining the collection within which to index.
std::string m_prefix
Property: The variable name prefix.
std::vector< int > * m_index
Index collection variable.
std::string m_blockName
Property: the name of this block.
virtual StatusCode initialize() override
Standard Gaudi initialize method.
virtual StatusCode fillUntyped(const void *p, bool again=false) override
Fill one 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.
bool m_allowMissing
Property: Don't give an error if the target getter fails to find the input objects.
virtual StatusCode configureD3PD(IAddVariable *tree, const std::type_info &ti) override
Configure during initialization: type-check.
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