| The Gaudi Framework v29r0 (ff2e7097)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | List of all members
GaudiKernel.PropertyProxy.DataObjectHandleBasePropertyProxy Class Reference
Inheritance diagram for GaudiKernel.PropertyProxy.DataObjectHandleBasePropertyProxy:
[legend]
Collaboration diagram for GaudiKernel.PropertyProxy.DataObjectHandleBasePropertyProxy:
[legend]

## Public Member Functions
def | __init__ (self, descr, docString, default)
def | __get__ (self, obj, type=None)
def | __set__ (self, obj, value)
def | convertValueToBeSet (self, obj, value)
Public Member Functions inherited from GaudiKernel.PropertyProxy.PropertyProxy
def | __init__ (self, descr, docString=None, default=None)
def | setDefault (self, value)
def | getDefault (self)
def | fullPropertyName (self, obj)
def | __get__ (self, obj, type=None)
def | __set__ (self, obj, value)
def | __delete__ (self, obj)

## Additional Inherited Members
Public Attributes inherited from GaudiKernel.PropertyProxy.PropertyProxy
| history
| descr
Properties inherited from GaudiKernel.PropertyProxy.PropertyProxy
| default = property(getDefault, setDefault)

## Detailed Description

Definition at line 351 of file PropertyProxy.py.

## Constructor & Destructor Documentation

def GaudiKernel.PropertyProxy.DataObjectHandleBasePropertyProxy.__init__ | ( |  | self,
|  |  | descr,
|  |  | docString,
|  |  | default
| ) |  |

Definition at line 353 of file PropertyProxy.py.

353 def __init__(self, descr, docString, default):
354 PropertyProxy.__init__(self, descr, docString, default)
355
GaudiKernel.PropertyProxy.DataObjectHandleBasePropertyProxy.__init__
def __init__(self, descr, docString, default)
Definition: PropertyProxy.py:353

## Member Function Documentation

def GaudiKernel.PropertyProxy.DataObjectHandleBasePropertyProxy.__get__ | ( |  | self,
|  |  | obj,
|  |  | type = `None`
| ) |  |

Definition at line 356 of file PropertyProxy.py.

356 def __get__(self, obj, type=None):
357 try:
358 return self.descr.__get__(obj, type)
359 except AttributeError:
360 # Get default
361 try:
362 default = obj.__class__.getDefaultProperty(self.descr.__name__)
363 default = self.convertValueToBeSet(obj, default)
364 if default:
365 self.__set__(obj, default)
366 except AttributeError, e:
367 # change type of exception to avoid false error message
368 raise RuntimeError(*e.args)
369
370 return self.descr.__get__(obj, type)
371
GaudiKernel.PropertyProxy.DataObjectHandleBasePropertyProxy.convertValueToBeSet
def convertValueToBeSet(self, obj, value)
Definition: PropertyProxy.py:380
GaudiKernel.PropertyProxy.DataObjectHandleBasePropertyProxy.__get__
def __get__(self, obj, type=None)
Definition: PropertyProxy.py:356
GaudiKernel.PropertyProxy.PropertyProxy.__set__
def __set__(self, obj, value)
Definition: PropertyProxy.py:103

def GaudiKernel.PropertyProxy.DataObjectHandleBasePropertyProxy.__set__ | ( |  | self,
|  |  | obj,
|  |  | value
| ) |  |

Definition at line 372 of file PropertyProxy.py.

372 def __set__(self, obj, value):
373 if not obj._isInSetDefaults() or not obj in self.history:
374 value = self.convertValueToBeSet(obj, value)
375 # assign the value
376 self.descr.__set__(obj, value)
377 log.debug("Setting %s = %r", self.fullPropertyName(obj), value)
378 self.history.setdefault(obj, []).append(value)
379
GaudiKernel.PropertyProxy.PropertyProxy.history
history
Definition: PropertyProxy.py:70
GaudiKernel.PropertyProxy.DataObjectHandleBasePropertyProxy.convertValueToBeSet
def convertValueToBeSet(self, obj, value)
Definition: PropertyProxy.py:380
GaudiKernel.PropertyProxy.DataObjectHandleBasePropertyProxy.__set__
def __set__(self, obj, value)
Definition: PropertyProxy.py:372
GaudiKernel.PropertyProxy.PropertyProxy.fullPropertyName
def fullPropertyName(self, obj)
Definition: PropertyProxy.py:85

def GaudiKernel.PropertyProxy.DataObjectHandleBasePropertyProxy.convertValueToBeSet | ( |  | self,
|  |  | obj,
|  |  | value
| ) |  |

Definition at line 380 of file PropertyProxy.py.

380 def convertValueToBeSet(self, obj, value):
381 if value is None:
382 value = ''
383
384 if type(value) == str:
385 return DataObjectHandleBase(value)
386 elif isinstance(value, DataObjectHandleBase):
387 return DataObjectHandleBase(value.__str__())
388
389
GaudiKernel.PropertyProxy.DataObjectHandleBasePropertyProxy.convertValueToBeSet
def convertValueToBeSet(self, obj, value)
Definition: PropertyProxy.py:380
GaudiKernel.DataObjectHandleBase.DataObjectHandleBase
Definition: DataObjectHandleBase.py:7
gaudirun.type
type
Definition: gaudirun.py:133

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

- GaudiKernel/python/GaudiKernel/PropertyProxy.py