The Gaudi Framework  master (b9786168)
Loading...
Searching...
No Matches
Proxy.py
Go to the documentation of this file.
11"""
12Module used to select if to use AthenCommon or GaudiKernel to retrieve the
13implementation of Configurables.
14
15@author Marco Clemencic
16"""
17
18try:
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
31except 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
37import sys
38
39sys.modules["GaudiKernel.Proxy.Configurable"] = Configurable
40sys.modules["GaudiKernel.Proxy.ConfigurableDb"] = ConfigurableDb
41import GaudiKernel.Proxy.Configurable
42import GaudiKernel.Proxy.ConfigurableDb # noqa: F401
43
44del sys
_getNeededConfigurables()
Definition Proxy.py:22