| The Gaudi Framework v29r1 (5cd95fa2)

- 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 10 of file Main.py.

## Constructor & Destructor Documentation

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

Definition at line 75 of file Main.py.

75 def __init__(self):
76 from ctypes import PyDLL, util, c_void_p, c_bool, c_char_p, c_int
77 # Helper class to avoid void* to int conversion
78 # (see http://stackoverflow.com/questions/17840144)
79
80 class IInterface_p(c_void_p):
81 def __repr__(self):
82 return "IInterface_p(0x%x)" % (0 if self.value is None
83 else self.value)
84 self.log = logging.getLogger('BootstrapHelper')
85 libname = util.find_library('GaudiKernel') or 'libGaudiKernel.so'
86 self.log.debug('loading GaudiKernel (%s)', libname)
87
88 # FIXME: note that we need PyDLL instead of CDLL if the calls to
89 # Python functions are not protected with the GIL.
90 self.lib = gkl = PyDLL(libname)
91
92 functions = [('createApplicationMgr', IInterface_p, []),
93 ('getService', IInterface_p, [IInterface_p, c_char_p]),
94 ('setProperty', c_bool, [
95 IInterface_p, c_char_p, c_char_p]),
96 ('getProperty', c_char_p, [IInterface_p, c_char_p]),
97 ('addPropertyToCatalogue', c_bool, [
98 IInterface_p, c_char_p, c_char_p, c_char_p]),
99 ('ROOT_VERSION_CODE', c_int, []),
100 ]
101
102 for name, restype, argtypes in functions:
103 f = getattr(gkl, 'py_bootstrap_%s' % name)
104 f.restype, f.argtypes = restype, argtypes
105 # create a delegate method if not already present
106 # (we do not want to use hasattr because it calls "properties")
107 if name not in self.__class__.__dict__:
108 setattr(self, name, f)
109
110 for name in ('configure', 'initialize', 'start',
111 'stop', 'finalize', 'terminate'):
112 f = getattr(gkl, 'py_bootstrap_fsm_%s' % name)
113 f.restype, f.argtypes = c_bool, [IInterface_p]
114 gkl.py_bootstrap_app_run.restype = c_bool
115 gkl.py_bootstrap_app_run.argtypes = [IInterface_p, c_int]
116
117 gkl.py_helper_printAlgsSequences.restype = None
118 gkl.py_helper_printAlgsSequences.argtypes = [IInterface_p]
119
Gaudi.Main.BootstrapHelper.lib
lib
Definition: Main.py:90
Gaudi.Main.BootstrapHelper.log
log
Definition: Main.py:84
Gaudi.Main.BootstrapHelper.__init__
def __init__(self)
Definition: Main.py:75
GaudiPython.HistoUtils.__repr__
__repr__
Definition: HistoUtils.py:507

## Member Function Documentation

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

Definition at line 120 of file Main.py.

120 def createApplicationMgr(self):
121 ptr = self.lib.py_bootstrap_createApplicationMgr()
122 return self.AppMgr(ptr, self.lib)
123
Gaudi.Main.BootstrapHelper.lib
lib
Definition: Main.py:90
Gaudi.Main.BootstrapHelper.createApplicationMgr
def createApplicationMgr(self)
Definition: Main.py:120
Gaudi.Main.BootstrapHelper.AppMgr
Definition: Main.py:36

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

Definition at line 129 of file Main.py.

129 def ROOT_VERSION(self):
130 root_version_code = self.ROOT_VERSION_CODE
131 a = root_version_code >> 16 & 0xff
132 b = root_version_code >> 8 & 0xff
133 c = root_version_code & 0xff
134 return (a, b, c)
135
136
Gaudi.Main.BootstrapHelper.ROOT_VERSION_CODE
def ROOT_VERSION_CODE(self)
Definition: Main.py:125
Gaudi.Main.BootstrapHelper.ROOT_VERSION
def ROOT_VERSION(self)
Definition: Main.py:129

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

Definition at line 125 of file Main.py.

125 def ROOT_VERSION_CODE(self):
126 return self.lib.py_bootstrap_ROOT_VERSION_CODE()
127
Gaudi.Main.BootstrapHelper.ROOT_VERSION_CODE
def ROOT_VERSION_CODE(self)
Definition: Main.py:125

## Member Data Documentation

Gaudi.Main.BootstrapHelper.lib

Definition at line 90 of file Main.py.

Gaudi.Main.BootstrapHelper.log

Definition at line 84 of file Main.py.

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

- Gaudi/python/Gaudi/Main.py