ATLAS Offline Software
Loading...
Searching...
No Matches
AuxDataFillerTool.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$
14
15#ifndef D3PDMAKERCORECOMPS_AUXDATAFILLERTOOL_H
16#define D3PDMAKERCORECOMPS_AUXDATAFILLERTOOL_H
17
18
21#include "RootUtils/Type.h"
22#include <vector>
23#include <string>
24#include <memory>
25
26
27namespace D3PD {
28
29
34 : public BlockFillerTool<SG::AuxElement>
35{
36public:
43 AuxDataFillerTool (const std::string& type,
44 const std::string& name,
45 const IInterface* parent);
46
47
49 virtual StatusCode initialize();
50
51
53 virtual StatusCode book();
54
55
64 virtual StatusCode fill (const SG::AuxElement& p);
65
66
67private:
69 StatusCode parseVars();
70
72 std::string m_auxprefix;
73
76 std::vector<std::string> m_varString;
77
78
80 struct Var
81 {
92 Var (const std::string& the_name,
93 const std::string& the_docstring,
94 const std::vector<std::string>& the_labels,
95 const std::vector<std::string>& the_label_classes,
96 const std::string& the_defstring,
97 bool the_has_default);
98
99
106 const void* access (const SG::AuxElement& p) const;
107
109 std::string name;
110
112 std::string docstring;
113
116 RootUtils::Type::unique_ptr defobj;
117
120
123
125 const std::type_info* ti;
126
128 std::vector<SG::AuxElement::TypelessConstAccessor> accessors;
129
131 void* ptr;
132
134 std::string label;
135 };
136
137
139 std::vector<std::unique_ptr<Var> > m_vars;
140};
141
142
143} // namespace D3PD
144
145
146#endif // not D3PDMAKERCORECOMPS_AUXDATAFILLERTOOL_H
Base class for elements of a container that can have aux data.
Type-safe wrapper for block filler tools.
Wrapper for ROOT types.
std::vector< std::string > m_varString
Property: Specify variables to fill.
virtual StatusCode fill(const SG::AuxElement &p)
Fill one block — type-safe version.
virtual StatusCode book()
Book variables for this block.
StatusCode parseVars()
Parse the variables property and fill m_vars.
std::string m_auxprefix
Property: Prefix to add to aux data names.
std::vector< std::unique_ptr< Var > > m_vars
Parsed list of variables.
virtual StatusCode initialize()
Standard Gaudi initialize method.
AuxDataFillerTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard Gaudi tool constructor.
Type-safe wrapper for block filler tools.
Wrapper for ROOT types.
Definition Type.h:40
Base class for elements of a container that can have aux data.
Definition AuxElement.h:483
Block filler tool for noisy FEB information.
const std::type_info * ti
Type of the variable, as type_info.
const void * access(const SG::AuxElement &p) const
Try to retrieve an aux data item from p.
bool has_default
If true, this aux variable can be defaulted.
void * ptr
Pointer passed to ID3PD.
std::vector< SG::AuxElement::TypelessConstAccessor > accessors
Aux data accessor(s) for the item.
RootUtils::Type::unique_ptr defobj
If present, a default object instance to use if the aux variable is not present.
std::string label
Name of the aux data item(s).
Var(const std::string &the_name, const std::string &the_docstring, const std::vector< std::string > &the_labels, const std::vector< std::string > &the_label_classes, const std::string &the_defstring, bool the_has_default)
Constructor.
RootUtils::Type type
Type of the item.
std::string name
Name of the variable.
std::string docstring
Docstring for the variable.