Commit 0496e70a authored by Marco Clemencic's avatar Marco Clemencic
Browse files

Added a ConfigurableUser to setup the persistency via RootCnv

From: Marco Clemencic <marco.clemencic@cern.ch>


git-svn-id: svn+ssh://svn.cern.ch/reps/gaudi/Gaudi/branches/GAUDI/GAUDI_newpack@6733 53ecefc3-a64d-0410-9bdf-b8581fa3287e
parent 3cef3a73
......@@ -3,6 +3,9 @@ Package manager : Marco Clemencic
! 2011-12-08 - Marco Clemencic
- Added support for class aliases in the meta-module "Configurables".
- Added a ConfigurableUser to setup the persistency via RootCnv:
from Configurables import GaudiPersistency
GaudiPersistency()
! 2011-11-01 - Marco Clemencic
- Moved core services out of GaudiSvc and into the new packages GaudiCoreSvc
......
......@@ -116,3 +116,26 @@ def setCustomMainLoop(runner):
# change the mainLoop function
from Gaudi.Main import gaudimain
gaudimain.mainLoop = lambda _self, app, nevt: runner(app, nevt)
class GaudiPersistency(ConfigurableUser):
"""Configurable to enable ROOT-based persistency.
Note: it requires Gaudi::RootCnvSvc (package RootCnv).
"""
__slots__ = {}
def __apply_configuration__(self):
"""Apply low-level configuration"""
from Configurables import (PersistencySvc,
Gaudi__RootCnvSvc as RootCnvSvc,
ApplicationMgr,
FileRecordDataSvc,
EventPersistencySvc,
IODataManager,
FileCatalog)
cnvSvcs = [ RootCnvSvc() ]
EventPersistencySvc().CnvServices += cnvSvcs
PersistencySvc("FileRecordPersistencySvc").CnvServices += cnvSvcs
app = ApplicationMgr()
app.SvcOptMapping += [ FileCatalog(), IODataManager() ]
app.ExtSvc += [ FileRecordDataSvc() ]
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment