The Gaudi Framework  v30r3 (a5ef0a68)
ReadAndWriteWhiteBoard.py
Go to the documentation of this file.
1 ####################################################################
2 # Write a DST and a miniDST, including File Summary Records
3 ####################################################################
4 
5 from Gaudi.Configuration import *
6 from Configurables import Gaudi__RootCnvSvc as RootCnvSvc, GaudiPersistency
7 from Configurables import WriteHandleAlg, ReadHandleAlg, HiveWhiteBoard, HiveSlimEventLoopMgr, HiveReadAlgorithm, AvalancheSchedulerSvc, AlgResourcePool
8 
9 # Output Levels
10 MessageSvc(OutputLevel=WARNING)
11 IncidentSvc(OutputLevel=DEBUG)
12 RootCnvSvc(OutputLevel=INFO)
13 SequencerTimerTool(OutputLevel=WARNING)
14 
15 # Output setup
16 # - DST
17 dst = OutputStream("RootDst")
18 dst.ItemList = ["/Event#999"]
19 dst.Output = "DATAFILE='PFN:HandleWB_ROOTOutput.dst' SVC='Gaudi::RootCnvSvc' OPT='RECREATE'"
20 dst.NeededResources = ['ROOTIO']
21 
23 
24 EventSelector(OutputLevel=DEBUG, PrintFreq=50, FirstEvent=1,
25  Input=["DATAFILE='PFN:HandleWB_ROOTIO.dst' SVC='Gaudi::RootEvtSelector' OPT='READ'"])
26 FileCatalog(Catalogs=["xmlcatalog_file:HandleWB_ROOTIO.xml"])
27 
28 product_name = "MyCollision"
29 product_name_full_path = "/Event/" + product_name
30 
31 loader = HiveReadAlgorithm("Loader",
32  OutputLevel=INFO,
33  NeededResources=['ROOTIO']
34  )
35 
36 reader = ReadHandleAlg("Reader",
37  OutputLevel=INFO,
38  NeededResources=["ROOTIO"])
39 reader.Input.Path = product_name
40 
41 
42 evtslots = 6
43 algoparallel = 20
44 
45 whiteboard = HiveWhiteBoard("EventDataSvc",
46  EventSlots=evtslots)
47 
48 eventloopmgr = HiveSlimEventLoopMgr(OutputLevel=INFO)
49 
50 # We must put the full path in this deprecated expression of dependencies.
51 # Using a controlflow for the output would be the way to go
52 scheduler = AvalancheSchedulerSvc(ThreadPoolSize=algoparallel,
53  OutputLevel=WARNING,
54  CheckDependencies=True,
55  DataLoaderAlg=loader.name())
56 
57 ApplicationMgr(TopAlg=[loader, reader, dst],
58  EvtMax=44,
59  HistogramPersistency="NONE",
60  ExtSvc=[whiteboard],
61  EventLoop=eventloopmgr)
A small to stream Data I/O.
Definition: OutputStream.h:29
The Application Manager class.
Implements the time measurement inside a sequencer.
Definition of class EventSelector.
Definition: EventSelector.h:53
Default implementation of the IIncidentSvc interface.
Definition: IncidentSvc.h:37