Gaudi.Main.BootstrapHelper Class Reference
Inheritance diagram for Gaudi.Main.BootstrapHelper:
Collaboration diagram for Gaudi.Main.BootstrapHelper:

Classes

class  AppMgr
 
class  Property
 
class  StatusCode
 

Public Member Functions

def __init__ (self)
 
def createApplicationMgr (self)
 
def ROOT_VERSION_CODE (self)
 
def ROOT_VERSION (self)
 

Public Attributes

 log
 
 lib
 

Detailed Description

Definition at line 8 of file Main.py.

Constructor & Destructor Documentation

def Gaudi.Main.BootstrapHelper.__init__ (   self)

Definition at line 55 of file Main.py.

55  def __init__(self):
56  from ctypes import PyDLL, c_void_p, c_bool, c_char_p, c_int
57  self.log = logging.getLogger('BootstrapHelper')
58 
59  libname = 'libGaudiKernel.so'
60  self.log.debug('loading GaudiKernel (%s)', libname)
61 
62  # FIXME: note that we need PyDLL instead of CDLL if the calls to
63  # Python functions are not protected with the GIL.
64  self.lib = gkl = PyDLL(libname)
65 
66  functions = [('createApplicationMgr', c_void_p, []),
67  ('getService', c_void_p, [c_void_p, c_char_p]),
68  ('setProperty', c_bool, [c_void_p, c_char_p, c_char_p]),
69  ('getProperty', c_char_p, [c_void_p, c_char_p]),
70  ('addPropertyToCatalogue', c_bool, [c_void_p, c_char_p, c_char_p, c_char_p]),
71  ('ROOT_VERSION_CODE', c_int, []),
72  ]
73 
74  for name, restype, args in functions:
75  f = getattr(gkl, 'py_bootstrap_%s' % name)
76  f.restype, f.args = restype, args
77  # create a delegate method if not already present
78  # (we do not want to use hasattr because it calls "properties")
79  if name not in self.__class__.__dict__:
80  setattr(self, name, f)
81 
82  for name in ('configure', 'initialize', 'start',
83  'stop', 'finalize', 'terminate'):
84  f = getattr(gkl, 'py_bootstrap_fsm_%s' % name)
85  f.restype, f.args = c_bool, [c_void_p]
86  gkl.py_bootstrap_app_run.restype = c_bool
87  gkl.py_bootstrap_app_run.args = [c_void_p, c_int]
88 
89  gkl.py_helper_printAlgsSequences.restype = None
90  gkl.py_helper_printAlgsSequences.args = [c_void_p]
91 
def __init__(self)
Definition: Main.py:55

Member Function Documentation

def Gaudi.Main.BootstrapHelper.createApplicationMgr (   self)

Definition at line 92 of file Main.py.

93  ptr = self.lib.py_bootstrap_createApplicationMgr()
94  return self.AppMgr(ptr, self.lib)
95 
def createApplicationMgr(self)
Definition: Main.py:92
def Gaudi.Main.BootstrapHelper.ROOT_VERSION (   self)

Definition at line 101 of file Main.py.

101  def ROOT_VERSION(self):
102  root_version_code = self.ROOT_VERSION_CODE
103  a = root_version_code >> 16 & 0xff
104  b = root_version_code >> 8 & 0xff
105  c = root_version_code & 0xff
106  return (a, b, c)
107 
108 
def ROOT_VERSION_CODE(self)
Definition: Main.py:97
def ROOT_VERSION(self)
Definition: Main.py:101
def Gaudi.Main.BootstrapHelper.ROOT_VERSION_CODE (   self)

Definition at line 97 of file Main.py.

97  def ROOT_VERSION_CODE(self):
98  return self.lib.py_bootstrap_ROOT_VERSION_CODE()
99 
def ROOT_VERSION_CODE(self)
Definition: Main.py:97

Member Data Documentation

Gaudi.Main.BootstrapHelper.lib

Definition at line 64 of file Main.py.

Gaudi.Main.BootstrapHelper.log

Definition at line 57 of file Main.py.


The documentation for this class was generated from the following file: