ATLAS Offline Software
VarHandleKeyProperty.h
Go to the documentation of this file.
1 // This file's extension implies that it's C, but it's really -*- C++ -*-.
2 
3 /*
4  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
5 */
6 
19 #ifndef STOREGATE_VARHANDLEKEYPROPERTY_H
20 #define STOREGATE_VARHANDLEKEYPROPERTY_H
21 
22 
23 #include "StoreGate/VarHandleKey.h"
31 #include "GaudiKernel/DataHandleProperty.h"
32 #include <iostream>
33 
34 namespace Gaudi {
35 namespace Parsers {
36 
37 
47 StatusCode parse(SG::VarHandleKey& v, const std::string& s);
48 
49 } //> ns Parsers
50 
51 namespace Utils {
52 
53 
63 std::ostream& toStream(const SG::VarHandleKey& v, std::ostream& o);
64 
65 } //> ns Utils
66 } //> ns Gaudi
67 
68 
69 namespace SG {
70 
71 
78 class VarHandleKeyProperty : public DataHandleProperty
79 {
80 public:
81 
87  VarHandleKeyProperty( const std::string& name, SG::VarHandleKey& ref );
88 
89 
97 
98 
105  virtual VarHandleKeyProperty* clone() const override;
106 
107 
116  virtual bool load( Gaudi::Details::PropertyBase& destination ) const override;
117 
118 
127  virtual bool assign( const Gaudi::Details::PropertyBase& source ) override;
128 
129 
133  virtual std::string toString() const override;
134 
135 
140  virtual void toStream(std::ostream& out) const override;
141 
142 
149  virtual StatusCode fromString(const std::string& s) override;
150 
151 
155  const SG::VarHandleKey& value() const;
156 
157 
164  bool setValue( const SG::VarHandleKey& value );
165 
166 
167 private:
172 };
173 
174 
175 } // namespace SG
176 
177 
178 // ** Specializations of SimplePropertyRef for the HandleKey classes.
179 
180 namespace Gaudi {
181 
182 
183 template<>
185 public:
186  using ::SG::VarHandleKeyProperty::VarHandleKeyProperty;
187 };
188 
189 
190 template<typename T>
192 public:
193  using ::SG::VarHandleKeyProperty::VarHandleKeyProperty;
194 };
195 
196 
197 template<typename T>
199 public:
200  using ::SG::VarHandleKeyProperty::VarHandleKeyProperty;
201 };
202 
203 
204 template<typename T>
206 public:
207  using ::SG::VarHandleKeyProperty::VarHandleKeyProperty;
208 };
209 
210 
211 template<typename T>
213 public:
214  using ::SG::VarHandleKeyProperty::VarHandleKeyProperty;
215 };
216 
217 
218 template<typename T>
220 public:
221  using ::SG::VarHandleKeyProperty::VarHandleKeyProperty;
222 };
223 
224 
225 template<typename T>
227 public:
228  using ::SG::VarHandleKeyProperty::VarHandleKeyProperty;
229 };
230 
231 
232 template<typename T>
234 public:
235  using ::SG::VarHandleKeyProperty::VarHandleKeyProperty;
236 };
237 
238 
239 } // namespace Gaudi
240 
241 
242 #endif // not STOREGATE_VARHANDLEKEYPROPERTY_H
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
SG::WriteDecorHandleKey
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Definition: StoreGate/StoreGate/WriteDecorHandleKey.h:89
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
ReadDecorHandleKey.h
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
VarHandleKey.h
A property holding a SG store/key/clid from which a VarHandle is made.
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
Gaudi::Parsers::parse
StatusCode parse(std::tuple< Tup... > &tup, const Gaudi::Parsers::InputData &input)
Definition: CaloGPUClusterAndCellDataMonitorOptions.h:284
SG::UpdateHandleKey
Property holding a SG store/key/clid from which an UpdateHandle is made.
Definition: UpdateHandleKey.h:40
Gaudi::Utils::toStream
std::ostream & toStream(const SG::VarHandleKeyArray &v, std::ostream &o)
Gaudi function used to convert a property to a string.
Definition: StoreGate/src/VarHandleKeyArray.cxx:47
SG::VarHandleKeyProperty::assign
virtual bool assign(const Gaudi::Details::PropertyBase &source) override
Set the value of this Property from another.
Definition: VarHandleKeyProperty.cxx:139
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
WriteCondHandleKey.h
SG::VarHandleKeyProperty::load
virtual bool load(Gaudi::Details::PropertyBase &destination) const override
Set the value of another Property.
Definition: VarHandleKeyProperty.cxx:124
SG::VarHandleKeyProperty::m_pValue
SG::VarHandleKey * m_pValue
Pointer to the real property.
Definition: VarHandleKeyProperty.h:171
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
Property
Support class for PropertyMgr.
Definition: Property.h:23
SG::VarHandleKeyProperty::setValue
bool setValue(const SG::VarHandleKey &value)
Set the value object for this Property.
Definition: VarHandleKeyProperty.cxx:206
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition: StoreGate/StoreGate/WriteHandleKey.h:40
WriteDecorHandleKey.h
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ReadCondHandleKey.h
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
UpdateHandleKey.h
Property holding a SG store/key/clid from which an UpdateHandle is made.
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
SG::VarHandleKeyProperty::toStream
virtual void toStream(std::ostream &out) const override
Write a string representation of the value object to a stream.
Definition: VarHandleKeyProperty.cxx:163
SG::VarHandleKey
A property holding a SG store/key/clid from which a VarHandle is made.
Definition: StoreGate/StoreGate/VarHandleKey.h:62
SG::ReadCondHandleKey
Definition: ReadCondHandleKey.h:20
python.PyAthena.v
v
Definition: PyAthena.py:154
SG::VarHandleKeyProperty::VarHandleKeyProperty
VarHandleKeyProperty(const std::string &name, SG::VarHandleKey &ref)
Constructor with parameters.
Definition: VarHandleKeyProperty.cxx:80
ref
const boost::regex ref(r_ef)
SG::VarHandleKeyProperty::value
const SG::VarHandleKey & value() const
Return the value object for this Property.
Definition: VarHandleKeyProperty.cxx:192
Gaudi
=============================================================================
Definition: CaloGPUClusterAndCellDataMonitorOptions.h:273
SG::WriteCondHandleKey
Definition: WriteCondHandleKey.h:20
copySelective.source
string source
Definition: copySelective.py:32
SG::VarHandleKeyProperty::clone
virtual VarHandleKeyProperty * clone() const override
Return a new copy of this Property object.
Definition: VarHandleKeyProperty.cxx:109
SG::ReadDecorHandleKey
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Definition: StoreGate/StoreGate/ReadDecorHandleKey.h:85
Utils
Definition: CaloCellSelectorUtils.cxx:10
SG::VarHandleKeyProperty
VarHandleKeyProperty is the class which wraps a SG::VarHandleKey.
Definition: VarHandleKeyProperty.h:79
SG::VarHandleKeyProperty::fromString
virtual StatusCode fromString(const std::string &s) override
Set this value object from a string.
Definition: VarHandleKeyProperty.cxx:177
SG::VarHandleKeyProperty::operator=
VarHandleKeyProperty & operator=(const SG::VarHandleKey &value)
Assignment operator.
Definition: VarHandleKeyProperty.cxx:95
SG::VarHandleKeyProperty::toString
virtual std::string toString() const override
Return a string representation of the value object.
Definition: VarHandleKeyProperty.cxx:149