All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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
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
def _getNeededConfigurables
Definition: Proxy.py:12