| The Gaudi Framework v32r1 (f65d50dc)

ReadAndWriteWhiteBoard.py
Go to the documentation of this file.
1
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
22 GaudiPersistency()
23
24 EventSelector(
25 OutputLevel=DEBUG,
26 PrintFreq=50,
27 FirstEvent=1,
28 Input=[
29 "DATAFILE='PFN:HandleWB_ROOTIO.dst' SVC='Gaudi::RootEvtSelector' OPT='READ'"
30 ])
31 FileCatalog(Catalogs=["xmlcatalog_file:HandleWB_ROOTIO.xml"])
32
33 product_name = "MyCollision"
34 product_name_full_path = "/Event/" + product_name
35
36 loader = HiveReadAlgorithm(
37 "Loader", OutputLevel=INFO, NeededResources=['ROOTIO'])
38
39 reader = ReadHandleAlg("Reader", OutputLevel=INFO, NeededResources=["ROOTIO"])
40 reader.Input.Path = product_name
41
42 evtslots = 6
43 algoparallel = 20
44
45 whiteboard = HiveWhiteBoard("EventDataSvc", EventSlots=evtslots)
46
47 eventloopmgr = HiveSlimEventLoopMgr(OutputLevel=INFO)
48
49 # We must put the full path in this deprecated expression of dependencies.
50 # Using a controlflow for the output would be the way to go
51 scheduler = AvalancheSchedulerSvc(
52 ThreadPoolSize=algoparallel,
53 OutputLevel=WARNING,
54 CheckDependencies=True,
55 DataLoaderAlg=loader.name())
56
57 ApplicationMgr(
58 TopAlg=[loader, reader, dst],
59 EvtMax=44,
60 HistogramPersistency="NONE",
61 ExtSvc=[whiteboard],
62 EventLoop=eventloopmgr)
Gaudi.Configuration
Definition: Configuration.py:1
OutputStream
A small to stream Data I/O.
Definition: OutputStream.h:28
Gaudi.Configuration.GaudiPersistency
Definition: Configuration.py:113
ApplicationMgr
The Application Manager class.
Definition: ApplicationMgr.h:45
SequencerTimerTool
Implements the time measurement inside a sequencer.
Definition: SequencerTimerTool.h:25
EventSelector
Definition of class EventSelector.
Definition: EventSelector.h:53
IncidentSvc
Default implementation of the IIncidentSvc interface.
Definition: IncidentSvc.h:38
MessageSvc
Definition: MessageSvc.h:30