Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework  v28r2p1 (f1a77ff4)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
GaudiKernel.Configurable.PropertyReference Class Reference

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

Inheritance diagram for GaudiKernel.Configurable.PropertyReference:
Collaboration diagram for GaudiKernel.Configurable.PropertyReference:

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.

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
def GaudiKernel.Configurable.PropertyReference.__str__ (   self)

Definition at line 66 of file Configurable.py.

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 

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: