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