The Gaudi Framework  v33r2 (a6f0ec87)
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 211 of file Bindings.py.

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 214 of file Bindings.py.

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

Member Function Documentation

◆ documentation()

def GaudiPython.Bindings.PropertyEntry.documentation (   self)

Definition at line 248 of file Bindings.py.

248  def documentation(self):
249  return self.__doc__
250 

◆ hasDoc()

def GaudiPython.Bindings.PropertyEntry.hasDoc (   self)

Definition at line 251 of file Bindings.py.

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

◆ property()

def GaudiPython.Bindings.PropertyEntry.property (   self)

Definition at line 244 of file Bindings.py.

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

◆ ptype()

def GaudiPython.Bindings.PropertyEntry.ptype (   self)

Definition at line 241 of file Bindings.py.

241  def ptype(self):
242  return self._type
243 

◆ value()

def GaudiPython.Bindings.PropertyEntry.value (   self)

Definition at line 238 of file Bindings.py.

238  def value(self):
239  return self._value
240 

Member Data Documentation

◆ __doc__

GaudiPython.Bindings.PropertyEntry.__doc__
private

Definition at line 216 of file Bindings.py.

◆ _property

GaudiPython.Bindings.PropertyEntry._property
private

Definition at line 236 of file Bindings.py.

◆ _type

GaudiPython.Bindings.PropertyEntry._type
private

Definition at line 215 of file Bindings.py.

◆ _value

GaudiPython.Bindings.PropertyEntry._value
private

Definition at line 219 of file Bindings.py.


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