The Gaudi Framework  v36r1 (3e2fb5a8)
ReadAndWriteWhiteBoard.py
Go to the documentation of this file.
1 
14 
15 from Gaudi.Configuration import *
16 from Configurables import Gaudi__RootCnvSvc as RootCnvSvc, GaudiPersistency
17 from Configurables import WriteHandleAlg, ReadHandleAlg, HiveWhiteBoard, HiveSlimEventLoopMgr, HiveReadAlgorithm, AvalancheSchedulerSvc, AlgResourcePool
18 
19 # Output Levels
20 MessageSvc(OutputLevel=WARNING)
21 IncidentSvc(OutputLevel=DEBUG)
22 RootCnvSvc(OutputLevel=INFO)
23 SequencerTimerTool(OutputLevel=WARNING)
24 
25 # Output setup
26 # - DST
27 dst = OutputStream("RootDst")
28 dst.ItemList = ["/Event#999"]
29 dst.Output = "DATAFILE='PFN:HandleWB_ROOTOutput.dst' SVC='Gaudi::RootCnvSvc' OPT='RECREATE'"
30 dst.NeededResources = ['ROOTIO']
31 
33 
35  OutputLevel=DEBUG,
36  PrintFreq=50,
37  FirstEvent=1,
38  Input=[
39  "DATAFILE='PFN:HandleWB_ROOTIO.dst' SVC='Gaudi::RootEvtSelector' OPT='READ'"
40  ])
41 FileCatalog(Catalogs=["xmlcatalog_file:HandleWB_ROOTIO.xml"])
42 
43 product_name = "MyCollision"
44 product_name_full_path = "/Event/" + product_name
45 
46 loader = HiveReadAlgorithm(
47  "Loader", OutputLevel=INFO, NeededResources=['ROOTIO'])
48 
49 reader = ReadHandleAlg("Reader", OutputLevel=INFO, NeededResources=["ROOTIO"])
50 reader.Input.Path = product_name
51 
52 evtslots = 6
53 algoparallel = 20
54 
55 whiteboard = HiveWhiteBoard("EventDataSvc", EventSlots=evtslots)
56 
57 eventloopmgr = HiveSlimEventLoopMgr(OutputLevel=INFO)
58 
59 # We must put the full path in this deprecated expression of dependencies.
60 # Using a controlflow for the output would be the way to go
61 scheduler = AvalancheSchedulerSvc(
62  ThreadPoolSize=algoparallel,
63  OutputLevel=WARNING,
64  CheckDependencies=True,
65  DataLoaderAlg=loader.name())
66 
68  TopAlg=[loader, reader, dst],
69  EvtMax=44,
70  HistogramPersistency="NONE",
71  ExtSvc=[whiteboard],
72  EventLoop=eventloopmgr)
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
SequencerTimerTool
Definition: SequencerTimerTool.h:35
ApplicationMgr
Definition: ApplicationMgr.h:57
Gaudi.Configuration.GaudiPersistency
Definition: Configuration.py:125
EventSelector
Definition of class EventSelector.
Definition: EventSelector.h:63