Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework  v38r0 (2143aa4c)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
WriteAndReadHandleError.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 = (
25  "DATAFILE='PFN:Handle_ROOTIO_err.dst' SVC='Gaudi::RootCnvSvc' OPT='RECREATE'"
26 )
27 
28 # - MiniDST
29 mini = OutputStream("RootMini")
30 mini.ItemList = ["/Event#1"]
31 mini.Output = (
32  "DATAFILE='PFN:Handle_ROOTIO_err.mdst' SVC='Gaudi::RootCnvSvc' OPT='RECREATE'"
33 )
34 
35 # - File Summary Record
36 fsr = RecordStream("FileRecords")
37 fsr.ItemList = ["/FileRecords#999"]
38 fsr.Output = dst.Output
39 fsr.EvtDataSvc = FileRecordDataSvc()
40 fsr.EvtConversionSvc = FileRecordPersistencySvc()
41 
42 FileCatalog(Catalogs=["xmlcatalog_file:Handle_ROOTIO_err.xml"])
43 
44 # Output Levels
45 MessageSvc(OutputLevel=INFO)
46 IncidentSvc(OutputLevel=INFO)
47 RootCnvSvc(OutputLevel=INFO)
48 
49 GaudiPersistency()
50 
51 writer = WriteHandleAlg("Writer", UseHandle=True, OutputLevel=DEBUG)
52 writer.Output.Path = "/Event/MyCollision"
53 
54 reader = ReadHandleAlg("Reader", OutputLevel=DEBUG)
55 reader.Input.Path = "MyCollisionXOPSX" # <-- Mistake
56 
57 # Application setup
59 # - I/O
60 app.OutStream += [dst, mini, fsr]
61 # - Algorithms
62 app.TopAlg = [writer, reader]
63 # - Events
64 app.EvtMax = 10
65 app.EvtSel = "NONE" # do not use any event input
66 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