ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
AthToolSupport
AsgDataHandles
Root
AthToolSupport/AsgDataHandles/Root/VarHandleBase.cxx
Go to the documentation of this file.
1
2
3
/*
4
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
5
*/
6
7
// VarHandleBase.cxx
8
// Implementation file for class VarHandleBase
9
// Author: Nils Krumnack <Nils.Erik.Krumnack@cern.ch>
10
// Author: Paolo Calafiura (for original)
11
// Author: S.Binet<binet@cern.ch> (for original)
13
14
#include "
AsgDataHandles/VarHandleBase.h
"
15
#include "
AsgDataHandles/VarHandleKey.h
"
16
17
// #include "AsgDataHandles/exceptions.h"
18
19
// #include <algorithm>
20
#include <sstream>
21
22
23
namespace
SG
{
24
25
30
VarHandleBase::VarHandleBase
(
const
std::string& sgkey) :
31
m_ownedKey (std::make_unique<
VarHandleKey
> (
sgkey
)),
32
m_key (m_ownedKey.
get
())
33
{
34
}
35
36
45
VarHandleBase::VarHandleBase
(
const
VarHandleKey
&
key
,
46
const
EventContext*
/*ctx*/
)
47
:
m_key
(&
key
)
48
{
49
}
50
51
52
53
//*************************************************************************
54
// Accessors
55
//
56
57
64
const
std::string&
VarHandleBase::key
()
const
65
{
66
return
m_key
->key();
67
}
68
69
75
const
std::string&
VarHandleBase::name
()
const
76
{
77
return
this->
key
();
78
}
79
80
81
// /**
82
// * @brief Return the name of the store holding the object we are proxying.
83
// */
84
// std::string VarHandleBase::store() const
85
// {
86
// if (m_store)
87
// return m_store->name();
88
// return this->storeHandle().name();
89
// }
90
91
92
//*************************************************************************
93
// Protected methods.
94
//
95
96
97
//*************************************************************************
98
// Free functions.
99
//
100
101
107
std::ostream&
operator<<
( std::ostream& out,
const
VarHandleBase
& o )
108
{
109
out <<
"VarHandleBase @"
<< &o
110
// << " store=" <<o.store()
111
<<
", key="
<<o.
key
();
112
return
out;
113
}
114
115
119
bool
operator==
(
const
VarHandleBase
& l,
const
VarHandleBase
&
r
)
120
{
121
return
(l.name() ==
r
.name());
// &&
122
// l.store() == r.store());
123
}
124
125
129
bool
operator!=
(
const
VarHandleBase
& l,
const
VarHandleBase
&
r
)
130
{
131
return
!(l==
r
);
132
}
133
134
135
}
/* namespace SG */
VarHandleBase.h
Base class for VarHandle classes.
VarHandleKey.h
A property holding a SG store/key/clid from which a VarHandle is made.
SG::VarHandleBase
Base class for VarHandle types.
Definition
StoreGate/StoreGate/VarHandleBase.h:83
SG::VarHandleBase::VarHandleBase
VarHandleBase(CLID clid, Gaudi::DataHandle::Mode mode)
Constructor with default key.
Definition
StoreGate/src/VarHandleBase.cxx:113
SG::VarHandleBase::key
virtual const std::string & key() const override final
Return the StoreGate ID for the referenced object.
Definition
AthToolSupport/AsgDataHandles/Root/VarHandleBase.cxx:64
SG::VarHandleBase::m_key
const VarHandleKey * m_key
The associated key object.
Definition
StoreGate/StoreGate/VarHandleBase.h:525
SG::VarHandleBase::name
const std::string & name() const
Return the StoreGate ID for the referenced object.
Definition
AthToolSupport/AsgDataHandles/Root/VarHandleBase.cxx:75
SG::VarHandleKey
A property holding a SG store/key/clid from which a VarHandle is made.
Definition
StoreGate/StoreGate/VarHandleKey.h:59
r
int r
Definition
globals.cxx:22
SG
Forward declaration.
Definition
CaloCellPacker_400_500.h:32
SG::operator==
bool operator==(const VarHandleBase &l, const VarHandleBase &r)
Equality comparison.
Definition
AthToolSupport/AsgDataHandles/Root/VarHandleBase.cxx:119
SG::operator!=
bool operator!=(const VarHandleBase &l, const VarHandleBase &r)
Inequality comparison.
Definition
AthToolSupport/AsgDataHandles/Root/VarHandleBase.cxx:129
SG::operator<<
std::ostream & operator<<(std::ostream &os, const ArenaAllocatorBase::Stats::Stat &stat)
Format a statistic structure.
Definition
ArenaAllocatorBase.cxx:61
SG::get
const T * get(const ReadCondHandleKey< T > &key, const EventContext &ctx)
Convenience function to retrieve an object given a ReadCondHandleKey.
Definition
ReadCondHandle.h:282
common.sgkey
sgkey(tool)
Definition
common.py:1027
Generated on
for ATLAS Offline Software by
1.17.0