The Gaudi Framework  master (ff829712)
Loading...
Searching...
No Matches
cpluginsvc Namespace Reference

Classes

class  Factory
 
class  Property
 
class  Registry
 

Functions

 _get_filename ()
 
 registry ()
 
 factories ()
 

Variables

str __doc__
 (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations # # This software is distributed under the terms of the Apache version 2 licence, # copied verbatim in the file "LICENSE".
 
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()

cpluginsvc._get_filename ( )
protected

Definition at line 44 of file cpluginsvc.py.

44def _get_filename():
45 if _libname:
46 return _libname
47 import platform
48
49 name = platform.system()
50
51 fname = {
52 "Darwin": "libGaudiPluginService.dylib",
53 "Windows": "libGaudiPluginService.dll",
54 "Linux": "libGaudiPluginService.so",
55 }[name]
56 return fname
57
58

◆ factories()

cpluginsvc.factories ( )
factories returns the list of components factory informations known to the plugin service

Definition at line 93 of file cpluginsvc.py.

93def factories():
94 """
95 factories returns the list of components factory informations known to the plugin service
96 """
97 return registry().factories
98
99

◆ registry()

cpluginsvc.registry ( )
registry returns the singleton-like instance of the plugin service.

Definition at line 83 of file cpluginsvc.py.

83def registry():
84 """registry returns the singleton-like instance of the plugin service."""
85
86 global _instance
87 if _instance:
88 return _instance
89 _instance = _lib.cgaudi_pluginsvc_instance()
90 return _instance
91
92

Variable Documentation

◆ __all__

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

Definition at line 33 of file cpluginsvc.py.

◆ __doc__

str cpluginsvc.__doc__
private
Initial value:
1= """
2cpluginsvc is a ctypes-based wrapper for the C-API of the GaudiPluginService.
3
4e.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"""

(c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations # # This software is distributed under the terms of the Apache version 2 licence, # copied verbatim in the file "LICENSE".

# # In applying this licence, CERN does not waive the privileges and immunities # granted to it by virtue of its status as an Intergovernmental Organization # or submit itself to any jurisdiction. #

Definition at line 13 of file cpluginsvc.py.

◆ _functions_list

list cpluginsvc._functions_list
protected

Definition at line 180 of file cpluginsvc.py.

◆ _instance

cpluginsvc._instance = None
protected

Definition at line 80 of file cpluginsvc.py.

◆ _lib

cpluginsvc._lib = ctypes.CDLL(_libname, ctypes.RTLD_GLOBAL)
protected

Definition at line 60 of file cpluginsvc.py.

◆ _libname

cpluginsvc._libname = None
protected

Definition at line 41 of file cpluginsvc.py.

◆ argtypes

cpluginsvc.argtypes

Definition at line 236 of file cpluginsvc.py.

◆ errcheck

cpluginsvc.errcheck

Definition at line 239 of file cpluginsvc.py.

◆ func

cpluginsvc.func = getattr(_lib, n)

Definition at line 235 of file cpluginsvc.py.

◆ n

cpluginsvc.n = f[0]

Definition at line 234 of file cpluginsvc.py.

◆ restype

cpluginsvc.restype

Definition at line 237 of file cpluginsvc.py.