Go to the documentation of this file.00001 import os, sys
00002
00003 __configurables_module_fullname__ = __name__ + '.Configurables'
00004 __ignore_missing_configurables__ = False
00005
00006
00007
00008
00009
00010
00011
00012
00013 class _ConfigurablesModule(object):
00014
00015 def __init__(self):
00016
00017 self.ignoreMissingConfigurables = False
00018
00019 def __getattr__(self, name):
00020
00021 from Gaudi.Configuration import confDbGetConfigurable, cfgDb
00022 from Gaudi.CommonGaudiConfigurables import aliases
00023
00024 retval = None
00025
00026 if name == "__all__":
00027 retval = cfgDb.keys()
00028 elif name == "__path__":
00029 retval == None
00030 elif name in cfgDb.keys():
00031 retval = confDbGetConfigurable(name)
00032 elif name in aliases:
00033 retval = aliases[name]
00034 elif self.ignoreMissingConfigurables:
00035 import logging
00036 logging.getLogger(__configurables_module_fullname__).warning('Configurable class %s not in database', name)
00037 else:
00038
00039
00040 raise AttributeError("module '%s' does not have attribute '%s'" % (__configurables_module_fullname__, name))
00041 return retval
00042
00043
00044 Configurables = _ConfigurablesModule()
00045 sys.modules[__configurables_module_fullname__] = Configurables