| The Gaudi Framework v28r2p1 (f1a77ff4)

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

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

Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
GaudiKernel.ConfigurableDb._CfgDb Class Reference
Inheritance diagram for GaudiKernel.ConfigurableDb._CfgDb:
[legend]
Collaboration diagram for GaudiKernel.ConfigurableDb._CfgDb:
[legend]

## Public Member Functions
def | __init__ (self)
def | add (self, configurable, package, module, lib)
def | duplicates (self)

## Private Member Functions
def | _loadModule (self, fname)

## Private Attributes
| _duplicates

## Static Private Attributes
dictionary | __slots__

## Detailed Description

    A singleton class holding informations about automatically generated
    Configurables.
     --> package holding that Configurable
     --> library holding the components related to that Configurable
     --> python module holding the Configurable
     --> a dictionary of duplicates

Definition at line 18 of file ConfigurableDb.py.

## Constructor & Destructor Documentation

def GaudiKernel.ConfigurableDb._CfgDb.__init__ | ( |  | self | ) |

Definition at line 32 of file ConfigurableDb.py.

32 def __init__(self):
33 object.__init__(self)
34 self._duplicates = {}
35
GaudiKernel.ConfigurableDb._CfgDb.__init__
def __init__(self)
Definition: ConfigurableDb.py:32
GaudiKernel.ConfigurableDb._CfgDb._duplicates
_duplicates
Definition: ConfigurableDb.py:34

## Member Function Documentation

def GaudiKernel.ConfigurableDb._CfgDb._loadModule | ( |  | self,
|  |  | fname
| ) |  |
| private

Definition at line 65 of file ConfigurableDb.py.

65 def _loadModule(self, fname):
66 f = open(fname)
67 for i,ll in enumerate(f):
68 l = ll.strip()
69 if l.startswith('#') or len(l) <= 0:
70 continue
71 try:
72 line = l.split()
73 cname = line[2]
74 pkg = line[0].split('.')[0]
75 module = line[0]
76 lib = line[1]
77 self.add(cname, pkg, module, lib)
78 except Exception:
79 f.close()
80 raise Exception(
81 "invalid line format: %s:%d: %r" %
82 (fname, i+1, ll)
83 )
84 f.close()
85
86
GaudiKernel.ConfigurableDb._CfgDb._loadModule
def _loadModule(self, fname)
Definition: ConfigurableDb.py:65
GaudiKernel.ConfigurableDb._CfgDb.add
def add(self, configurable, package, module, lib)
Definition: ConfigurableDb.py:36

def GaudiKernel.ConfigurableDb._CfgDb.add | ( |  | self,
|  |  | configurable,
|  |  | package,
|  |  | module,
|  |  | lib
| ) |  |

    Method to populate the Db.
    It is called from the auto-generated Xyz_confDb.py files (genconf.cpp)
    @param configurable: the name of the configurable being added
    @param package: the name of the package which holds this Configurable
    @param module: the name of the python module holding the Configurable
    @param lib: the name of the library holding the component(s) (ie: the
        C++ Gaudi component which is mapped by the Configurable)

Definition at line 36 of file ConfigurableDb.py.

36 def add( self, configurable, package, module, lib ):
37 """Method to populate the Db.
38 It is called from the auto-generated Xyz_confDb.py files (genconf.cpp)
39 @param configurable: the name of the configurable being added
40 @param package: the name of the package which holds this Configurable
41 @param module: the name of the python module holding the Configurable
42 @param lib: the name of the library holding the component(s) (ie: the
43 C++ Gaudi component which is mapped by the Configurable)
44 """
45 cfg = { 'package' : package,
46 'module' : module,
47 'lib' : lib }
48 if self.has_key( configurable ):
49 ## check if it comes from the same library...
50 if cfg['lib'] != self[configurable]['lib']:
51 log.debug( "dup!! [%s] p=%s m=%s lib=%s",
52 configurable, package, module, lib )
53 if self._duplicates.has_key(configurable):
54 self._duplicates[configurable] += [ cfg ]
55 else:
56 self._duplicates[configurable] = [ cfg ]
57 else:
58 log.debug( "added [%s] p=%s m=%s lib=%s",
59 configurable, package, module, lib )
60 self[configurable] = cfg
61
GaudiKernel.ConfigurableDb._CfgDb.add
def add(self, configurable, package, module, lib)
Definition: ConfigurableDb.py:36
GaudiKernel.ConfigurableDb._CfgDb._duplicates
_duplicates
Definition: ConfigurableDb.py:34

def GaudiKernel.ConfigurableDb._CfgDb.duplicates | ( |  | self | ) |

Definition at line 62 of file ConfigurableDb.py.

62 def duplicates(self):
63 return self._duplicates
64
GaudiKernel.ConfigurableDb._CfgDb.duplicates
def duplicates(self)
Definition: ConfigurableDb.py:62
GaudiKernel.ConfigurableDb._CfgDb._duplicates
_duplicates
Definition: ConfigurableDb.py:34

## Member Data Documentation

dictionary GaudiKernel.ConfigurableDb._CfgDb.__slots__
| static private

Initial value:
1 = {
2 '_duplicates' : { },
3 }

Definition at line 28 of file ConfigurableDb.py.

GaudiKernel.ConfigurableDb._CfgDb._duplicates
| private

Definition at line 34 of file ConfigurableDb.py.

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

- GaudiKernel/python/GaudiKernel/ConfigurableDb.py