| The Gaudi Framework v27r1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

Proxy.py
Go to the documentation of this file.
1 """
2 Module used to select if to use AthenCommon or GaudiKernel to retrieve the
3 implementation of Configurables.
4
5 @author Marco Clemencic
6 """
7
8 try:
9 # Try to import AthenaCommon
10 from AthenaCommon import Configurable
11 from AthenaCommon import ConfigurableDb
12 def _getNeededConfigurables():
13 """
14 In Athena, the list of configurables to be used in GaudiPython.AppMgr
15 constructor is empty, because the configuration is done in a different
16 place.
17 """
18 return []
19 Configurable.getNeededConfigurables = _getNeededConfigurables
20 except ImportError:
21 # Otherwise use GaudiKernel
22 from GaudiKernel import Configurable
23 from GaudiKernel import ConfigurableDb
24
25 # Hack to expose Configurable and ConfigurableDb as the modules
26 # GaudiKernel.Proxy.Configurable and GaudiKernel.Proxy.ConfigurableDb
27 import sys
28 sys.modules["GaudiKernel.Proxy.Configurable"] = Configurable
29 sys.modules["GaudiKernel.Proxy.ConfigurableDb"] = ConfigurableDb
30 import GaudiKernel.Proxy.Configurable
31 import GaudiKernel.Proxy.ConfigurableDb
32 del sys
GaudiKernel.Proxy._getNeededConfigurables
def _getNeededConfigurables()
Definition: Proxy.py:12