| The Gaudi Framework v29r1 (5cd95fa2)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

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, ForwardSchedulerSvc, 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
22 GaudiPersistency()
23
24 EventSelector(OutputLevel=DEBUG, PrintFreq=50, FirstEvent=1,
25 Input=["DATAFILE='PFN:HandleWB_ROOTIO.dst' SVC='Gaudi::RootEvtSelector' OPT='READ'"])
26 FileCatalog(Catalogs=["xmlcatalog_file:HandleWB_ROOTIO.xml"])
27
28 product_name = "MyCollision"
29 product_name_full_path = "/Event/" + product_name
30
31 loader = HiveReadAlgorithm("Loader",
32 OutputLevel=INFO,
33 NeededResources=['ROOTIO']
34 )
35
36 reader = ReadHandleAlg("Reader",
37 OutputLevel=INFO,
38 NeededResources=["ROOTIO"])
39 reader.Input.Path = product_name
40
41
42 evtslots = 6
43 algoparallel = 20
44
45 whiteboard = HiveWhiteBoard("EventDataSvc",
46 EventSlots=evtslots)
47
48 eventloopmgr = HiveSlimEventLoopMgr(OutputLevel=INFO)
49
50 # We must put the full path in this deprecated expression of dependencies.
51 # Using a controlflow for the output would be the way to go
52 scheduler = ForwardSchedulerSvc(MaxAlgosInFlight=algoparallel,
53 OutputLevel=WARNING)
54
55 ApplicationMgr(TopAlg=[loader, reader, dst],
56 EvtMax=44,
57 HistogramPersistency="NONE",
58 ExtSvc=[whiteboard],
59 EventLoop=eventloopmgr)
Gaudi.Configuration
Definition: Configuration.py:1
OutputStream
A small to stream Data I/O.
Definition: OutputStream.h:29
Gaudi.Configuration.GaudiPersistency
Definition: Configuration.py:128
ApplicationMgr
The Application Manager class.
Definition: ApplicationMgr.h:47
SequencerTimerTool
Implements the time measurement inside a sequencer.
Definition: SequencerTimerTool.h:25
EventSelector
Definition of class EventSelector.
Definition: EventSelector.h:53
IncidentSvc
Default implementation of the IIncidentSvc interface.
Definition: IncidentSvc.h:37
MessageSvc
Definition: MessageSvc.h:30