| The Gaudi Framework v27r1

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

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

Public Member Functions | Public Attributes | List of all members
GaudiKernel.Configurable.PropertyReference Class Reference

Allow references to options as in old style. More...

Inheritance diagram for GaudiKernel.Configurable.PropertyReference:
[legend]
Collaboration diagram for GaudiKernel.Configurable.PropertyReference:
[legend]

## Public Member Functions
def | __init__ (self, propname)
def | __repr__ (self)
def | __resolve__ (self)
def | getFullName (self)

## Public Attributes
| name

## Detailed Description

Allow references to options as in old style.

Definition at line 58 of file Configurable.py.

## Constructor & Destructor Documentation

def GaudiKernel.Configurable.PropertyReference.__init__ | ( |  | self,
|  |  | propname
| ) |  |

Definition at line 59 of file Configurable.py.

59 def __init__(self,propname):
60 self.name = propname
GaudiKernel.Configurable.PropertyReference.__init__
def __init__(self, propname)
Definition: Configurable.py:59
GaudiKernel.Configurable.PropertyReference.name
name
Definition: Configurable.py:60

## Member Function Documentation

def GaudiKernel.Configurable.PropertyReference.__repr__ | ( |  | self | ) |

Definition at line 61 of file Configurable.py.

61 def __repr__(self):
62 return "@%s"%self.name
GaudiKernel.Configurable.PropertyReference.name
name
Definition: Configurable.py:60
GaudiKernel.Configurable.PropertyReference.__repr__
def __repr__(self)
Definition: Configurable.py:61

def GaudiKernel.Configurable.PropertyReference.__resolve__ | ( |  | self | ) |

Definition at line 63 of file Configurable.py.

63 def __resolve__(self):
64 # late binding for property references
65 retval = None
66 refname, refprop = self.name.rsplit('.',1)
67 if refname in Configurable.allConfigurables:
68 conf = Configurable.allConfigurables[refname]
69 retval = getattr(conf,refprop)
70 if hasattr(retval,"getFullName"):
71 retval = retval.getFullName()
72 else:
73 raise NameError("name '%s' not found resolving '%s'"%(refname,self))
74 return retval
GaudiKernel.Configurable.PropertyReference.__resolve__
def __resolve__(self)
Definition: Configurable.py:63

def GaudiKernel.Configurable.PropertyReference.getFullName | ( |  | self | ) |

    This function allow transparent integration with
    Configurable.getValuedProperties.

Definition at line 75 of file Configurable.py.

75 def getFullName(self):
76 """This function allow transparent integration with
77 Configurable.getValuedProperties.
78 """
79 try:
80 return self.__resolve__()
81 except NameError:
82 # ignore the error if we cannot resolve the name yet
83 return self
84 except AttributeError:
85 # ignore the error if we cannot resolve the attribute yet
86 return self
87
GaudiKernel.Configurable.PropertyReference.__resolve__
def __resolve__(self)
Definition: Configurable.py:63
GaudiKernel.Configurable.PropertyReference.getFullName
def getFullName(self)
Definition: Configurable.py:75

## Member Data Documentation

GaudiKernel.Configurable.PropertyReference.name

Definition at line 60 of file Configurable.py.

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

- GaudiKernel/python/GaudiKernel/Configurable.py