ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
AthToolSupport
AsgDataHandles
AsgDataHandles
AthToolSupport/AsgDataHandles/AsgDataHandles/HandleKeyArray.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_HANDLE_KEY_ARRAY_H
6
#define ASG_DATA_HANDLES_HANDLE_KEY_ARRAY_H
7
8
#ifndef XAOD_STANDALONE
9
#include <
StoreGate/HandleKeyArray.h
>
10
#else
11
12
#include "
AsgDataHandles/VarHandleKeyArray.h
"
13
14
class
EventContext;
15
16
namespace
SG
{
17
30
31
template
<
class
T_Handle,
class
T_HandleKey
/*, Gaudi::DataHandle::Mode MODE*/
>
32
class
HandleKeyArray
:
public
VarHandleKeyArrayCommon
< T_HandleKey > {
33
public
:
37
HandleKeyArray
(){}
38
39
// /**
40
// * @brief Constructor from a HandleKeyArray that takes a vector
41
// * of ReadHandleKeys
42
// * @param v vector of HandleKey
43
// */
44
// HandleKeyArray( const std::vector<T_HandleKey>& v ) :
45
// VarHandleKeyArrayCommon<T_HandleKey> ( v ) {}
46
47
// /**
48
// * @brief Constructor from a HandleKeyArray that takes an
49
// * initializer list of HandleKeys
50
// * @param l initializer list of HandleKey
51
// */
52
// HandleKeyArray( std::initializer_list<T_HandleKey> l ):
53
// VarHandleKeyArrayCommon<T_HandleKey> {l} {}
54
55
// /**
56
// * @brief Constructor from a HandleKeyArray that takes an
57
// * initializer list of std::strings.
58
// * @param l initializer list of std::strings used to create the
59
// * HandleKeys
60
// */
61
// HandleKeyArray( std::initializer_list<std::string> key_names):
62
// VarHandleKeyArrayCommon<T_HandleKey> {key_names} {}
63
73
template
<
class
OWNER>
74
inline
HandleKeyArray
( OWNER*
owner
,
75
std::string name,
76
std::initializer_list<std::string> l,
77
std::string doc=
""
) :
78
VarHandleKeyArrayCommon
<T_HandleKey> {
l
} {
79
owner
->declareProperty(std::move(name), *
this
, std::move(doc));
80
}
81
82
83
// /**
84
// * @brief return the type (Read/Write/Update) of handle
85
// */
86
// Gaudi::DataHandle::Mode mode() const { return MODE; }
87
92
std::vector< T_Handle >
makeHandles
()
const
{
93
std::vector< T_Handle > hndl;
94
typename
std::vector<T_HandleKey>::const_iterator itr;
95
for
(itr = this->
begin
(); itr != this->
end
(); ++itr) {
96
hndl.push_back ( T_Handle( *itr) );
97
}
98
return
hndl;
99
}
100
105
std::vector< T_Handle >
makeHandles
(
const
EventContext& ctx)
const
106
{
107
std::vector< T_Handle > hndl;
108
typename
std::vector<T_HandleKey>::const_iterator itr;
109
for
(itr = this->
begin
(); itr != this->
end
(); ++itr) {
110
hndl.push_back ( T_Handle( *itr, ctx) );
111
}
112
return
hndl;
113
}
114
115
};
116
117
}
// namespace SG
118
119
namespace
asg
120
{
121
namespace
detail
122
{
123
template
<
typename
T>
struct
GetStringHelper;
124
125
template
<
typename
T1,
typename
T2>
struct
GetStringHelper<SG::HandleKeyArray<T1,T2> >
126
:
public
GetStringHelper<std::vector<T2> >
127
{
128
};
129
130
template
<
typename
T>
struct
SetStringHelper;
131
132
template
<
typename
T1,
typename
T2>
struct
SetStringHelper<SG::HandleKeyArray<T1,T2> >
133
:
public
SetStringHelper<std::vector<T2> >
134
{
135
};
136
}
137
}
138
139
#endif
140
141
#endif
VarHandleKeyArray.h
HandleKeyArray.h
SG::HandleKeyArray
Definition
StoreGate/StoreGate/HandleKeyArray.h:45
SG::HandleKeyArray::HandleKeyArray
HandleKeyArray()
default Constructor from a HandleKeyArray
Definition
StoreGate/StoreGate/HandleKeyArray.h:50
SG::HandleKeyArray::makeHandles
std::vector< T_Handle > makeHandles() const
create a vector of Handles from the HandleKeys in the array
Definition
StoreGate/StoreGate/HandleKeyArray.h:148
SG::VarHandleKeyArrayCommon
Definition
StoreGate/StoreGate/VarHandleKeyArray.h:63
SG::VarHandleKeyArrayCommon< T_HandleKey >::VarHandleKeyArrayCommon
VarHandleKeyArrayCommon()
Definition
StoreGate/StoreGate/VarHandleKeyArray.h:69
SG::VarHandleKeyArray::owner
virtual const IDataHandleHolder * owner() const =0
PrintTrkAnaSummary.l
l
Printing final latex table to .tex output file.
Definition
PrintTrkAnaSummary.py:370
ReadBchFromCrest.begin
int begin
Definition
ReadBchFromCrest.py:76
SG
Forward declaration.
Definition
CaloCellPacker_400_500.h:32
asg::detail
Definition
Control/AthToolSupport/AsgMessaging/AsgMessaging/MessageCheck.h:234
asg
Definition
DataHandleTestTool.h:28
mergePhysValFiles.end
end
Definition
DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:92
Generated on
for ATLAS Offline Software by
1.17.0