5 __configurables_module_fullname__ = __name__ +
'.Configurables' 6 __ignore_missing_configurables__ =
False 22 self.
__name__ = __configurables_module_fullname__
33 elif name ==
"__path__":
34 raise AttributeError(
"'module' object has no attribute '__path__'")
35 elif name
in cfgDb.keys():
36 retval = confDbGetConfigurable(name)
38 retval = aliases[name]
41 logging.getLogger(__configurables_module_fullname__).warning(
42 'Configurable class %s not in database', name)
46 raise AttributeError(
"module '%s' does not have attribute '%s'" %
47 (__configurables_module_fullname__, name))
52 Configurables = _ConfigurablesModule()
53 sys.modules[__configurables_module_fullname__] = Configurables
55 _GaudiKernelLib =
None 59 _fields_ = [(
'key', ctypes.c_char_p), (
'value', ctypes.c_char_p)]
63 def __init__(self, opts, appType="Gaudi::Application
"): 64 global _GaudiKernelLib
65 if _GaudiKernelLib
is None:
68 gkl = _GaudiKernelLib = ctypes.PyDLL(
70 (
'.dylib' if sys.platform ==
'darwin' else '.so'),
71 mode=ctypes.RTLD_GLOBAL)
72 gkl._py_Gaudi__Application__create.restype = ctypes.c_void_p
73 gkl._py_Gaudi__Application__run.argtypes = [ctypes.c_void_p]
74 gkl._py_Gaudi__Application__run.restype = ctypes.c_int
75 gkl._py_Gaudi__Application__delete.argtypes = [ctypes.c_void_p]
77 c_opts = (c_opt_t * len(opts))()
78 for idx, item
in enumerate(opts.items()):
79 c_opts[idx].key = item[0].encode(
'ascii')
80 c_opts[idx].value = item[1].encode(
'ascii')
82 self.
_impl = _GaudiKernelLib._py_Gaudi__Application__create(
83 appType.encode(
'ascii'), c_opts, ctypes.c_long(len(c_opts)))
87 return cls(opts, appType=appType)
90 return _GaudiKernelLib._py_Gaudi__Application__run(self.
_impl)
93 _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.