Implementation of PersistencyHelper based on Gaudi::RootCnvSvc.
Definition at line 118 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 123 of file Persistency.py.
127 Declare the type of supported persistencies to the base class.
129 super(RootPersistency, self).__init__(
130 [
"ROOT",
"POOL_ROOT",
"RootCnvSvc",
"Gaudi::RootCnvSvc"]
132 self.configured =
False
◆ configure()
def GaudiPython.Persistency.RootPersistency.configure |
( |
|
self, |
|
|
|
appMgr |
|
) |
| |
Basic configuration.
Definition at line 134 of file Persistency.py.
138 if not self.configured:
140 appMgr.service(
"Gaudi::RootCnvSvc/RootCnvSvc")
141 eps = appMgr.service(
"EventPersistencySvc")
142 eps.CnvServices += [
"RootCnvSvc"]
143 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 145 of file Persistency.py.
145 def formatInput(self, filenames, **kwargs):
147 Translate a list of file names in a list of input descriptions.
149 The optional parameters 'collection', 'sel' and 'fun' should be used to
150 configure Event Tag Collection inputs.
152 @param filenames: the list of files
154 if not self.configured:
155 raise PersistencyError(
"Persistency not configured")
156 if isinstance(filenames, str):
157 filenames = [filenames]
161 [(k, kwargs[k])
for k
in [
"collection",
"sel",
"fun"]
if k
in kwargs]
165 svc =
"Gaudi::RootCnvSvc"
167 svc =
"Gaudi::RootEvtSelector"
168 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 170 of file Persistency.py.
170 def formatOutput(self, filename, **kwargs):
172 Translate a filename in an output description.
174 @param filenames: the list of files
175 @param lun: Logical Unit for Event Tag Collection outputs (optional)
177 if not self.configured:
178 raise PersistencyError(
"Persistency not configured")
179 retval = str(FileDescription(filename,
"RECREATE",
"Gaudi::RootCnvSvc"))
181 retval =
"%s %s" % (kwargs[
"lun"], retval)
186 add(RootPersistency())
◆ configured
GaudiPython.Persistency.RootPersistency.configured |
The documentation for this class was generated from the following file: