ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
AthLinksSA
Root
ElementLinkBase.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
// Local include(s):
6
#include "AthLinks/ElementLinkBase.h"
7
8
ElementLinkBase::ElementLinkBase
( uint32_t
key
, uint32_t
index
)
9
:
m_persKey
(
key
),
m_persIndex
(
index
),
m_isDirectIO
( false ) {
10
11
}
12
13
uint32_t
ElementLinkBase::persKey
()
const
{
14
15
return
m_persKey
;
16
}
17
18
void
ElementLinkBase::setPersKey
( uint32_t
key
) {
19
20
// Check if we're actually changing anything:
21
if
(
m_persKey
==
key
)
return
;
22
// Store the new key:
23
m_persKey
=
key
;
24
25
// Reset the internal cache:
26
toTransient
();
27
28
return
;
29
}
30
31
uint32_t
ElementLinkBase::persIndex
()
const
{
32
33
return
m_persIndex
;
34
}
35
36
void
ElementLinkBase::setPersIndex
( uint32_t
index
) {
37
38
// Check if we're actually changing anything:
39
if
(
m_persIndex
==
index
)
return
;
40
// Store the new index:
41
m_persIndex
=
index
;
42
43
// Reset the internal cache:
44
toTransient
();
45
46
return
;
47
}
48
49
bool
ElementLinkBase::isDefault
()
const
{
50
return
m_persIndex
==
ElementLinkBase::INVALID
;
51
}
ElementLinkBase::isDefault
bool isDefault() const
Test to see if this link is in the default state.
Definition
ElementLinkBase.cxx:49
ElementLinkBase::m_isDirectIO
bool m_isDirectIO
A transient variable signalling when direct I/O is happening.
Definition
A/AthLinks/ElementLinkBase.h:68
ElementLinkBase::persIndex
stored_index_type persIndex() const
Return the index of the link.
Definition
ElementLinkBase.cxx:31
ElementLinkBase::key
sgkey_t key() const
Return the SG key that we reference, as a hash.
ElementLinkBase::m_persIndex
stored_index_type m_persIndex
The index of the element within the container for this link.
Definition
AthLinks/ElementLinkBase.h:504
ElementLinkBase::persKey
sgkey_t persKey() const
Return the SG key that we reference, as a hash.
Definition
ElementLinkBase.cxx:13
ElementLinkBase::ElementLinkBase
ElementLinkBase()
Default constructor.
ElementLinkBase::INVALID
static const uint32_t INVALID
Value to mark an invalid index.
Definition
AthLinks/ElementLinkBase.h:62
ElementLinkBase::setPersIndex
void setPersIndex(uint32_t index)
Set the index of the referenced object in the container.
Definition
ElementLinkBase.cxx:36
ElementLinkBase::m_persKey
SG::sgkey_t m_persKey
The hashed key for this link.
Definition
AthLinks/ElementLinkBase.h:501
ElementLinkBase::toTransient
virtual bool toTransient()=0
Reset the object's internal cache.
ElementLinkBase::setPersKey
void setPersKey(uint32_t key)
Set the key/identifier of the referenced container.
Definition
ElementLinkBase.cxx:18
index
Definition
index.py:1
Generated on
for ATLAS Offline Software by
1.17.0