ATLAS Offline Software
Loading...
Searching...
No Matches
MultiAssociationToolMulti.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 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
4*/
12
13
14#ifndef D3PDMAKERUTILS_MULTIASSOCIATIONTOOLMULTI_H
15#define D3PDMAKERUTILS_MULTIASSOCIATIONTOOLMULTI_H
16
17
20#ifndef D3PDMAKERUTILS_MULTIASSOCIATIONTOOL_H // prevent recursive include
22#endif
23
24#include <cstdlib>
25
26
27
28namespace D3PD {
29
30
45template <class T0, class TO_T>
47 : public MultiAssociationToolTo<TO_T>
48{
49public:
56 MultiAssociationTool (const std::string& type,
57 const std::string& name,
58 const IInterface* parent);
59
60
69 virtual StatusCode configureD3PD (IAddVariable* tree,
70 const std::type_info& ti) override;
71
72
76 virtual const std::type_info& fromTypeinfo() const override;
77
78
83 virtual StatusCode resetUntyped (const void* p) override;
84
85
90 virtual StatusCode reset (const T0& p) = 0;
91
92
93protected:
95 size_t m_which;
96
97
108 virtual StatusCode doResetUntyped (const void* p, size_t count);
109
110
118 virtual void push_ti (std::vector<const std::type_info*>& tis);
119
120
121
122private:
124 const std::type_info* m_fromTypeinfo;
125};
126
127
134template <class T0, class U0>
136 : public MultiAssociationTool<Types<T0>, U0>
137{
138public:
146
147
152 virtual StatusCode reset (const T0& p) override = 0;
153
154
162 virtual const U0* next () override;
163
164
171 virtual const U0* next (const T0* dummy) = 0;
172
173
179 virtual const std::type_info& elementTypeinfo() const override;
180
181
191 virtual void releaseElement (const U0* /*p*/) override;
192
193
203 virtual void releaseElementUntyped (const void* p) override;
204
205
211 virtual const void* nextUntyped() override;
212};
213
214
215} // namespace D3PD
216
217
219
220
221#endif // not D3PDMAKERUTILS_MULTIASSOCIATIONTOOLMULTI_H
Non-template parts of MultiAssociationTool.
Type-safe wrapper for multiple-target associator tools.
A simple tuple of multiple types.
Common interface for adding a variable to a tuple.
Helper for MultiAssociationTool.
virtual StatusCode resetUntyped(const void *p) override
Start the iteration for a new association.
size_t m_which
Index of which type we're expecting.
virtual StatusCode configureD3PD(IAddVariable *tree, const std::type_info &ti) override
Configure during initialization: type-check.
virtual void push_ti(std::vector< const std::type_info * > &tis)
Helper to collect the list of type_info's that we accept.
virtual StatusCode doResetUntyped(const void *p, size_t count)
Helper to decide which which reset method to call.
virtual StatusCode reset(const T0 &p)=0
Start the iteration for a new association.
const std::type_info * m_fromTypeinfo
type_info for the selected type.
MultiAssociationTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard Gaudi tool constructor.
virtual const std::type_info & fromTypeinfo() const override
Return the std::type_info for the source of the association.
virtual const std::type_info & elementTypeinfo() const override
Return the element type for the target of the association.
virtual void releaseElement(const U0 *) override
Release an object retrieved from the association.
virtual StatusCode reset(const T0 &p) override=0
Start the iteration for a new association.
virtual const U0 * next() override
Return a pointer to the next element in the association.
virtual void releaseElementUntyped(const void *p) override
Release an object retrieved from the association.
virtual const void * nextUntyped() override
Return a pointer to the next element in the association.
virtual const U0 * next(const T0 *dummy)=0
Return a pointer to the next element in the association.
Type-safe wrapper for multiple-target associator tools.
int count(std::string s, const std::string &regx)
count how many occurances of a regx are in a string
Definition hcg.cxx:146
Block filler tool for noisy FEB information.
std::tuple< WrapType< TYPES >... > Types
A simple tuple of multiple types.
TChain * tree