ATLAS Offline Software
VarHandleKeyArrayProperty.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef STOREGATE_VARHANDLEKEYARRAYPROPERTY
6 #define STOREGATE_VARHANDLEKEYARRAYPROPERTY 1
7 
18 #include "Gaudi/Property.h"
19 #include <iostream>
20 
21 namespace Gaudi {
22  namespace Parsers {
23  StatusCode parse(SG::VarHandleKeyArray& v, const std::string& s);
24  }
25 
26  namespace Utils {
27  std::ostream& toStream(const SG::VarHandleKeyArray& v, std::ostream& o);
28  }
29 }
30 
31 namespace SG {
32 
34  : public ::PropertyWithHandlers <>
35  {
36  public:
37 
38  VarHandleKeyArrayProperty( const std::string& name,
40 
42 
43  VarHandleKeyArrayProperty* clone() const override;
44 
45  bool load( Gaudi::Details::PropertyBase& destination ) const override;
46 
47  bool assign( const Gaudi::Details::PropertyBase& source ) override;
48 
49  std::string toString() const override;
50 
51  void toStream(std::ostream& out) const override;
52 
53  StatusCode fromString(const std::string& s) override;
54 
55  const SG::VarHandleKeyArray& value() const;
56 
57  bool setValue( const SG::VarHandleKeyArray& value );
58 
59 
60  private:
65  };
66 
67 
68 } // namespace SG
69 
70 namespace Gaudi {
71 template<>
72  class Property<SG::VarHandleKeyArray&> : public SG::VarHandleKeyArrayProperty
73 {
74 public:
75  Property(const std::string& name, SG::VarHandleKeyArray& value) :
76  SG::VarHandleKeyArrayProperty(name, value) {}
77  virtual ~Property() {}
78 };
79 
80 template<typename T>
82 {
83 public:
84  Property(const std::string& name, SG::ReadHandleKeyArray<T>& value) :
85  SG::VarHandleKeyArrayProperty(name, value) {}
86  virtual ~Property() {}
87 };
88 
89 template<typename T>
91 {
92 public:
93  Property(const std::string& name, SG::WriteHandleKeyArray<T>& value) :
94  SG::VarHandleKeyArrayProperty(name, value) {}
95  virtual ~Property() {}
96 };
97 
98 }
99 
100 
101 
102 
103 #endif
ReadHandleKeyArray.h
SG::VarHandleKeyArrayProperty::setValue
bool setValue(const SG::VarHandleKeyArray &value)
Set the value object for this Property.
Definition: VarHandleKeyArrayProperty.cxx:147
SG::VarHandleKeyArrayProperty::VarHandleKeyArrayProperty
VarHandleKeyArrayProperty(const std::string &name, SG::VarHandleKeyArray &ref)
Constructor with parameters.
Definition: VarHandleKeyArrayProperty.cxx:21
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
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
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::VarHandleKeyArrayProperty::clone
VarHandleKeyArrayProperty * clone() const override
Return a new copy of this Property object.
Definition: VarHandleKeyArrayProperty.cxx:50
SG::VarHandleKeyArrayProperty::assign
bool assign(const Gaudi::Details::PropertyBase &source) override
Set the value of this Property from another.
Definition: VarHandleKeyArrayProperty.cxx:80
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
VarHandleKeyArray.h
Base class for VarHandleKeyArray for reading from StoreGate.
athena.value
value
Definition: athena.py:124
SG::HandleKeyArray
Definition: StoreGate/StoreGate/HandleKeyArray.h:38
SG::VarHandleKeyArrayProperty::toString
std::string toString() const override
Return a string representation of the value object.
Definition: VarHandleKeyArrayProperty.cxx:90
Gaudi::Property< SG::VarHandleKeyArray & >::~Property
virtual ~Property()
Definition: VarHandleKeyArrayProperty.h:77
Property
Support class for PropertyMgr.
Definition: Property.h:23
Gaudi::Property< SG::WriteHandleKeyArray< T > & >::Property
Property(const std::string &name, SG::WriteHandleKeyArray< T > &value)
Definition: VarHandleKeyArrayProperty.h:93
SG::VarHandleKeyArrayProperty::value
const SG::VarHandleKeyArray & value() const
Return the value object for this Property.
Definition: VarHandleKeyArrayProperty.cxx:133
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
SG::ReadHandleKeyArray
HandleKeyArray< ReadHandle< T >, ReadHandleKey< T >, Gaudi::DataHandle::Reader > ReadHandleKeyArray
Definition: StoreGate/StoreGate/ReadHandleKeyArray.h:32
SG::VarHandleKeyArrayProperty::load
bool load(Gaudi::Details::PropertyBase &destination) const override
Set the value of another Property.
Definition: VarHandleKeyArrayProperty.cxx:65
SG::VarHandleKeyArrayProperty
Definition: VarHandleKeyArrayProperty.h:35
SG::VarHandleKeyArrayProperty::m_pValue
SG::VarHandleKeyArray * m_pValue
Pointer to the real property.
Definition: VarHandleKeyArrayProperty.h:64
WriteHandleKeyArray.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
Gaudi::Property< SG::WriteHandleKeyArray< T > & >::~Property
virtual ~Property()
Definition: VarHandleKeyArrayProperty.h:95
SG::VarHandleKeyArrayProperty::operator=
VarHandleKeyArrayProperty & operator=(const SG::VarHandleKeyArray &value)
Assignment operator.
Definition: VarHandleKeyArrayProperty.cxx:36
python.PyAthena.v
v
Definition: PyAthena.py:154
SG::VarHandleKeyArrayProperty::toStream
void toStream(std::ostream &out) const override
Write a string representation of the value object to a stream.
Definition: VarHandleKeyArrayProperty.cxx:104
SG::VarHandleKeyArrayProperty::fromString
StatusCode fromString(const std::string &s) override
Set this value object from a string.
Definition: VarHandleKeyArrayProperty.cxx:118
ref
const boost::regex ref(r_ef)
Gaudi
=============================================================================
Definition: CaloGPUClusterAndCellDataMonitorOptions.h:273
Gaudi::Property< SG::ReadHandleKeyArray< T > & >::Property
Property(const std::string &name, SG::ReadHandleKeyArray< T > &value)
Definition: VarHandleKeyArrayProperty.h:84
copySelective.source
string source
Definition: copySelective.py:32
Utils
Definition: CaloCellSelectorUtils.cxx:10
Gaudi::Property< SG::ReadHandleKeyArray< T > & >::~Property
virtual ~Property()
Definition: VarHandleKeyArrayProperty.h:86
Gaudi::Property< SG::VarHandleKeyArray & >::Property
Property(const std::string &name, SG::VarHandleKeyArray &value)
Definition: VarHandleKeyArrayProperty.h:75
SG::VarHandleKeyArray
Definition: StoreGate/StoreGate/VarHandleKeyArray.h:28
SG::WriteHandleKeyArray
HandleKeyArray< WriteHandle< T >, WriteHandleKey< T >, Gaudi::DataHandle::Writer > WriteHandleKeyArray
Definition: WriteHandleKeyArray.h:32