Implementation of PersistencyHelper based on Gaudi::RootCnvSvc.
Definition at line 103 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 108 of file Persistency.py.
112 Declare the type of supported persistencies to the base class. 114 super(RootPersistency, self).__init__(
115 [
"ROOT",
"POOL_ROOT",
"RootCnvSvc",
"Gaudi::RootCnvSvc"])
116 self.configured =
False
◆ configure()
def GaudiPython.Persistency.RootPersistency.configure |
( |
|
self, |
|
|
|
appMgr |
|
) |
| |
Basic configuration.
Definition at line 118 of file Persistency.py.
118 def configure(self, appMgr):
122 if not self.configured:
124 appMgr.service(
'Gaudi::RootCnvSvc/RootCnvSvc')
125 eps = appMgr.service(
'EventPersistencySvc')
126 eps.CnvServices += [
'RootCnvSvc']
127 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 129 of file Persistency.py.
129 def formatInput(self, filenames, **kwargs):
131 Translate a list of file names in a list of input descriptions. 133 The optional parameters 'collection', 'sel' and 'fun' should be used to 134 configure Event Tag Collection inputs. 136 @param filenames: the list of files 138 if not self.configured:
139 raise PersistencyError(
"Persistency not configured")
140 if type(filenames)
is str:
141 filenames = [filenames]
144 fileargs = dict([(k, kwargs[k])
for k
in [
"collection",
"sel",
"fun"]
148 svc =
'Gaudi::RootCnvSvc' 150 svc =
'Gaudi::RootEvtSelector' 152 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 155 of file Persistency.py.
155 def formatOutput(self, filename, **kwargs):
157 Translate a filename in an output description. 159 @param filenames: the list of files 160 @param lun: Logical Unit for Event Tag Collection outputs (optional) 162 if not self.configured:
163 raise PersistencyError(
"Persistency not configured")
165 FileDescription(filename,
'RECREATE',
'Gaudi::RootCnvSvc'))
167 retval =
"%s %s" % (kwargs[
'lun'], retval)
172 add(RootPersistency())
◆ configured
GaudiPython.Persistency.RootPersistency.configured |
The documentation for this class was generated from the following file: