ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
AthToolSupport
AsgDataHandles
AsgDataHandles
AthToolSupport/AsgDataHandles/AsgDataHandles/VarHandleKeyArray.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef ASG_DATA_HANDLES_VAR_HANDLE_KEY_ARRAY_H
6
#define ASG_DATA_HANDLES_VAR_HANDLE_KEY_ARRAY_H
7
8
#ifndef XAOD_STANDALONE
9
#include <
StoreGate/VarHandleKeyArray.h
>
10
#else
11
18
19
#include <
AsgMessaging/StatusCode.h
>
20
#include <vector>
21
#include <string>
22
23
namespace
SG
{
24
37
class
VarHandleKeyArray
{
38
public
:
39
VarHandleKeyArray
(){};
40
virtual
~VarHandleKeyArray
() =
default
;
41
// virtual StatusCode assign(const std::vector<std::string>& vs)=0;
42
virtual
std::string
toString
()
const
= 0;
43
// virtual Gaudi::DataHandle::Mode mode() const = 0;
44
45
// virtual std::vector<SG::VarHandleKey*> keys() const = 0;
46
47
// virtual void renounce() = 0;
48
// virtual bool renounced() const = 0;
49
// virtual void declare(IDataHandleHolder*) = 0;
50
51
// virtual void setOwner( IDataHandleHolder* o ) = 0;
52
// virtual const IDataHandleHolder* owner() const = 0;
53
// virtual IDataHandleHolder* owner() = 0;
54
55
};
56
57
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
58
// mixin class for common functionality
59
//
60
76
77
template
<
class
Base>
78
class
VarHandleKeyArrayCommon
:
public
VarHandleKeyArray
,
79
public
std::vector<Base> {
80
public
:
85
VarHandleKeyArrayCommon
() : std::vector<Base>() {};
86
91
VarHandleKeyArrayCommon
(
const
std::vector<Base>& v ):
92
std::vector<Base>(
v
) {};
93
99
VarHandleKeyArrayCommon
( std::initializer_list<Base> l ):
100
std::vector<Base>{
l
} {};
101
108
VarHandleKeyArrayCommon
( std::initializer_list<std::string> l ) {
109
for
(
auto
&e : l) {
110
this->
push_back
( Base{
e
} );
111
}
112
}
113
119
StatusCode
initialize
(
bool
used =
true
);
120
121
// /**
122
// * @brief Set the contents of the VarHandleKeyArray from a
123
// * vector of std::strings
124
// * @param vs vector of initializer strings
125
// */
126
// virtual StatusCode assign(const std::vector<std::string>& vs) override;
127
131
virtual
std::string
toString
()
const override
;
132
133
// /**
134
// * @brief create array of all base VarHandleKeys in the Array
135
// */
136
// virtual std::vector<SG::VarHandleKey*> keys() const override;
137
138
139
// /**
140
// * @brief if called, handles will not be declared in the algorithm I/O
141
// */
142
// virtual void renounce() override { m_isRenounced = true; }
143
144
// /**
145
// * @brief query renounced state
146
// **/
147
// virtual bool renounced() const override { return m_isRenounced; }
148
149
// virtual void declare( IDataHandleHolder* ) override;
150
151
// virtual void setOwner( IDataHandleHolder* o ) override { m_owner = o; }
152
// virtual const IDataHandleHolder* owner() const override { return m_owner; }
153
// virtual IDataHandleHolder* owner() override { return m_owner; }
154
155
private
:
156
157
// bool m_isRenounced{ false };
158
// IDataHandleHolder* m_owner{ nullptr };
159
160
};
161
162
}
// namespace SG
163
164
namespace
std
{
165
ostream&
operator<<
(ostream& s,
const
SG::VarHandleKeyArray& m);
166
}
167
168
169
#include "
AsgDataHandles/VarHandleKeyArray.icc
"
170
171
#endif
172
173
#endif
VarHandleKeyArray.icc
StatusCode.h
VarHandleKeyArray.h
Base class for VarHandleKeyArray for reading from StoreGate.
SG::VarHandleKeyArrayCommon
Definition
StoreGate/StoreGate/VarHandleKeyArray.h:63
SG::VarHandleKeyArrayCommon::push_back
virtual void push_back(const std::string &key) override
Add a new key to the VarHandleKeyArray.
Definition
StoreGate/StoreGate/VarHandleKeyArray.h:135
SG::VarHandleKeyArrayCommon::toString
virtual std::string toString() const override
string representation of the VarHandleKeyArray
SG::VarHandleKeyArrayCommon::VarHandleKeyArrayCommon
VarHandleKeyArrayCommon()
default base Constructor of mixin
Definition
StoreGate/StoreGate/VarHandleKeyArray.h:69
SG::VarHandleKeyArray
Definition
StoreGate/StoreGate/VarHandleKeyArray.h:28
SG::VarHandleKeyArray::VarHandleKeyArray
VarHandleKeyArray()
Definition
StoreGate/StoreGate/VarHandleKeyArray.h:30
SG::VarHandleKeyArray::~VarHandleKeyArray
virtual ~VarHandleKeyArray()=default
SG::VarHandleKeyArray::toString
virtual std::string toString() const =0
AllowedVariables::e
e
Definition
AsgElectronSelectorTool.cxx:37
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition
PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
PrintTrkAnaSummary.l
l
Printing final latex table to .tex output file.
Definition
PrintTrkAnaSummary.py:370
SG
Forward declaration.
Definition
CaloCellPacker_400_500.h:32
python.PyAthena.v
v
Definition
PyAthena.py:153
std
STL namespace.
std::operator<<
ostream & operator<<(ostream &s, const SG::VarHandleKey &m)
Definition
AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:158
initialize
void initialize()
Definition
run_EoverP.cxx:894
Generated on
for ATLAS Offline Software by
1.17.0