ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
AthToolSupport
AsgDataHandles
AsgDataHandles
AthToolSupport/AsgDataHandles/AsgDataHandles/VarHandleKey.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-2020 CERN for the benefit of the ATLAS collaboration
5
*/
6
13
14
15
#ifndef ASG_DATA_HANDLES_VAR_HANDLE_KEY_H
16
#define ASG_DATA_HANDLES_VAR_HANDLE_KEY_H
17
18
#ifndef XAOD_STANDALONE
19
#include <
StoreGate/VarHandleKey.h
>
20
#else
21
22
#include <
AsgMessaging/StatusCode.h
>
23
#include <string>
24
25
namespace
SG
{
26
27
28
enum
AllowEmptyEnum
{
29
AllowEmpty
= 1
30
};
31
32
33
class
VarHandleBase
;
34
35
41
class
VarHandleKey
42
{
43
public
:
61
explicit
VarHandleKey
(
const
std::string& sgkey);
62
// VarHandleKey (CLID clid,
63
// const std::string& sgkey,
64
// Gaudi::DataHandle::Mode a,
65
// const std::string& storeName = StoreID::storeName(StoreID::EVENT_STORE),
66
// bool isCond = false);
67
68
69
73
virtual
~VarHandleKey
() noexcept = default;
74
75
76
89
VarHandleKey
& operator= (const std::
string
& sgkey);
90
91
103
virtual StatusCode
assign
(const std::
string
& sgkey);
104
105
114
StatusCode
initialize
(
bool
used = true);
115
116
126
StatusCode
initialize
(
AllowEmptyEnum
);
127
128
132
const std::
string
&
key
() const;
133
134
138
bool
empty
() const;
139
140
144
bool
isEventStore
() const;
145
146
private
:
147
148
149
// /**
150
// * @brief Handle assignment/construction from a string key.
151
// * @param sgkey The StoreGate key for the referenced object.
152
// *
153
// * The provided key may actually start with the name of the store,
154
// * separated by a "+": "MyStore+Obj". If no "+" is present,
155
// * the store named by @c storeName is used. A key name that starts
156
// * with a slash is interpreted as a hierarchical key name,
157
// * not an empty store name.
158
// *
159
// * see implementation comments for further details
160
// */
161
// void parseKey (const std::string& sgkey, const std::string& storeName);
162
163
164
// /**
165
// * @brief Update the name of the store to which we're referring.
166
// * @param name The new store name.
167
// */
168
// void updateHandle (const std::string& name);
169
171
std::
string
m_sgKey
;
172
174
bool
m_isEventStore
= true;
175
};
176
177
178
}
// namespace SG
179
180
namespace std {
181
ostream&
operator<<
(ostream& s,
const
SG::VarHandleKey& m);
182
}
183
184
185
#include "
AsgDataHandles/VarHandleKey.icc
"
186
187
#endif
188
189
#endif
VarHandleKey.icc
StatusCode.h
VarHandleKey.h
A property holding a SG store/key/clid from which a VarHandle is made.
SG::VarHandleBase
Base class for VarHandle types.
Definition
StoreGate/StoreGate/VarHandleBase.h:83
SG::VarHandleKey
A property holding a SG store/key/clid from which a VarHandle is made.
Definition
StoreGate/StoreGate/VarHandleKey.h:59
SG::VarHandleKey::isEventStore
bool isEventStore() const
Does this key reference the primary event store?
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition
AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
SG::VarHandleKey::assign
virtual StatusCode assign(const std::string &sgkey)
Change the key of the object to which we're referring.
Definition
AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:88
SG::VarHandleKey::m_sgKey
std::string m_sgKey
StoreGate key, that doesn't include the storename.
Definition
StoreGate/StoreGate/VarHandleKey.h:246
SG::VarHandleKey::m_isEventStore
bool m_isEventStore
Cache test for whether we're referencing the event store.
Definition
StoreGate/StoreGate/VarHandleKey.h:252
SG::VarHandleKey::VarHandleKey
VarHandleKey(CLID clid, const std::string &sgkey, Gaudi::DataHandle::Mode a, const std::string &storeName=StoreID::storeName(StoreID::EVENT_STORE), bool isCond=false)
Constructor.
Definition
AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:38
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition
AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
SG::VarHandleKey::empty
bool empty() const
Test if the key is blank.
Definition
AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:150
SG
Forward declaration.
Definition
CaloCellPacker_400_500.h:32
SG::AllowEmptyEnum
AllowEmptyEnum
Definition
StoreGate/StoreGate/VarHandleKey.h:26
SG::AllowEmpty
@ AllowEmpty
Definition
StoreGate/StoreGate/VarHandleKey.h:27
SG::operator<<
std::ostream & operator<<(std::ostream &os, const ArenaAllocatorBase::Stats::Stat &stat)
Format a statistic structure.
Definition
ArenaAllocatorBase.cxx:61
private
#define private
Definition
testRead.cxx:27
Generated on
for ATLAS Offline Software by
1.17.0