Go to the documentation of this file.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 packages = ['GaudiCoreSvc', 'GaudiCommonSvc', 'GaudiSvc', 'GaudiAlg',
00015 'GaudiAud', 'GaudiPoolDb', 'RootHistCnv', 'GaudiUtils',
00016 'RootCnv']
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 aliases = {
00034 'EventDataSvc': 'EvtDataSvc',
00035 'DetectorDataSvc': 'DetDataSvc',
00036 'HistogramDataSvc': 'HistogramSvc',
00037 'HbookHistSvc': 'HbookCnv__PersSvc',
00038 'RootHistSvc': 'RootHistCnv__PersSvc',
00039 'EventPersistencySvc': 'EvtPersistencySvc',
00040 'DetectorPersistencySvc': 'DetPersistencySvc',
00041 'HistogramPersistencySvc': 'HistogramPersistencySvc',
00042 'FileRecordPersistencySvc': 'PersistencySvc',
00043
00044 'FileCatalog': 'Gaudi__MultiFileCatalog',
00045 'IODataManager': 'Gaudi__IODataManager',
00046
00047 'RootCnvSvc': 'Gaudi__RootCnvSvc',
00048 'RootEvtSelector': 'Gaudi__RootEvtSelector',
00049 }
00050
00051 _gbl = globals()
00052
00053
00054 aliases = dict([(new, _gbl[old])
00055 for new, old in aliases.items()
00056 if old in _gbl])
00057
00058 for new in aliases:
00059 aliases[new].DefaultedName = new
00060
00061 _gbl.update(aliases)
00062 __all__.extend(aliases)
00063
00064 del _gbl, new