Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework  v31r0 (aeb156f0)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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 
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 
21  Configurable.getNeededConfigurables = _getNeededConfigurables
22 except ImportError:
23  # Otherwise use GaudiKernel
24  from GaudiKernel import Configurable
25  from GaudiKernel import ConfigurableDb
26 
27 # Hack to expose Configurable and ConfigurableDb as the modules
28 # GaudiKernel.Proxy.Configurable and GaudiKernel.Proxy.ConfigurableDb
29 import sys
30 sys.modules["GaudiKernel.Proxy.Configurable"] = Configurable
31 sys.modules["GaudiKernel.Proxy.ConfigurableDb"] = ConfigurableDb
32 import GaudiKernel.Proxy.Configurable
33 import GaudiKernel.Proxy.ConfigurableDb
34 del sys
def _getNeededConfigurables()
Definition: Proxy.py:13