The Gaudi Framework  v30r3 (a5ef0a68)
ReadWhiteBoard.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, StoreSnifferAlg
7 from Configurables import WriteHandleAlg, ReadHandleAlg, HiveWhiteBoard, HiveSlimEventLoopMgr, HiveReadAlgorithm, AvalancheSchedulerSvc, AlgResourcePool
8 
9 # Output Levels
10 MessageSvc(OutputLevel=WARNING)
11 IncidentSvc(OutputLevel=INFO)
12 RootCnvSvc(OutputLevel=INFO)
13 SequencerTimerTool(OutputLevel=WARNING)
14 
16 
17 EventSelector(OutputLevel=DEBUG, PrintFreq=50, FirstEvent=1,
18  Input=["DATAFILE='PFN:HandleWB_ROOTIO.dst' SVC='Gaudi::RootEvtSelector' OPT='READ'"])
19 FileCatalog(Catalogs=["xmlcatalog_file:HandleWB_ROOTIO.xml"])
20 
21 product_name = "MyCollision"
22 product_name_full_path = "/Event/" + product_name
23 
24 loader = HiveReadAlgorithm("Loader",
25  OutputLevel=INFO,
26  NeededResources=['ROOTIO', 'SOMETHINGELSE'],
27  Cardinality=2 # framework should be able to fix this config problem
28  )
29 
30 sniffer = StoreSnifferAlg()
31 reader = ReadHandleAlg("Reader",
32  Cardinality=4,
33  OutputLevel=INFO)
34 reader.Input.Path = product_name
35 
36 evtslots = 1
37 algoparallel = 10
38 
39 whiteboard = HiveWhiteBoard("EventDataSvc",
40  EventSlots=evtslots)
41 
42 eventloopmgr = HiveSlimEventLoopMgr(OutputLevel=INFO)
43 
44 # We must put the full path in this deprecated expression of dependencies.
45 # Using a controlflow for the output would be the way to go
46 scheduler = AvalancheSchedulerSvc(ThreadPoolSize=algoparallel,
47  OutputLevel=WARNING,
48  DataLoaderAlg=loader.name(),
49  CheckDependencies=True)
50 
51 
52 # Application setup
53 ApplicationMgr(TopAlg=[loader, sniffer, reader],
54  EvtMax=500,
55  HistogramPersistency="NONE",
56  ExtSvc=[whiteboard],
57  EventLoop=eventloopmgr)
Small algorithm, which traverses the data store and prints a summary of the leafs accessed during the...
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