| The Gaudi Framework v27r1

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

- Namespace List
- Namespace Members

Classes | Functions | Variables
GaudiPluginService.cpluginsvc Namespace Reference

## Classes
class | Factory
class | Property
class | Registry

## Functions
def | _get_filename ()
def | registry ()
def | factories ()

## Variables
string | __doc__
| cpluginsvc is a ctypes-based wrapper for the C-exposed API of GaudiPluginService More...
tuple | __all__
| _libname = None
tuple | _lib = ctypes.cdll.LoadLibrary(_libname)
| _instance = None
list | _functions_list
list | n = f[0]
tuple | func = getattr(_lib, n)

## Function Documentation

def GaudiPluginService.cpluginsvc._get_filename | ( |  | ) |
| private

Definition at line 31 of file cpluginsvc.py.

31 def _get_filename():
32 if _libname:
33 return _libname
34 import platform
35 name = platform.system()
36
37 fname = {
38 'Darwin': "libGaudiPluginService.so", # or .dylib ? FIXME
39 'Windows': "libGaudiPluginService.dll",
40 'Linux': "libGaudiPluginService.so",
41 }[name]
42 return fname
43
GaudiPluginService.cpluginsvc._get_filename
def _get_filename()
Definition: cpluginsvc.py:31

def GaudiPluginService.cpluginsvc.factories | ( |  | ) |

    factories returns the list of components factory informations known to the plugin service

Definition at line 72 of file cpluginsvc.py.

72 def factories():
73 '''
74 factories returns the list of components factory informations known to the plugin service
75 '''
76 return registry().factories
77
GaudiPluginService.cpluginsvc.registry
def registry()
Definition: cpluginsvc.py:63
GaudiPluginService.cpluginsvc.factories
def factories()
Definition: cpluginsvc.py:72

def GaudiPluginService.cpluginsvc.registry | ( |  | ) |

    registry returns the singleton-like instance of the plugin service.

Definition at line 63 of file cpluginsvc.py.

63 def registry():
64 '''registry returns the singleton-like instance of the plugin service.'''
65
66 global _instance
67 if _instance:
68 return _instance
69 _instance = _lib.cgaudi_pluginsvc_instance()
70 return _instance
71
GaudiPluginService.cpluginsvc.registry
def registry()
Definition: cpluginsvc.py:63

## Variable Documentation

tuple GaudiPluginService.cpluginsvc.__all__

Initial value:
1 = (
2 "Registry",
3 "registry",
4 "factories",
5 "Factory",
6 "Property",
7 )

Definition at line 22 of file cpluginsvc.py.

string GaudiPluginService.cpluginsvc.__doc__

Initial value:
1 = '''
2 cpluginsvc is a ctypes-based wrapper for the C-API of the GaudiPluginService.
3
4 e.g.:
5
6 >>> from GaudiPluginService import cpluginsvc
7 >>> for _,f in cpluginsvc.factories().items():
8 ... try:
9 ... f.load()
10 ... except Exception:
11 ... print ("** could not load [%s] for factory [%s]" % (f.library, f.name))
12 ... continue
13 ... print f
14 ... for k,v in f.properties.iteritems():
15 ... print ("\t%s: %s" % (k,v))
16 '''

cpluginsvc is a ctypes-based wrapper for the C-exposed API of GaudiPluginService

Definition at line 2 of file cpluginsvc.py.

list GaudiPluginService.cpluginsvc._functions_list

Definition at line 159 of file cpluginsvc.py.

GaudiPluginService.cpluginsvc._instance = None

Definition at line 62 of file cpluginsvc.py.

tuple GaudiPluginService.cpluginsvc._lib = ctypes.cdll.LoadLibrary(_libname)

Definition at line 45 of file cpluginsvc.py.

tuple GaudiPluginService.cpluginsvc._libname = None

Definition at line 30 of file cpluginsvc.py.

tuple GaudiPluginService.cpluginsvc.func = getattr(_lib, n)

Definition at line 218 of file cpluginsvc.py.

list GaudiPluginService.cpluginsvc.n = f[0]

Definition at line 217 of file cpluginsvc.py.