The Gaudi Framework  master (da3d77e1)
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, ConfigurableDb
21 
23  """
24  In Athena, the list of configurables to be used in GaudiPython.AppMgr
25  constructor is empty, because the configuration is done in a different
26  place.
27  """
28  return []
29 
30  Configurable.getNeededConfigurables = _getNeededConfigurables
31 except ImportError:
32  # Otherwise use GaudiKernel
33  from GaudiKernel import Configurable, ConfigurableDb
34 
35 # Hack to expose Configurable and ConfigurableDb as the modules
36 # GaudiKernel.Proxy.Configurable and GaudiKernel.Proxy.ConfigurableDb
37 import sys
38 
39 sys.modules["GaudiKernel.Proxy.Configurable"] = Configurable
40 sys.modules["GaudiKernel.Proxy.ConfigurableDb"] = ConfigurableDb
41 import GaudiKernel.Proxy.Configurable
42 import GaudiKernel.Proxy.ConfigurableDb # noqa: F401
43 
44 del sys
GaudiKernel.Proxy._getNeededConfigurables
def _getNeededConfigurables()
Definition: Proxy.py:22