| The Gaudi Framework v32r1 (f65d50dc)

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__
tuple | __all__
| _libname = None
| _lib = ctypes.CDLL(_libname, ctypes.RTLD_GLOBAL)
| _instance = None
list | _functions_list
| n = f[0]
| func = getattr(_lib, n)
| argtypes
| restype
| errcheck

## Function Documentation

## ◆ _get_filename()

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

Definition at line 33 of file cpluginsvc.py.

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

## ◆ factories()

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

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

Definition at line 81 of file cpluginsvc.py.

81 def factories():
82 '''
83 factories returns the list of components factory informations known to the plugin service
84 '''
85 return registry().factories
86
87
GaudiPluginService.cpluginsvc.registry
def registry()
Definition: cpluginsvc.py:71
GaudiPluginService.cpluginsvc.factories
def factories()
Definition: cpluginsvc.py:81

## ◆ registry()

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

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

Definition at line 71 of file cpluginsvc.py.

71 def registry():
72 '''registry returns the singleton-like instance of the plugin service.'''
73
74 global _instance
75 if _instance:
76 return _instance
77 _instance = _lib.cgaudi_pluginsvc_instance()
78 return _instance
79
80
GaudiPluginService.cpluginsvc.registry
def registry()
Definition: cpluginsvc.py:71

## Variable Documentation

## ◆ __all__

tuple GaudiPluginService.cpluginsvc.__all__
| private

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

Definition at line 22 of file cpluginsvc.py.

## ◆ __doc__

string GaudiPluginService.cpluginsvc.__doc__
| private

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 '''

Definition at line 2 of file cpluginsvc.py.

## ◆ _functions_list

list GaudiPluginService.cpluginsvc._functions_list
| private

Definition at line 167 of file cpluginsvc.py.

## ◆ _instance

GaudiPluginService.cpluginsvc._instance = None
| private

Definition at line 68 of file cpluginsvc.py.

## ◆ _lib

GaudiPluginService.cpluginsvc._lib = ctypes.CDLL(_libname, ctypes.RTLD_GLOBAL)
| private

Definition at line 48 of file cpluginsvc.py.

## ◆ _libname

def GaudiPluginService.cpluginsvc._libname = None
| private

Definition at line 30 of file cpluginsvc.py.

## ◆ argtypes

GaudiPluginService.cpluginsvc.argtypes

Definition at line 212 of file cpluginsvc.py.

## ◆ errcheck

GaudiPluginService.cpluginsvc.errcheck

Definition at line 215 of file cpluginsvc.py.

## ◆ func

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

Definition at line 211 of file cpluginsvc.py.

## ◆ n

GaudiPluginService.cpluginsvc.n = f[0]

Definition at line 210 of file cpluginsvc.py.

## ◆ restype

GaudiPluginService.cpluginsvc.restype

Definition at line 213 of file cpluginsvc.py.