ATLAS Offline Software
Loading...
Searching...
No Matches
StoreGate/StoreGate/WriteDecorHandleKey.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_WRITEDECORHANDLEKEY_H
15#define STOREGATE_WRITEDECORHANDLEKEY_H
16
17
20#include <concepts>
21
22
23class AthAlgorithm;
25class AthAlgTool;
26
27
28namespace SG {
29
30
87template <class T>
89 : public WriteHandleKey<T>
90{
91public:
93
94
95 constexpr static bool isDecorHandleKey = true;
96
97
107 explicit
108 WriteDecorHandleKey (const std::string& key = "",
109 const std::string& storeName = StoreID::storeName(StoreID::EVENT_STORE));
110
111
121 explicit
123 const std::string& decorKey = "",
124 const std::string& storeName = StoreID::storeName(StoreID::EVENT_STORE));
125
126
140 template <std::derived_from<IProperty> OWNER>
141 WriteDecorHandleKey( OWNER* owner,
142 const std::string& name,
143 const std::string& key = {},
144 const std::string& doc = "");
145
159 template <std::derived_from<IProperty> OWNER>
160 WriteDecorHandleKey( OWNER* owner,
161 const std::string& name,
162 const VarHandleKey& contKey,
163 const std::string& decorKey = {},
164 const std::string& doc = "");
165
166
175 WriteDecorHandleKey& operator= (const std::string& sgkey);
176
177
189 virtual StatusCode assign (const std::string& sgkey) override;
190
191
199 StatusCode initialize (bool used = true);
200
201
212
213
218
219
228 void renounce();
229
230
234 bool renounced() const;
235
236
237private:
238 friend class ::AthAlgorithm;
239 friend class ::AthReentrantAlgorithm;
240 friend class ::AthAlgTool;
241
245 virtual std::string pythonRepr() const override;
246
253
256
258 const VarHandleKey* m_contKey = nullptr;
259
262 bool m_renounced = false;
263};
264
265
266} // namespace SG
267
268
270
271
272#endif // not STOREGATE_WRITEDECORHANDLEKEY_H
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
Base class from which non-reentrant (not thread-safe) Athena algorithm classes should be derived.
An algorithm that can be simultaneously executed in multiple threads.
Property holding a SG store/key/clid from which a ReadHandle is made.
A property holding a SG store/key/clid from which a VarHandle is made.
WriteDecorHandleKey(const std::string &key="", const std::string &storeName=StoreID::storeName(StoreID::EVENT_STORE))
Constructor.
WriteDecorHandleKey(OWNER *owner, const std::string &name, const VarHandleKey &contKey, const std::string &decorKey={}, const std::string &doc="")
auto-declaring Property Constructor.
WriteDecorHandleKey & operator=(const std::string &sgkey)
Change the key of the object to which we're referring.
ReadHandleKey< T > & contHandleKey_nc()
Return the handle key for the container.
StatusCode initialize(AllowEmptyEnum)
If this object is used as a property, then this should be called during the initialize phase.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
WriteDecorHandleKey(OWNER *owner, const std::string &name, const std::string &key={}, const std::string &doc="")
auto-declaring Property Constructor.
bool renounced() const
Return the renounced flag.
virtual std::string pythonRepr() const override
Python representation of Handle.
void renounce()
Declare that this item does not participate in scheduling.
const ReadHandleKey< T > & contHandleKey() const
Return the handle key for the container.
WriteDecorHandleKey(const VarHandleKey &contKey, const std::string &decorKey="", const std::string &storeName=StoreID::storeName(StoreID::EVENT_STORE))
Constructor with associated container.
virtual StatusCode assign(const std::string &sgkey) override
Change the key of the object to which we're referring.
WriteHandleKey(const std::string &key="", const std::string &storeName=StoreID::storeName(StoreID::EVENT_STORE))
Constructor.
@ 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.