| The Gaudi Framework v28r2p1 (f1a77ff4)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Classes | Public Member Functions | Public Attributes | List of all members
Gaudi.Main.BootstrapHelper Class Reference
Inheritance diagram for Gaudi.Main.BootstrapHelper:
[legend]
Collaboration diagram for Gaudi.Main.BootstrapHelper:
[legend]

## 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 # Helper class to avoid void* to int conversion
58 # (see http://stackoverflow.com/questions/17840144)
59 class IInterface_p(c_void_p):
60 def __repr__(self):
61 return "IInterface_p(0x%x)" % (0 if self.value is None
62 else self.value)
63 self.log = logging.getLogger('BootstrapHelper')
64
65 libname = 'libGaudiKernel.so'
66 self.log.debug('loading GaudiKernel (%s)', libname)
67
68 # FIXME: note that we need PyDLL instead of CDLL if the calls to
69 # Python functions are not protected with the GIL.
70 self.lib = gkl = PyDLL(libname)
71
72 functions = [('createApplicationMgr', IInterface_p, []),
73 ('getService', IInterface_p, [IInterface_p, c_char_p]),
74 ('setProperty', c_bool, [IInterface_p, c_char_p, c_char_p]),
75 ('getProperty', c_char_p, [IInterface_p, c_char_p]),
76 ('addPropertyToCatalogue', c_bool, [IInterface_p, c_char_p, c_char_p, c_char_p]),
77 ('ROOT_VERSION_CODE', c_int, []),
78 ]
79
80 for name, restype, argtypes in functions:
81 f = getattr(gkl, 'py_bootstrap_%s' % name)
82 f.restype, f.argtypes = restype, argtypes
83 # create a delegate method if not already present
84 # (we do not want to use hasattr because it calls "properties")
85 if name not in self.__class__.__dict__:
86 setattr(self, name, f)
87
88 for name in ('configure', 'initialize', 'start',
89 'stop', 'finalize', 'terminate'):
90 f = getattr(gkl, 'py_bootstrap_fsm_%s' % name)
91 f.restype, f.argtypes = c_bool, [IInterface_p]
92 gkl.py_bootstrap_app_run.restype = c_bool
93 gkl.py_bootstrap_app_run.argtypes = [IInterface_p, c_int]
94
95 gkl.py_helper_printAlgsSequences.restype = None
96 gkl.py_helper_printAlgsSequences.argtypes = [IInterface_p]
97
Gaudi.Main.BootstrapHelper.lib
lib
Definition: Main.py:70
Gaudi.Main.BootstrapHelper.log
log
Definition: Main.py:63
Gaudi.Main.BootstrapHelper.__init__
def __init__(self)
Definition: Main.py:55
GaudiPython.HistoUtils.__repr__
__repr__
Definition: HistoUtils.py:469

## Member Function Documentation

def Gaudi.Main.BootstrapHelper.createApplicationMgr | ( |  | self | ) |

Definition at line 98 of file Main.py.

98 def createApplicationMgr(self):
99 ptr = self.lib.py_bootstrap_createApplicationMgr()
100 return self.AppMgr(ptr, self.lib)
101
Gaudi.Main.BootstrapHelper.lib
lib
Definition: Main.py:70
Gaudi.Main.BootstrapHelper.createApplicationMgr
def createApplicationMgr(self)
Definition: Main.py:98
Gaudi.Main.BootstrapHelper.AppMgr
Definition: Main.py:27

def Gaudi.Main.BootstrapHelper.ROOT_VERSION | ( |  | self | ) |

Definition at line 107 of file Main.py.

107 def ROOT_VERSION(self):
108 root_version_code = self.ROOT_VERSION_CODE
109 a = root_version_code >> 16 & 0xff
110 b = root_version_code >> 8 & 0xff
111 c = root_version_code & 0xff
112 return (a, b, c)
113
114
Gaudi.Main.BootstrapHelper.ROOT_VERSION_CODE
def ROOT_VERSION_CODE(self)
Definition: Main.py:103
Gaudi.Main.BootstrapHelper.ROOT_VERSION
def ROOT_VERSION(self)
Definition: Main.py:107

def Gaudi.Main.BootstrapHelper.ROOT_VERSION_CODE | ( |  | self | ) |

Definition at line 103 of file Main.py.

103 def ROOT_VERSION_CODE(self):
104 return self.lib.py_bootstrap_ROOT_VERSION_CODE()
105
Gaudi.Main.BootstrapHelper.ROOT_VERSION_CODE
def ROOT_VERSION_CODE(self)
Definition: Main.py:103

## Member Data Documentation

Gaudi.Main.BootstrapHelper.lib

Definition at line 70 of file Main.py.

Gaudi.Main.BootstrapHelper.log

Definition at line 63 of file Main.py.

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

- Gaudi/python/Gaudi/Main.py