The Gaudi Framework  v36r10 (fc05264c)
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 241 of file Bindings.py.

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 244 of file Bindings.py.

244  def __init__(self, prop):
245  self._type = type(prop).__name__
246  self.__doc__ = " --- Property type is " + self.ptype()
247 
248  if issubclass(type(prop), GaudiHandleProperty):
249  self._value = prop.value() # do nothing for ATLAS' handles
250  elif issubclass(type(prop), GaudiHandleArrayProperty):
251  self._value = prop.value() # do nothing for ATLAS' handles
252  else:
253  # for all other types try to extract the native python type
254  try:
255  self._value = eval(prop.toString(), {}, {})
256  except:
257  if hasattr(prop, "value"):
258  self._value = prop.value()
259  else:
260  self._value = prop.toString()
261 
262  self.__doc__ += " --- Default value = " + str(self._value) + " --- "
263  if prop.documentation() != "none":
264  self.__doc__ = prop.documentation() + "\\n" + self.__doc__
265  # keep the original property
266  self._property = prop # property itself
267 

Member Function Documentation

◆ documentation()

def GaudiPython.Bindings.PropertyEntry.documentation (   self)

Definition at line 278 of file Bindings.py.

278  def documentation(self):
279  return self.__doc__
280 

◆ hasDoc()

def GaudiPython.Bindings.PropertyEntry.hasDoc (   self)

Definition at line 281 of file Bindings.py.

281  def hasDoc(self):
282  return len(self.__doc__) > 0 and self.__doc__ != "none"
283 
284 
285 # ----iProperty class----------------------------------------------------------
286 
287 

◆ property()

def GaudiPython.Bindings.PropertyEntry.property (   self)

Definition at line 274 of file Bindings.py.

274  def property(self):
275  "Return the underlying property itself"
276  return self._property
277 

◆ ptype()

def GaudiPython.Bindings.PropertyEntry.ptype (   self)

Definition at line 271 of file Bindings.py.

271  def ptype(self):
272  return self._type
273 

◆ value()

def GaudiPython.Bindings.PropertyEntry.value (   self)

Definition at line 268 of file Bindings.py.

268  def value(self):
269  return self._value
270 

Member Data Documentation

◆ __doc__

GaudiPython.Bindings.PropertyEntry.__doc__
private

Definition at line 246 of file Bindings.py.

◆ _property

GaudiPython.Bindings.PropertyEntry._property
private

Definition at line 266 of file Bindings.py.

◆ _type

GaudiPython.Bindings.PropertyEntry._type
private

Definition at line 245 of file Bindings.py.

◆ _value

GaudiPython.Bindings.PropertyEntry._value
private

Definition at line 249 of file Bindings.py.


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