ATLAS Offline Software
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 */
15 #ifndef D3PDMAKERUTILS_BLOCKFILLERTOOLMULTI_H
16 #define D3PDMAKERUTILS_BLOCKFILLERTOOLMULTI_H
17 
18 
19 #include "D3PDMakerUtils/Types.h"
21 #ifndef D3PDMAKERUTILS_BLOCKFILLERTOOL_H // prevent recursive include
23 #endif
24 
25 #include <cstdlib>
26 
27 
28 namespace D3PD {
29 
30 
45 template <class T0>
47  : public BlockFillerToolImpl
48 {
49 public:
56  BlockFillerTool (const std::string& type,
57  const std::string& name,
58  const IInterface* parent);
59 
60 
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 
135 protected:
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
D3PD::BlockFillerTool< Types< T0 > >::push_ti
virtual void push_ti(std::vector< const std::type_info * > &tis)
Helper to collect the list of type_info's that we accept.
D3PD::BlockFillerTool< Types< T0 > >::fill
virtual StatusCode fill(const T0 &)=0
Fill one block — type-safe version.
D3PD::IAddVariable
Common interface for adding a variable to a tuple.
Definition: IAddVariable.h:70
D3PD::BlockFillerTool< Types< T0 > >::book
virtual StatusCode book() override=0
Declare tuple variables.
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
tree
TChain * tree
Definition: tile_monitor.h:30
D3PD::BlockFillerTool< Types< T0 > >::fillAgain
virtual StatusCode fillAgain(const T0 &p)
Fill one block, after AGAIN has been returned (type-safe).
Definition: BlockFillerToolMulti.h:103
D3PD::BlockFillerTool< Types< T0 > >::m_which
size_t m_which
Index of which type we're expecting.
Definition: BlockFillerToolMulti.h:137
D3PD::Types
std::tuple< WrapType< TYPES >... > Types
A simple tuple of multiple types.
Definition: PhysicsAnalysis/D3PDMaker/D3PDMakerUtils/D3PDMakerUtils/Types.h:61
XMLtoHeader.count
count
Definition: XMLtoHeader.py:85
BlockFillerTool.h
Type-safe wrapper for block filler tools.
D3PD
Block filler tool for noisy FEB information.
Definition: InnerDetector/InDetMonitoring/InDetGlobalMonitoring/macros/EnhancedPrimaryVertexMonitoring/TrigD3PD/ChainGroup.h:21
D3PD::BlockFillerTool::fill
virtual StatusCode fill(const T &p)=0
Fill one block — type-safe version.
Types.h
A simple tuple of multiple types.
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
test_pyathena.parent
parent
Definition: test_pyathena.py:15
D3PD::BlockFillerTool
Type-safe wrapper for block filler tools.
Definition: BlockFillerTool.h:68
BlockFillerToolMulti.icc
D3PD::BlockFillerTool< Types< T0 > >::configureD3PD
virtual StatusCode configureD3PD(IAddVariable *tree, const std::type_info &ti) override
Configure during initialization: type-check.
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
D3PD::BlockFillerTool< Types< T0 > >::doFillUntyped
virtual StatusCode doFillUntyped(const void *p, bool again, size_t count)
Helper to decide which which fill method to call.
D3PD::BlockFillerTool< Types< T0 > >::BlockFillerTool
BlockFillerTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard Gaudi tool constructor.
D3PD::BlockFillerToolImpl
Non-template parts of BlockFillerTool.
Definition: BlockFillerToolImpl.h:44
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
D3PD::BlockFillerTool< Types< T0 > >::fillUntyped
virtual StatusCode fillUntyped(const void *p, bool again=false) override
Fill one block.
BlockFillerToolImpl.h
Non-template parts of BlockFillerTool.