Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework  v36r16 (ea80daf8)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
WriteAndReadHandle.py
Go to the documentation of this file.
1 
14 
15 from Configurables import Gaudi__RootCnvSvc as RootCnvSvc
16 from Configurables import GaudiPersistency, ReadHandleAlg, WriteHandleAlg
17 from Gaudi.Configuration import *
18 
19 # Output setup
20 # - DST
21 dst = OutputStream("RootDst")
22 
23 dst.ItemList = ["/Event#999"]
24 dst.Output = "DATAFILE='PFN:Handle_ROOTIO.dst' SVC='Gaudi::RootCnvSvc' OPT='RECREATE'"
25 
26 # - MiniDST
27 mini = OutputStream("RootMini")
28 mini.ItemList = ["/Event#1"]
29 mini.Output = "DATAFILE='PFN:Handle_ROOTIO.mdst' SVC='Gaudi::RootCnvSvc' OPT='RECREATE'"
30 
31 # - File Summary Record
32 fsr = RecordStream("FileRecords")
33 fsr.ItemList = ["/FileRecords#999"]
34 fsr.Output = dst.Output
35 fsr.EvtDataSvc = FileRecordDataSvc()
36 fsr.EvtConversionSvc = FileRecordPersistencySvc()
37 
38 FileCatalog(Catalogs=["xmlcatalog_file:Handle_ROOTIO.xml"])
39 
40 # Output Levels
41 MessageSvc(OutputLevel=INFO)
42 IncidentSvc(OutputLevel=INFO)
43 RootCnvSvc(OutputLevel=INFO)
44 
45 GaudiPersistency()
46 
47 writer = WriteHandleAlg("Writer", UseHandle=True, OutputLevel=DEBUG)
48 writer.Output.Path = "/Event/MyCollision"
49 
50 reader = ReadHandleAlg("Reader", OutputLevel=DEBUG)
51 reader.Input.Path = "MyCollision"
52 
53 # Application setup
55 # - I/O
56 app.OutStream += [dst, mini, fsr]
57 # - Algorithms
58 app.TopAlg = [writer, reader]
59 # - Events
60 app.EvtMax = 10
61 app.EvtSel = "NONE" # do not use any event input
62 app.HistogramPersistency = "NONE"
OutputStream
A small to stream Data I/O.
Definition: OutputStream.h:38
IncidentSvc
Default implementation of the IIncidentSvc interface.
Definition: IncidentSvc.h:48
Gaudi.Configuration
Definition: Configuration.py:1
MessageSvc
Definition: MessageSvc.h:40
FileRecordDataSvc
Definition: FileRecordDataSvc.cpp:48
ApplicationMgr
Definition: ApplicationMgr.h:57
RecordStream
Definition: RecordStream.h:23