| The Gaudi Framework v28r2p1 (f1a77ff4)

- 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 | __str__ (self)
def | __resolve__ (self)
def | getFullName (self)

## Public Attributes
| name

## Detailed Description

Allow references to options as in old style.

Definition at line 63 of file Configurable.py.

## Constructor & Destructor Documentation

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

Definition at line 64 of file Configurable.py.

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

## Member Function Documentation

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

Definition at line 68 of file Configurable.py.

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

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

Definition at line 66 of file Configurable.py.

66 def __str__(self):
67 return "@%s"%self.name
GaudiKernel.Configurable.PropertyReference.__str__
def __str__(self)
Definition: Configurable.py:66
GaudiKernel.Configurable.PropertyReference.name
name
Definition: Configurable.py:65

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

    This function allow transparent integration with
    Configurable.getValuedProperties.

Definition at line 80 of file Configurable.py.

80 def getFullName(self):
81 """This function allow transparent integration with
82 Configurable.getValuedProperties.
83 """
84 try:
85 return self.__resolve__()
86 except NameError:
87 # ignore the error if we cannot resolve the name yet
88 return self
89 except AttributeError:
90 # ignore the error if we cannot resolve the attribute yet
91 return self
92
GaudiKernel.Configurable.PropertyReference.__resolve__
def __resolve__(self)
Definition: Configurable.py:68
GaudiKernel.Configurable.PropertyReference.getFullName
def getFullName(self)
Definition: Configurable.py:80

## Member Data Documentation

GaudiKernel.Configurable.PropertyReference.name

Definition at line 65 of file Configurable.py.

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

- GaudiKernel/python/GaudiKernel/Configurable.py