The Gaudi Framework  v36r1 (3e2fb5a8)
Proxy.py
Go to the documentation of this file.
1 
11 """
12 Module used to select if to use AthenCommon or GaudiKernel to retrieve the
13 implementation of Configurables.
14 
15 @author Marco Clemencic
16 """
17 
18 try:
19  # Try to import AthenaCommon
20  from AthenaCommon import Configurable
21  from AthenaCommon import ConfigurableDb
22 
24  """
25  In Athena, the list of configurables to be used in GaudiPython.AppMgr
26  constructor is empty, because the configuration is done in a different
27  place.
28  """
29  return []
30 
31  Configurable.getNeededConfigurables = _getNeededConfigurables
32 except ImportError:
33  # Otherwise use GaudiKernel
34  from GaudiKernel import Configurable
35  from GaudiKernel import ConfigurableDb
36 
37 # Hack to expose Configurable and ConfigurableDb as the modules
38 # GaudiKernel.Proxy.Configurable and GaudiKernel.Proxy.ConfigurableDb
39 import sys
40 sys.modules["GaudiKernel.Proxy.Configurable"] = Configurable
41 sys.modules["GaudiKernel.Proxy.ConfigurableDb"] = ConfigurableDb
42 import GaudiKernel.Proxy.Configurable
43 import GaudiKernel.Proxy.ConfigurableDb
44 del sys
GaudiKernel.Proxy._getNeededConfigurables
def _getNeededConfigurables()
Definition: Proxy.py:23