| The Gaudi Framework v29r1 (5cd95fa2)

- 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
13 def _getNeededConfigurables():
14 """
15 In Athena, the list of configurables to be used in GaudiPython.AppMgr
16 constructor is empty, because the configuration is done in a different
17 place.
18 """
19 return []
20 Configurable.getNeededConfigurables = _getNeededConfigurables
21 except ImportError:
22 # Otherwise use GaudiKernel
23 from GaudiKernel import Configurable
24 from GaudiKernel import ConfigurableDb
25
26 # Hack to expose Configurable and ConfigurableDb as the modules
27 # GaudiKernel.Proxy.Configurable and GaudiKernel.Proxy.ConfigurableDb
28 import sys
29 sys.modules["GaudiKernel.Proxy.Configurable"] = Configurable
30 sys.modules["GaudiKernel.Proxy.ConfigurableDb"] = ConfigurableDb
31 import GaudiKernel.Proxy.Configurable
32 import GaudiKernel.Proxy.ConfigurableDb
33 del sys
GaudiKernel.Proxy._getNeededConfigurables
def _getNeededConfigurables()
Definition: Proxy.py:13