15 __configurables_module_fullname__ = __name__ +
'.Configurables' 16 __ignore_missing_configurables__ =
False 32 self.
__name__ = __configurables_module_fullname__
43 elif name ==
"__path__":
44 raise AttributeError(
"'module' object has no attribute '__path__'")
45 elif name
in cfgDb.keys():
46 retval = confDbGetConfigurable(name)
48 retval = aliases[name]
51 logging.getLogger(__configurables_module_fullname__).warning(
52 'Configurable class %s not in database', name)
56 raise AttributeError(
"module '%s' does not have attribute '%s'" %
57 (__configurables_module_fullname__, name))
62 Configurables = _ConfigurablesModule()
63 sys.modules[__configurables_module_fullname__] = Configurables
65 _GaudiKernelLib =
None 69 _fields_ = [(
'key', ctypes.c_char_p), (
'value', ctypes.c_char_p)]
73 def __init__(self, opts, appType="Gaudi::Application
"): 74 global _GaudiKernelLib
75 if _GaudiKernelLib
is None:
78 gkl = _GaudiKernelLib = ctypes.PyDLL(
80 (
'.dylib' if sys.platform ==
'darwin' else '.so'),
81 mode=ctypes.RTLD_GLOBAL)
82 gkl._py_Gaudi__Application__create.restype = ctypes.c_void_p
83 gkl._py_Gaudi__Application__run.argtypes = [ctypes.c_void_p]
84 gkl._py_Gaudi__Application__run.restype = ctypes.c_int
85 gkl._py_Gaudi__Application__delete.argtypes = [ctypes.c_void_p]
87 c_opts = (c_opt_t * len(opts))()
88 for idx, item
in enumerate(opts.items()):
89 c_opts[idx].key = item[0].encode(
'ascii')
90 c_opts[idx].value = item[1].encode(
'ascii')
92 self.
_impl = _GaudiKernelLib._py_Gaudi__Application__create(
93 appType.encode(
'ascii'), c_opts, ctypes.c_long(len(c_opts)))
97 return cls(opts, appType=appType)
100 return _GaudiKernelLib._py_Gaudi__Application__run(self.
_impl)
103 _GaudiKernelLib._py_Gaudi__Application__delete(self.
_impl)
virtual int run()
Implement the application main logic:
def __getattr__(self, name)
def __init__(self, opts, appType="Gaudi::Application")
ignoreMissingConfigurables
def create(cls, appType, opts)
Gaudi application entry point.