| The Gaudi Framework v32r1 (f65d50dc)

Public Member Functions | Private Attributes | List of all members
GaudiPython.Bindings.PropertyEntry Class Reference
Inheritance diagram for GaudiPython.Bindings.PropertyEntry:
[legend]
Collaboration diagram for GaudiPython.Bindings.PropertyEntry:
[legend]

## Public Member Functions
def | __init__ (self, prop)
def | value (self)
def | ptype (self)
def | property (self)
def | documentation (self)
def | hasDoc (self)

## Private Attributes
| _type
| __doc__
| _value
| _property

## Detailed Description

    holds the value and the documentation string of a property

Definition at line 183 of file Bindings.py.

## Constructor & Destructor Documentation

## ◆ __init__()

def GaudiPython.Bindings.PropertyEntry.__init__ | ( |  | self,
|  |  | prop
| ) |  |

Definition at line 186 of file Bindings.py.

186 def __init__(self, prop):
187 self._type = type(prop).__name__
188 self.__doc__ = " --- Property type is " + self.ptype()
189
190 if issubclass(type(prop), GaudiHandleProperty):
191 self._value = prop.value() # do nothing for ATLAS' handles
192 elif issubclass(type(prop), GaudiHandleArrayProperty):
193 self._value = prop.value() # do nothing for ATLAS' handles
194 else:
195 # for all other types try to extract the native python type
196 try:
197 self._value = eval(prop.toString(), {}, {})
198 except:
199 if hasattr(prop, 'value'):
200 self._value = prop.value()
201 else:
202 self._value = prop.toString()
203
204 self.__doc__ += " --- Default value = " + str(self._value) + " --- "
205 if prop.documentation() != 'none':
206 self.__doc__ = prop.documentation() + '\\n' + self.__doc__
207 # keep the original property
208 self._property = prop # property itself
209
gaudirun.type
type
Definition: gaudirun.py:142

## Member Function Documentation

## ◆ documentation()

def GaudiPython.Bindings.PropertyEntry.documentation | ( |  | self | ) |

Definition at line 220 of file Bindings.py.

220 def documentation(self):
221 return self.__doc__
222

## ◆ hasDoc()

def GaudiPython.Bindings.PropertyEntry.hasDoc | ( |  | self | ) |

Definition at line 223 of file Bindings.py.

223 def hasDoc(self):
224 return len(self.__doc__) > 0 and self.__doc__ != 'none'
225
226
227 # ----iProperty class----------------------------------------------------------
228
229

## ◆ property()

def GaudiPython.Bindings.PropertyEntry.property | ( |  | self | ) |

Definition at line 216 of file Bindings.py.

216 def property(self):
217 "Return the underlying property itself "
218 return self._property
219

## ◆ ptype()

def GaudiPython.Bindings.PropertyEntry.ptype | ( |  | self | ) |

Definition at line 213 of file Bindings.py.

213 def ptype(self):
214 return self._type
215

## ◆ value()

def GaudiPython.Bindings.PropertyEntry.value | ( |  | self | ) |

Definition at line 210 of file Bindings.py.

210 def value(self):
211 return self._value
212

## Member Data Documentation

## ◆ __doc__

GaudiPython.Bindings.PropertyEntry.__doc__
| private

Definition at line 188 of file Bindings.py.

## ◆ _property

GaudiPython.Bindings.PropertyEntry._property
| private

Definition at line 208 of file Bindings.py.

## ◆ _type

GaudiPython.Bindings.PropertyEntry._type
| private

Definition at line 187 of file Bindings.py.

## ◆ _value

GaudiPython.Bindings.PropertyEntry._value
| private

Definition at line 191 of file Bindings.py.

The documentation for this class was generated from the following file:

- GaudiPython/python/GaudiPython/Bindings.py