The Gaudi Framework  v36r1 (3e2fb5a8)
GaudiPython.Bindings.PropertyEntry Class Reference
Inheritance diagram for GaudiPython.Bindings.PropertyEntry:
Collaboration diagram for GaudiPython.Bindings.PropertyEntry:

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 213 of file Bindings.py.

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 216 of file Bindings.py.

216  def __init__(self, prop):
217  self._type = type(prop).__name__
218  self.__doc__ = " --- Property type is " + self.ptype()
219 
220  if issubclass(type(prop), GaudiHandleProperty):
221  self._value = prop.value() # do nothing for ATLAS' handles
222  elif issubclass(type(prop), GaudiHandleArrayProperty):
223  self._value = prop.value() # do nothing for ATLAS' handles
224  else:
225  # for all other types try to extract the native python type
226  try:
227  self._value = eval(prop.toString(), {}, {})
228  except:
229  if hasattr(prop, 'value'):
230  self._value = prop.value()
231  else:
232  self._value = prop.toString()
233 
234  self.__doc__ += " --- Default value = " + str(self._value) + " --- "
235  if prop.documentation() != 'none':
236  self.__doc__ = prop.documentation() + '\\n' + self.__doc__
237  # keep the original property
238  self._property = prop # property itself
239 

Member Function Documentation

◆ documentation()

def GaudiPython.Bindings.PropertyEntry.documentation (   self)

Definition at line 250 of file Bindings.py.

250  def documentation(self):
251  return self.__doc__
252 

◆ hasDoc()

def GaudiPython.Bindings.PropertyEntry.hasDoc (   self)

Definition at line 253 of file Bindings.py.

253  def hasDoc(self):
254  return len(self.__doc__) > 0 and self.__doc__ != 'none'
255 
256 
257 # ----iProperty class----------------------------------------------------------
258 
259 

◆ property()

def GaudiPython.Bindings.PropertyEntry.property (   self)

Definition at line 246 of file Bindings.py.

246  def property(self):
247  "Return the underlying property itself "
248  return self._property
249 

◆ ptype()

def GaudiPython.Bindings.PropertyEntry.ptype (   self)

Definition at line 243 of file Bindings.py.

243  def ptype(self):
244  return self._type
245 

◆ value()

def GaudiPython.Bindings.PropertyEntry.value (   self)

Definition at line 240 of file Bindings.py.

240  def value(self):
241  return self._value
242 

Member Data Documentation

◆ __doc__

GaudiPython.Bindings.PropertyEntry.__doc__
private

Definition at line 218 of file Bindings.py.

◆ _property

GaudiPython.Bindings.PropertyEntry._property
private

Definition at line 238 of file Bindings.py.

◆ _type

GaudiPython.Bindings.PropertyEntry._type
private

Definition at line 217 of file Bindings.py.

◆ _value

GaudiPython.Bindings.PropertyEntry._value
private

Definition at line 221 of file Bindings.py.


The documentation for this class was generated from the following file:
gaudirun.type
type
Definition: gaudirun.py:154