| # Gaudi Framework, version v22r4 |

Home |  | Generated: Fri Sep 2 2011

Public Member Functions | Public Attributes

# Gaudi::_ConfigurablesModule Class Reference

Small class that allows to access all the configurables as attributes of the instance. More...

List of all members.

## Public Member Functions
def | __init__
| Initializes the instance.
def | __getattr__
## Public Attributes
| ignoreMissingConfigurables
| If set to true, does not raise an AttributeError if the configurable is not found.

## Detailed Description

Small class that allows to access all the configurables as attributes of the instance.

Used as module to allow code like

      from Gaudi.Configuration import Configurables
      Configurables.MyConf()

Definition at line 13 of file __init__.py.

## Constructor & Destructor Documentation

def Gaudi::_ConfigurablesModule::__init__ | ( |  | self ) |

Initializes the instance.

Definition at line 15 of file __init__.py.

    00016                       :
    00017         ## If set to true, does not raise an AttributeError if the configurable is not found.
    00018         self.ignoreMissingConfigurables = False

## Member Function Documentation

def Gaudi::_ConfigurablesModule::__getattr__ | ( |  | self,
|  |  | name
| ) |  |

Definition at line 19 of file __init__.py.

    00020                                :
    00021         # trigger the load of the configurables database
    00022         from Gaudi.Configuration import confDbGetConfigurable, cfgDb
    00023         # return value
    00024         retval = None
    00025         # handle the special cases (needed for modules): __all__, __path__
    00026         if name == "__all__":
    00027             retval = cfgDb.keys()
    00028         elif name == "__path__":
    00029             retval == None
    00030         elif name in cfgDb.keys(): # ignore private names
    00031             retval = confDbGetConfigurable(name)
    00032         elif self.ignoreMissingConfigurables:
    00033             import logging
    00034             logging.getLogger(__configurables_module_fullname__).warning('Configurable class %s not in database', name)
    00035         else:
    00036             # We raise an AttributeError exception if the configurable could not be found
    00037             # to respect the Python semantic.
    00038             raise AttributeError("module '%s' does not have attribute '%s'" % (__configurables_module_fullname__, name))
    00039         return retval
    00040
    # install the facade module instance as a module

## Member Data Documentation

Gaudi::_ConfigurablesModule::ignoreMissingConfigurables

If set to true, does not raise an AttributeError if the configurable is not found.

Definition at line 16 of file __init__.py.

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

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v22r4/Gaudi/python/Gaudi/__init__.py

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines