ATLAS Offline Software
Loading...
Searching...
No Matches
BlockFillerToolMulti.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-2023 CERN for the benefit of the ATLAS collaboration
5*/
13
14
15#ifndef D3PDMAKERUTILS_BLOCKFILLERTOOLMULTI_H
16#define D3PDMAKERUTILS_BLOCKFILLERTOOLMULTI_H
17
18
21#ifndef D3PDMAKERUTILS_BLOCKFILLERTOOL_H // prevent recursive include
23#endif
24
25#include <cstdlib>
26
27
28namespace D3PD {
29
30
45template <class T0>
47 : public BlockFillerToolImpl
48{
49public:
56 BlockFillerTool (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
78 virtual StatusCode book() override = 0;
79
80
89 virtual StatusCode fill (const T0& /*p*/) = 0;
90
91
103 virtual StatusCode fillAgain (const T0& p) { return this->fill(p); }
104
105
132 virtual StatusCode fillUntyped (const void* p, bool again = false) override;
133
134
135protected:
137 size_t m_which;
138
139
150 virtual StatusCode doFillUntyped (const void* p, bool again, size_t count);
151
152
160 virtual void push_ti (std::vector<const std::type_info*>& tis);
161};
162
163
164} // namespace D3PD
165
166
168
169
170#endif // not D3PDMAKERUTILS_BLOCKFILLERTOOLMULTI_H
Non-template parts of BlockFillerTool.
Type-safe wrapper for block filler tools.
A simple tuple of multiple types.
BlockFillerTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard Gaudi tool constructor.
virtual StatusCode fillUntyped(const void *p, bool again=false) override
Fill one block.
virtual StatusCode fillAgain(const T0 &p)
Fill one block, after AGAIN has been returned (type-safe).
virtual StatusCode fill(const T0 &)=0
Fill one block — type-safe version.
virtual StatusCode doFillUntyped(const void *p, bool again, size_t count)
Helper to decide which which fill method to call.
virtual void push_ti(std::vector< const std::type_info * > &tis)
Helper to collect the list of type_info's that we accept.
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 StatusCode book() override=0
Declare tuple variables.
BlockFillerToolImpl(const std::string &type, const std::string &name, const IInterface *parent)
virtual StatusCode fill(const T &p)=0
Fill one block — type-safe version.
Common interface for adding a variable to a tuple.
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