The Gaudi Framework  master (e68eea06)
Loading...
Searching...
No Matches
WriteAndReadHandleWhiteBoard.py
Go to the documentation of this file.
14
15from Configurables import AvalancheSchedulerSvc
16from Configurables import Gaudi__RootCnvSvc as RootCnvSvc
17from Configurables import Gaudi__TestSuite__ReadHandleAlg as ReadHandleAlg
18from Configurables import Gaudi__TestSuite__WriteHandleAlg as WriteHandleAlg
19from Configurables import GaudiPersistency, HiveSlimEventLoopMgr, HiveWhiteBoard
20from Gaudi.Configuration import *
21
22# Output setup
23# - DST
24dst = OutputStream("RootDst")
25
26dst.ItemList = ["/Event#999"]
27dst.Output = (
28 "DATAFILE='PFN:HandleWB_ROOTIO.dst' SVC='Gaudi::RootCnvSvc' OPT='RECREATE'"
29)
30
31# - MiniDST
32mini = OutputStream("RootMini")
33mini.ItemList = ["/Event#1"]
34mini.Output = (
35 "DATAFILE='PFN:HandleWB_ROOTIO.mdst' SVC='Gaudi::RootCnvSvc' OPT='RECREATE'"
36)
37mini.OutputLevel = VERBOSE
38
39# - File Summary Record
40fsr = RecordStream("FileRecords")
41fsr.ItemList = ["/FileRecords#999"]
42fsr.Output = dst.Output
43fsr.EvtDataSvc = FileRecordDataSvc()
44fsr.EvtConversionSvc = FileRecordPersistencySvc()
45
46FileCatalog(Catalogs=["xmlcatalog_file:HandleWB_ROOTIO.xml"])
47
48# Output Levels
49MessageSvc(OutputLevel=WARNING)
50IncidentSvc(OutputLevel=DEBUG)
51RootCnvSvc(OutputLevel=INFO)
52
53GaudiPersistency()
54
55product_name = "/Event/MyCollision"
56
57writer = WriteHandleAlg("Writer", OutputLevel=DEBUG, UseHandle=True)
58writer.Output.Path = product_name
59
60reader = ReadHandleAlg("Reader", OutputLevel=DEBUG)
61reader.Input.Path = product_name
62
63evtslots = 15
64algoparallel = 10
65
66whiteboard = HiveWhiteBoard("EventDataSvc", EventSlots=evtslots)
67
68slimeventloopmgr = HiveSlimEventLoopMgr()
69
70scheduler = AvalancheSchedulerSvc(ThreadPoolSize=algoparallel, OutputLevel=WARNING)
71
72# Application setup
74# - I/O
75# Do not put them here, but as normal algorithms.
76# Putting two of them in the top alg list will not work if more than one
77# algo is allowed to be in flight: at some point they will write to disk
78# simultaneously, with catastrophic effects.
79
80# app.OutStream += [ mini ]
81# - Algorithms
82app.TopAlg = [writer, reader, mini]
83# - Events
84app.EvtMax = 50
85app.EvtSel = "NONE" # do not use any event input
86app.HistogramPersistency = "NONE"
87app.ExtSvc = [whiteboard]
88app.EventLoop = slimeventloopmgr
The Application Manager class.
A FileRecordDataSvc is the base class for event services.
Data service base class.
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.