Implementation of PersistencyHelper based on Gaudi::RootCnvSvc.
Definition at line 113 of file Persistency.py.
◆ __init__()
def GaudiPython.Persistency.RootPersistency.__init__ |
( |
|
self | ) |
|
Constructor.
Declare the type of supported persistencies to the base class.
Definition at line 118 of file Persistency.py.
122 Declare the type of supported persistencies to the base class.
124 super(RootPersistency, self).__init__(
125 [
"ROOT",
"POOL_ROOT",
"RootCnvSvc",
"Gaudi::RootCnvSvc"])
126 self.configured =
False
◆ configure()
def GaudiPython.Persistency.RootPersistency.configure |
( |
|
self, |
|
|
|
appMgr |
|
) |
| |
Basic configuration.
Definition at line 128 of file Persistency.py.
132 if not self.configured:
134 appMgr.service(
'Gaudi::RootCnvSvc/RootCnvSvc')
135 eps = appMgr.service(
'EventPersistencySvc')
136 eps.CnvServices += [
'RootCnvSvc']
137 self.configured =
True
◆ formatInput()
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 139 of file Persistency.py.
139 def formatInput(self, filenames, **kwargs):
141 Translate a list of file names in a list of input descriptions.
143 The optional parameters 'collection', 'sel' and 'fun' should be used to
144 configure Event Tag Collection inputs.
146 @param filenames: the list of files
148 if not self.configured:
149 raise PersistencyError(
"Persistency not configured")
150 if type(filenames)
is str:
151 filenames = [filenames]
154 fileargs = dict([(k, kwargs[k])
for k
in [
"collection",
"sel",
"fun"]
158 svc =
'Gaudi::RootCnvSvc'
160 svc =
'Gaudi::RootEvtSelector'
162 str(FileDescription(f,
'READ', svc, **fileargs))
for f
in filenames
◆ formatOutput()
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 165 of file Persistency.py.
165 def formatOutput(self, filename, **kwargs):
167 Translate a filename in an output description.
169 @param filenames: the list of files
170 @param lun: Logical Unit for Event Tag Collection outputs (optional)
172 if not self.configured:
173 raise PersistencyError(
"Persistency not configured")
175 FileDescription(filename,
'RECREATE',
'Gaudi::RootCnvSvc'))
177 retval =
"%s %s" % (kwargs[
'lun'], retval)
182 add(RootPersistency())
◆ configured
GaudiPython.Persistency.RootPersistency.configured |
The documentation for this class was generated from the following file: