The Gaudi Framework  master (37c0b60a)
ReadWhiteBoard.py
Go to the documentation of this file.
1 
14 
15 from Configurables import AvalancheSchedulerSvc
16 from Configurables import Gaudi__RootCnvSvc as RootCnvSvc
17 from Configurables import Gaudi__TestSuite__ReadHandleAlg as ReadHandleAlg
18 from Configurables import (
19  GaudiPersistency,
20  HiveReadAlgorithm,
21  HiveSlimEventLoopMgr,
22  HiveWhiteBoard,
23  StoreSnifferAlg,
24 )
25 from Gaudi.Configuration import *
26 
27 # Output Levels
28 MessageSvc(OutputLevel=WARNING)
29 IncidentSvc(OutputLevel=INFO)
30 RootCnvSvc(OutputLevel=INFO)
31 
32 GaudiPersistency()
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 )
42 FileCatalog(Catalogs=["xmlcatalog_file:HandleWB_ROOTIO.xml"])
43 
44 product_name = "MyCollision"
45 product_name_full_path = "/Event/" + product_name
46 
47 loader = HiveReadAlgorithm(
48  "Loader",
49  OutputLevel=INFO,
50  NeededResources=["ROOTIO", "SOMETHINGELSE"],
51  Cardinality=2, # framework should be able to fix this config problem
52 )
53 
54 sniffer = StoreSnifferAlg()
55 reader = ReadHandleAlg("Reader", Cardinality=4, OutputLevel=INFO)
56 reader.Input.Path = product_name
57 
58 evtslots = 1
59 algoparallel = 10
60 
61 whiteboard = HiveWhiteBoard("EventDataSvc", EventSlots=evtslots)
62 
63 eventloopmgr = HiveSlimEventLoopMgr(OutputLevel=INFO)
64 
65 # We must put the full path in this deprecated expression of dependencies.
66 # Using a controlflow for the output would be the way to go
67 scheduler = AvalancheSchedulerSvc(
68  ThreadPoolSize=algoparallel,
69  OutputLevel=WARNING,
70  DataLoaderAlg=loader.name(),
71  CheckDependencies=True,
72 )
73 
74 # Application setup
76  TopAlg=[loader, sniffer, reader],
77  EvtMax=500,
78  HistogramPersistency="NONE",
79  ExtSvc=[whiteboard],
80  EventLoop=eventloopmgr,
81 )
ReadHandleAlg
Definition: ExamplesHandleAlgs.cpp:25
IncidentSvc
Default implementation of the IIncidentSvc interface.
Definition: IncidentSvc.h:48
Gaudi.Configuration
Definition: Configuration.py:1
MessageSvc
Definition: MessageSvc.h:40
ApplicationMgr
Definition: ApplicationMgr.h:57
EventSelector
Definition of class EventSelector.
Definition: EventSelector.h:63