ATLAS Offline Software
Loading...
Searching...
No Matches
StoreGate/StoreGate/ReadDecorHandleKey.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 * Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration.
4 */
12
13
14#ifndef STOREGATE_READDECORHANDLEKEY_H
15#define STOREGATE_READDECORHANDLEKEY_H
16
17
20#include <concepts>
21
22
23namespace SG {
24
25
83template <class T>
85 : public ReadHandleKey<T>
86{
87public:
90
91 constexpr static bool isDecorHandleKey = true;
92
95
96
106 explicit
107 ReadDecorHandleKey (const std::string& key = "",
108 const std::string& storeName = StoreID::storeName(StoreID::EVENT_STORE));
109
119 explicit
121 const std::string& decorKey = "",
122 const std::string& storeName = StoreID::storeName(StoreID::EVENT_STORE));
123
124
138 template <std::derived_from<IProperty> OWNER>
139 ReadDecorHandleKey( OWNER* owner,
140 const std::string& name,
141 const std::string& key = {},
142 const std::string& doc = "");
143
144
155 template <std::derived_from<IProperty> OWNER>
156 ReadDecorHandleKey( OWNER* owner,
157 const std::string& name,
158 const VarHandleKey& contKey,
159 const std::string& decorKey = {},
160 const std::string& doc = "");
161
162
171 ReadDecorHandleKey& operator= (const std::string& sgkey);
172
173
185 virtual StatusCode assign (const std::string& sgkey) override;
186
187
193 CLID clid() const;
194
195
203 StatusCode initialize (bool used = true);
204
205
210
211
212private:
216 virtual std::string pythonRepr() const override;
217
218
221
229 const VarHandleKey* m_contKey{nullptr};
230};
231
232
233} // namespace SG
234
235
237
238
239#endif // not STOREGATE_READDECORHANDLEKEY_H
uint32_t CLID
The Class ID type.
Property holding a SG store/key/clid from which a ReadHandle is made.
Calculate topmost accessible base accessible via SG_BASES.
ReadDecorHandleKey & operator=(const std::string &sgkey)
Change the key of the object to which we're referring.
CLID clid() const
Return the class ID for the referenced object.
const ReadHandleKey< T > & contHandleKey() const
Return the handle key for the container.
SG::TopBase< T >::type topbase_t
Class for which we set the CLID. See above.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
virtual StatusCode assign(const std::string &sgkey) override
Change the key of the object to which we're referring.
ReadDecorHandleKey(OWNER *owner, const std::string &name, const std::string &key={}, const std::string &doc="")
auto-declaring Property Constructor.
ReadDecorHandleKey(const VarHandleKey &contKey, const std::string &decorKey="", const std::string &storeName=StoreID::storeName(StoreID::EVENT_STORE))
Constructor with associated container.
ReadDecorHandleKey(const std::string &key="", const std::string &storeName=StoreID::storeName(StoreID::EVENT_STORE))
Constructor.
virtual std::string pythonRepr() const override
Python representation of Handle.
ReadDecorHandleKey(OWNER *owner, const std::string &name, const VarHandleKey &contKey, const std::string &decorKey={}, const std::string &doc="")
auto-declaring Property Constructor.
ReadHandleKey(const std::string &key="", const std::string &storeName=StoreID::storeName(StoreID::EVENT_STORE))
Constructor.
A property holding a SG store/key/clid from which a VarHandle is made.
@ EVENT_STORE
Definition StoreID.h:26
static const std::string & storeName(const StoreID::type &s)
Definition StoreID.cxx:77
holding In fact this class is here in order to allow STL container for all features This class is sho...
Forward declaration.
typename std::conditional< has_base &&base_has_clid, typename TopBase< Base1 >::type, T >::type type
Definition TopBase.h:50