List of all members.
Detailed Description
Implementation of PersistencyHelper based on Gaudi::RootCnvSvc.
Definition at line 91 of file Persistency.py.
Constructor & Destructor Documentation
| def GaudiPython::Persistency::RootPersistency::__init__ |
( |
|
self ) |
|
Constructor.
Declare the type of supported persistencies to the base class.
Definition at line 95 of file Persistency.py.
00096 :
00097 """
00098 Constructor.
00099
00100 Declare the type of supported persistencies to the base class.
00101 """
00102 super(RootPersistency, self).__init__(["ROOT", "POOL_ROOT",
00103 "RootCnvSvc", "Gaudi::RootCnvSvc"])
00104 self.configured = False
Member Function Documentation
| def GaudiPython::Persistency::RootPersistency::configure |
( |
|
self, |
|
|
|
appMgr |
|
) |
| |
Definition at line 105 of file Persistency.py.
00106 :
00107 """
00108 Basic configuration.
00109 """
00110 if not self.configured:
00111
00112 appMgr.service('Gaudi::RootCnvSvc/RootCnvSvc')
00113 eps = appMgr.service ( 'EventPersistencySvc' )
00114 eps.CnvServices += ['RootCnvSvc']
00115 self.configured = True
| def GaudiPython::Persistency::RootPersistency::formatInput |
( |
|
self, |
|
|
|
filenames, |
|
|
|
kwargs |
|
) |
| |
Translate a list of file names in a list of input descriptions.
The optional parameters 'collection', 'sel' and 'fun' should be used to
configure Event Tag Collection inputs.
@param filenames: the list of files
Definition at line 116 of file Persistency.py.
00117 :
00118 '''
00119 Translate a list of file names in a list of input descriptions.
00120
00121 The optional parameters 'collection', 'sel' and 'fun' should be used to
00122 configure Event Tag Collection inputs.
00123
00124 @param filenames: the list of files
00125 '''
00126 if not self.configured:
00127 raise PersistencyError("Persistency not configured")
00128 if type(filenames) is str:
00129 filenames = [filenames]
00130 fileargs = {}
00131
00132 fileargs = dict([(k, kwargs[k])
00133 for k in ["collection", "sel", "fun"]
00134 if k in kwargs])
00135 if fileargs:
00136
00137 svc = 'Gaudi::RootCnvSvc'
00138 else:
00139 svc = 'Gaudi::RootEvtSelector'
00140 return map(str,
00141 [FileDescription(f, 'READ', svc, **fileargs)
00142 for f in filenames])
| def GaudiPython::Persistency::RootPersistency::formatOutput |
( |
|
self, |
|
|
|
filename, |
|
|
|
kwargs |
|
) |
| |
Translate a filename in an output description.
@param filenames: the list of files
@param lun: Logical Unit for Event Tag Collection outputs (optional)
Definition at line 143 of file Persistency.py.
00144 :
00145 '''
00146 Translate a filename in an output description.
00147
00148 @param filenames: the list of files
00149 @param lun: Logical Unit for Event Tag Collection outputs (optional)
00150 '''
00151 if not self.configured:
00152 raise PersistencyError("Persistency not configured")
00153 retval = str(FileDescription(filename, 'RECREATE', 'Gaudi::RootCnvSvc'))
00154 if 'lun' in kwargs:
00155 retval = "%s %s" % (kwargs['lun'], retval)
00156 return retval
00157
00158
00159 add(RootPersistency())
Member Data Documentation
The documentation for this class was generated from the following file:
- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v23r2/GaudiPython/python/GaudiPython/Persistency.py