00001
00002
00003
00004 """
00005 This module would scan all known Gaudi configurable modules for
00006 'Configurable' classes and fill __all__ such that it can be imported
00007 by any module requiring it.
00008 """
00009
00010 from GaudiKernel.Configurable import Configurable
00011 from GaudiKernel.ConfigurableMeta import ConfigurableMeta
00012 __all__ = []
00013
00014
00015 packages = ['GaudiSvc', 'GaudiAlg', 'GaudiAud', 'RootHistCnv',
00016 'GaudiUtils' ]
00017
00018
00019
00020 for package in packages :
00021 try:
00022 mod = __import__( '%s.%sConf'%(package,package), globals(), locals(), ['%sConf'%package] )
00023 for nam in dir(mod) :
00024 cls = getattr(mod, nam)
00025 if type(cls) is ConfigurableMeta and issubclass(cls, Configurable) :
00026 globals()[nam] = cls
00027 __all__.append(nam)
00028 except ImportError:
00029
00030 pass
00031
00032
00033 def addConfigurableAs(ori, new) :
00034 gbl = globals()
00035 if ori in gbl:
00036 gbl[new] = gbl[ori]
00037 __all__.append(new)
00038 gbl[new].DefaultedName = new
00039
00040 addConfigurableAs('EvtDataSvc','EventDataSvc')
00041 addConfigurableAs('DetDataSvc','DetectorDataSvc')
00042 addConfigurableAs('HistogramSvc','HistogramDataSvc')
00043 addConfigurableAs('HbookCnv__PersSvc','HbookHistSvc')
00044 addConfigurableAs('RootHistCnv__PersSvc','RootHistSvc')
00045 addConfigurableAs('EvtPersistencySvc','EventPersistencySvc')
00046 addConfigurableAs('DetPersistencySvc','DetectorPersistencySvc')
00047 addConfigurableAs('HistogramPersistencySvc','HistogramPersistencySvc')
00048
00049 addConfigurableAs('Gaudi__MultiFileCatalog','FileCatalog')
00050 addConfigurableAs('Gaudi__IODataManager','IODataManager')