ATLAS Offline Software
Loading...
Searching...
No Matches
StoreGate/StoreGate/VarHandleKey.icc
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4/**
5 * @file StoreGate/VarHandleKey.icc
6 * @author scott snyder <snyder@bnl.gov>
7 * @date Nov, 2017
8 * @brief A property holding a SG store/key/clid from which a VarHandle is made.
9 */
10
11
12namespace SG {
13
14
15/**
16 * @brief Return handle to the referenced store.
17 */
18inline
19const ServiceHandle<IProxyDict>& VarHandleKey::storeHandle() const
20{
21 return m_storeHandle;
22}
23
24
25/**
26 * @brief Return the VarHandle that owns this key, if any.
27 *
28 * This should only be non-null for keys that are created automatically
29 * by a VarHandle when it is _not_ created from a VarHandleKey.
30 * This should always be null for keys that are created explicitly.
31 */
32inline
33VarHandleBase* VarHandleKey::owningHandle()
34{
35 return m_owningHandle;
36}
37
38
39/**
40 * @brief Set the owning handle. Only callable from VarHandleBase.
41 */
42inline
43void VarHandleKey::setOwningHandle (VarHandleBase* handle)
44{
45 m_owningHandle = handle;
46}
47
48
49/**
50 * @brief Does this key reference the primary event store?
51 */
52inline
53bool VarHandleKey::isEventStore() const
54{
55 return m_isEventStore;
56}
57
58
59/**
60 * @brief Called by the owning algorithm during the START transition.
61 *
62 * AthAlgorithm and friends will call this during START. This allows
63 * for extra initialization that we can't do during initialize(), such
64 * as retrieving a conditions container from the store.
65 *
66 * The default implementation is a no-op.
67 */
68inline
69StatusCode VarHandleKey::start()
70{
71 return StatusCode::SUCCESS;
72}
73
74/**
75 * @brief Return the hashed StoreGate key.
76 *
77 * May be 0 if not yet initialized.
78 */
79inline
80SG::sgkey_t VarHandleKey::hashedKey() const
81{
82 return m_hashedKey;
83}
84
85
86/**
87 * @brief Return the StoreGate ID for the referenced object.
88 */
89inline const std::string& VarHandleKey::key() const
90{
91 return m_sgKey;
92}
93
94
95/**
96 * @brief Test if the key is blank.
97 */
98inline bool VarHandleKey::empty() const
99{
100 return m_sgKey.empty();
101}
102
103
104
105} // namespace SG