Implementation of PersistencyHelper based on Gaudi::RootCnvSvc.
Definition at line 117 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 122 of file Persistency.py.
126 Declare the type of supported persistencies to the base class.
128 super(RootPersistency, self).__init__(
129 [
"ROOT",
"POOL_ROOT",
"RootCnvSvc",
"Gaudi::RootCnvSvc"]
131 self.configured =
False
◆ configure()
def GaudiPython.Persistency.RootPersistency.configure |
( |
|
self, |
|
|
|
appMgr |
|
) |
| |
Basic configuration.
Definition at line 133 of file Persistency.py.
137 if not self.configured:
139 appMgr.service(
"Gaudi::RootCnvSvc/RootCnvSvc")
140 eps = appMgr.service(
"EventPersistencySvc")
141 eps.CnvServices += [
"RootCnvSvc"]
142 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 144 of file Persistency.py.
144 def formatInput(self, filenames, **kwargs):
146 Translate a list of file names in a list of input descriptions.
148 The optional parameters 'collection', 'sel' and 'fun' should be used to
149 configure Event Tag Collection inputs.
151 @param filenames: the list of files
153 if not self.configured:
154 raise PersistencyError(
"Persistency not configured")
155 if type(filenames)
is str:
156 filenames = [filenames]
160 [(k, kwargs[k])
for k
in [
"collection",
"sel",
"fun"]
if k
in kwargs]
164 svc =
"Gaudi::RootCnvSvc"
166 svc =
"Gaudi::RootEvtSelector"
167 return [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 169 of file Persistency.py.
169 def formatOutput(self, filename, **kwargs):
171 Translate a filename in an output description.
173 @param filenames: the list of files
174 @param lun: Logical Unit for Event Tag Collection outputs (optional)
176 if not self.configured:
177 raise PersistencyError(
"Persistency not configured")
178 retval = str(FileDescription(filename,
"RECREATE",
"Gaudi::RootCnvSvc"))
180 retval =
"%s %s" % (kwargs[
"lun"], retval)
185 add(RootPersistency())
◆ configured
GaudiPython.Persistency.RootPersistency.configured |
The documentation for this class was generated from the following file: