The Gaudi Framework  master (bb95dfce)
Loading...
Searching...
No Matches
ReadAndWriteWhiteBoard.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 (
19 AlgResourcePool,
20 GaudiPersistency,
21 HiveReadAlgorithm,
22 HiveSlimEventLoopMgr,
23 HiveWhiteBoard,
24)
25from Gaudi.Configuration import *
26
27# Output Levels
28MessageSvc(OutputLevel=WARNING)
29IncidentSvc(OutputLevel=DEBUG)
30RootCnvSvc(OutputLevel=INFO)
31
32# Output setup
33# - DST
34dst = OutputStream("RootDst")
35dst.ItemList = ["/Event#999"]
36dst.Output = (
37 "DATAFILE='PFN:HandleWB_ROOTOutput.dst' SVC='Gaudi::RootCnvSvc' OPT='RECREATE'"
38)
39dst.NeededResources = {"ROOTIO": 1}
40
41GaudiPersistency()
42
44 OutputLevel=DEBUG,
45 PrintFreq=50,
46 FirstEvent=1,
47 Input=[
48 "DATAFILE='PFN:HandleWB_ROOTIO.dst' SVC='Gaudi::RootEvtSelector' OPT='READ'"
49 ],
50)
51FileCatalog(Catalogs=["xmlcatalog_file:HandleWB_ROOTIO.xml"])
52
53product_name = "MyCollision"
54product_name_full_path = "/Event/" + product_name
55
56loader = HiveReadAlgorithm("Loader", OutputLevel=INFO, NeededResources={"ROOTIO": 1})
57
58reader = ReadHandleAlg("Reader", OutputLevel=INFO, NeededResources={"ROOTIO": 1})
59reader.Input.Path = product_name
60
61evtslots = 6
62algoparallel = 20
63
64whiteboard = HiveWhiteBoard("EventDataSvc", EventSlots=evtslots)
65
66eventloopmgr = HiveSlimEventLoopMgr(OutputLevel=INFO)
67
68# Configure the available resources
69AlgResourcePool(AvailableResources={"ROOTIO": 1})
70
71# We must put the full path in this deprecated expression of dependencies.
72# Using a controlflow for the output would be the way to go
74 ThreadPoolSize=algoparallel,
75 OutputLevel=WARNING,
76 CheckDependencies=True,
77 DataLoaderAlg=loader.name(),
78)
79
81 TopAlg=[loader, reader, dst],
82 EvtMax=44,
83 HistogramPersistency="NONE",
84 ExtSvc=[whiteboard],
85 EventLoop=eventloopmgr,
86)
The AlgResourcePool is a concrete implementation of the IAlgResourcePool interface.
The Application Manager class.
Definition of class EventSelector.
Data service base class.
Default implementation of the IIncidentSvc interface.
Definition IncidentSvc.h:35
A small to stream Data I/O.