ATLAS Offline Software
Loading...
Searching...
No Matches
WriteCondHandleKey.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef STOREGATE_WRITECONDHANDLEKEY_H
6#define STOREGATE_WRITECONDHANDLEKEY_H
7
8
10
11#include <concepts>
12
13
14namespace SG {
15
16 template <class T>
17 class WriteCondHandle;
18
19 template <class T>
21 : public CondHandleKey<T>
22 {
23
24 friend class WriteCondHandle<T>;
25
26 public:
27
33 WriteCondHandleKey(const std::string& key, const std::string& dbKey) :
35 {}
36
43 explicit WriteCondHandleKey(const std::string& key) :
44 CondHandleKey<T>(key, key, Gaudi::DataHandle::Writer)
45 {}
46
47
60 template <std::derived_from<IProperty> OWNER>
61 inline WriteCondHandleKey( OWNER* owner,
62 std::string name,
63 const std::string& key={},
64 std::string doc="") :
66 auto p = owner->declareProperty(std::move(name), *this, std::move(doc));
67 p->template setOwnerType<OWNER>();
68 }
69
70
79 inline WriteCondHandleKey& operator= (const std::string& sgkey) {
81 return *this;
82 }
83
84 };
85
86} // namespace SG
87
88#endif
an iterator over instances of a given type in StoreGateSvc.
Definition DataHandle.h:43
CondHandleKey(const std::string &key, const std::string &dbKey, Gaudi::DataHandle::Mode a)
VarHandleKey & operator=(const std::string &sgkey)
Change the key of the object to which we're referring.
WriteCondHandleKey(OWNER *owner, std::string name, const std::string &key={}, std::string doc="")
auto-declaring Property Constructor.
WriteCondHandleKey(const std::string &key)
Constructor for WriteCondHandle that takes just a SG key @key StoreGate key.
WriteCondHandleKey & operator=(const std::string &sgkey)
Change the key of the object to which we're referring.
WriteCondHandleKey(const std::string &key, const std::string &dbKey)
Constructor for WriteCondHandle @key StoreGate key @dbKey key in the database.
=============================================================================
Forward declaration.