| The Gaudi Framework v27r1

- 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 IsClonable=True,
38 OutputLevel=INFO,
39 NeededResources=["ROOTIO"])
40 reader.Input.Path=product_name
41
42
43 evtslots = 6
44 algoparallel = 20
45
46 whiteboard = HiveWhiteBoard("EventDataSvc",
47 EventSlots = evtslots)
48
49 eventloopmgr = HiveSlimEventLoopMgr(OutputLevel=INFO)
50
51 # We must put the full path in this deprecated expression of dependencies.
52 # Using a controlflow for the output would be the way to go
53 scheduler = ForwardSchedulerSvc(MaxAlgosInFlight = algoparallel,
54 OutputLevel=WARNING)
55
56 ApplicationMgr( TopAlg = [loader, reader,dst],
57 EvtMax = 44,
58 HistogramPersistency = "NONE",
59 ExtSvc = [whiteboard],
60 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:121
ApplicationMgr
The Application Manager class.
Definition: ApplicationMgr.h:46
SequencerTimerTool
Implements the time measurement inside a sequencer.
Definition: SequencerTimerTool.h:26
EventSelector
Definition of class EventSelector.
Definition: EventSelector.h:53
IncidentSvc
Default implementation of the IIncidentSvc interface.
Definition: IncidentSvc.h:33
MessageSvc
Definition: MessageSvc.h:30