The Gaudi Framework  master (181af51f)
Loading...
Searching...
No Matches
WriteAndReadHandle.py
Go to the documentation of this file.
14
15from Configurables import Gaudi__RootCnvSvc as RootCnvSvc
16from Configurables import Gaudi__TestSuite__ReadHandleAlg as ReadHandleAlg
17from Configurables import Gaudi__TestSuite__WriteHandleAlg as WriteHandleAlg
18from Configurables import GaudiPersistency
19from Gaudi.Configuration import *
20
21# Output setup
22# - DST
23dst = OutputStream("RootDst")
24
25dst.ItemList = ["/Event#999"]
26dst.Output = "DATAFILE='PFN:Handle_ROOTIO.dst' SVC='Gaudi::RootCnvSvc' OPT='RECREATE'"
27
28# - MiniDST
29mini = OutputStream("RootMini")
30mini.ItemList = ["/Event#1"]
31mini.Output = "DATAFILE='PFN:Handle_ROOTIO.mdst' SVC='Gaudi::RootCnvSvc' OPT='RECREATE'"
32
33# - File Summary Record
34fsr = RecordStream("FileRecords")
35fsr.ItemList = ["/FileRecords#999"]
36fsr.Output = dst.Output
37fsr.EvtDataSvc = FileRecordDataSvc()
38fsr.EvtConversionSvc = FileRecordPersistencySvc()
39
40FileCatalog(Catalogs=["xmlcatalog_file:Handle_ROOTIO.xml"])
41
42# Output Levels
43MessageSvc(OutputLevel=INFO)
44IncidentSvc(OutputLevel=INFO)
45RootCnvSvc(OutputLevel=INFO)
46
47GaudiPersistency()
48
49writer = WriteHandleAlg("Writer", UseHandle=True, OutputLevel=DEBUG)
50writer.Output.Path = "/Event/MyCollision"
51
52reader = ReadHandleAlg("Reader", OutputLevel=DEBUG)
53reader.Input.Path = "MyCollision"
54
55# Application setup
57# - I/O
58app.OutStream += [dst, mini, fsr]
59# - Algorithms
60app.TopAlg = [writer, reader]
61# - Events
62app.EvtMax = 10
63app.EvtSel = "NONE" # do not use any event input
64app.HistogramPersistency = "NONE"
The Application Manager class.
A FileRecordDataSvc is the base class for event services.
Default implementation of the IIncidentSvc interface.
Definition IncidentSvc.h:35
A small to stream Data I/O.
Extension of OutputStream to write run records after last event.