ATLAS Offline Software
Loading...
Searching...
No Matches
VarHandleProperty.h
Go to the documentation of this file.
1
2
3/*
4 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
5*/
6
7// VarHandleProperty.h
8// Header file for class VarHandleProperty
9// Author: S.Binet<binet@cern.ch>
11#ifndef STOREGATE_VARHANDLEPROPERTY_H
12#define STOREGATE_VARHANDLEPROPERTY_H 1
13
18
21
22
23// ** Specializations of SimplePropertyRef for the VarHandle classes.
24
25namespace Gaudi {
26template<>
27 class Property<SG::VarHandleBase&> : public SG::VarHandleKeyProperty {
28public:
29 Property(const std::string& name, SG::VarHandleBase& value) :
30 SG::VarHandleKeyProperty(name, value.vhKey()) {}
31 virtual ~Property() {}
32};
33
34template<typename T>
35 class Property<SG::ReadHandle<T>&> : public SG::VarHandleKeyProperty {
36public:
37 Property(const std::string& name, SG::ReadHandle<T>& value) :
38 SG::VarHandleKeyProperty(name, value.vhKey()) {}
39 virtual ~Property() {}
40};
41
42template<typename T>
43 class Property<SG::WriteHandle<T>&> : public SG::VarHandleKeyProperty {
44public:
45 Property(const std::string& name, SG::WriteHandle<T>& value) :
46 SG::VarHandleKeyProperty(name, value.vhKey()) {}
47 virtual ~Property() {}
48};
49
50template<typename T>
51 class Property<SG::UpdateHandle<T>&> : public SG::VarHandleKeyProperty {
52public:
53 Property(const std::string& name, SG::UpdateHandle<T>& value) :
54 SG::VarHandleKeyProperty(name, value.vhKey()) {}
55 virtual ~Property() {}
56};
57
58
59template<typename T>
60 class Property<SG::ReadCondHandle<T>&> : public SG::VarHandleKeyProperty {
61public:
62 Property(const std::string& name, SG::ReadCondHandle<T>& value) :
63 SG::VarHandleKeyProperty(name, value.vhKey()) {}
64 virtual ~Property() {}
65};
66
67template<typename T>
68 class Property<SG::WriteCondHandle<T>&> : public SG::VarHandleKeyProperty {
69public:
70 Property(const std::string& name, SG::WriteCondHandle<T>& value) :
72 virtual ~Property() {}
73};
74
75
76}
77
78// template<>
79// class SimplePropertyRef< SG::VarHandleBase > :
80// public SG::VarHandleKeyProperty
81// {
82// public:
83// SimplePropertyRef(const std::string& name, SG::VarHandleBase& value) :
84// SG::VarHandleKeyProperty(name, value) {}
85// };
86
87
88// template<typename T>
89// class SimplePropertyRef< SG::ReadHandle<T> > :
90// public SG::VarHandleKeyProperty
91// {
92// public:
93// SimplePropertyRef(const std::string& name, SG::ReadHandle<T>& value) :
94// SG::VarHandleKeyProperty(name, value) {}
95// };
96
97
98// template<typename T>
99// class SimplePropertyRef< SG::UpdateHandle<T> > :
100// public SG::VarHandleKeyProperty
101// {
102// public:
103// SimplePropertyRef( const std::string& name, SG::UpdateHandle<T>& value ) :
104// SG::VarHandleKeyProperty(name, value) {}
105// };
106
107
108// template<typename T>
109// class SimplePropertyRef< SG::WriteHandle<T> > :
110// public SG::VarHandleKeyProperty
111// {
112// public:
113// SimplePropertyRef( const std::string& name, SG::WriteHandle<T>& value ) :
114// SG::VarHandleKeyProperty(name, value) {}
115// };
116
117// template<typename T>
118// class SimplePropertyRef< SG::ReadCondHandle<T> > :
119// public SG::VarHandleKeyProperty
120// {
121// public:
122// SimplePropertyRef(const std::string& name, SG::ReadCondHandle<T>& value) :
123// SG::VarHandleKeyProperty(name, value) {}
124// };
125
126// template<typename T>
127// class SimplePropertyRef< SG::WriteCondHandle<T> > :
128// public SG::VarHandleKeyProperty
129// {
130// public:
131// SimplePropertyRef(const std::string& name, SG::WriteCondHandle<T>& value) :
132// SG::VarHandleKeyProperty(name, value) {}
133// };
134
135
136#endif /* !STOREGATE_VARHANDLEPROPERTY_H */
137
Handle class for reading from StoreGate.
Handle class for recording to StoreGate.
Handle class for modifying an existing object in StoreGate.
Handle Gaudi property setting for VarHandleKey.
Property(const std::string &name, SG::ReadCondHandle< T > &value)
Property(const std::string &name, SG::ReadHandle< T > &value)
Property(const std::string &name, SG::UpdateHandle< T > &value)
Property(const std::string &name, SG::VarHandleBase &value)
Property(const std::string &name, SG::WriteCondHandle< T > &value)
Property(const std::string &name, SG::WriteHandle< T > &value)
Base class for VarHandle types.
VarHandleKeyProperty is the class which wraps a SG::VarHandleKey.
VarHandleKeyProperty(const std::string &name, SG::VarHandleKey &ref)
Constructor with parameters.
const SG::VarHandleKey & value() const
Return the value object for this Property.
=============================================================================
Forward declaration.