The Gaudi Framework  master (b9786168)
Loading...
Searching...
No Matches
WriteWhiteBoard.py
Go to the documentation of this file.
14
15from Configurables import AlgResourcePool, AvalancheSchedulerSvc
16from Configurables import Gaudi__RootCnvSvc as RootCnvSvc
17from Configurables import Gaudi__TestSuite__WriteHandleAlg as WriteHandleAlg
18from Configurables import GaudiPersistency, HiveSlimEventLoopMgr, HiveWhiteBoard
19from Gaudi.Configuration import *
20
21# Output setup
22# - DST
23dst = OutputStream("RootDst")
24
25dst.ItemList = ["/Event#999"]
26dst.Output = (
27 "DATAFILE='PFN:HandleWB_ROOTIO.dst' SVC='Gaudi::RootCnvSvc' OPT='RECREATE'"
28)
29
30# - MiniDST
31mini = OutputStream("RootMini")
32mini.ItemList = ["/Event#1"]
33mini.Output = (
34 "DATAFILE='PFN:HandleWB_ROOTIO.mdst' SVC='Gaudi::RootCnvSvc' OPT='RECREATE'"
35)
36mini.OutputLevel = VERBOSE
37
38# - File Summary Record
39fsr = RecordStream("FileRecords")
40fsr.ItemList = ["/FileRecords#999"]
41fsr.Output = dst.Output
42fsr.EvtDataSvc = FileRecordDataSvc()
43fsr.EvtConversionSvc = FileRecordPersistencySvc()
44
45FileCatalog(Catalogs=["xmlcatalog_file:HandleWB_ROOTIO.xml"])
46
47# Output Levels
48MessageSvc(OutputLevel=WARNING)
49IncidentSvc(OutputLevel=DEBUG)
50RootCnvSvc(OutputLevel=INFO)
51AlgResourcePool(OutputLevel=DEBUG)
52GaudiPersistency()
53
54product_name = "MyCollision"
55product_name_full_path = "/Event/" + product_name
56
57writer = WriteHandleAlg("Writer", UseHandle=True, Cardinality=1, OutputLevel=WARNING)
58
59writer.Output.Path = "/Event/" + product_name
60
61evtslots = 1
62algoparallel = 1
63
64whiteboard = HiveWhiteBoard("EventDataSvc", EventSlots=evtslots)
65
66eventloopmgr = HiveSlimEventLoopMgr(OutputLevel=INFO)
67
68# We must put the full path in this deprecated expression of dependencies.
69# Using a controlflow for the output would be the way to go
70scheduler = AvalancheSchedulerSvc(ThreadPoolSize=algoparallel, OutputLevel=INFO)
71
72# Application setup
74 TopAlg=[writer, dst],
75 EvtMax=500,
76 EvtSel="NONE", # do not use any event input
77 HistogramPersistency="NONE",
78 ExtSvc=[whiteboard],
79 EventLoop=eventloopmgr,
80)
The AlgResourcePool is a concrete implementation of the IAlgResourcePool interface.
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.