| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

CommonGaudiConfigurables.py

Go to the documentation of this file.
00001 # File: Gaudi/CommonGaudiConfigurables.py
00002 # Author: Pere Mato (per.mato@cern.ch)
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 = ['GaudiSvc', 'GaudiAlg', 'GaudiAud', 'GaudiPoolDb', 'RootHistCnv' ]
00015 packages = ['GaudiSvc', 'GaudiAlg', 'GaudiAud', 'RootHistCnv',
00016             'GaudiUtils' ]
00017 
00018 #--Loop open all listed packages and populate __all__ with the names and
00019 #  the local scope with the Configurable classes 
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         # ignore the configurables from missing packages.
00030         pass
00031 
00032 #--Fix some of the name idiosyncrasies in Gaudi
00033 def addConfigurableAs(ori, new) :
00034     gbl = globals()
00035     if ori in gbl: # do the aliasing only if the original is available  
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')
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 19:59:29 2011 for Gaudi by doxygen 1.4.7