Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework  v31r0 (aeb156f0)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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 
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 
58  TopAlg=[loader, reader, dst],
59  EvtMax=44,
60  HistogramPersistency="NONE",
61  ExtSvc=[whiteboard],
62  EventLoop=eventloopmgr)
A small to stream Data I/O.
Definition: OutputStream.h:28
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:38