| The Gaudi Framework v27r1

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

- File List
- File Members

WriteWhiteBoard.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, AlgResourcePool, ForwardSchedulerSvc
8
9 # Output setup
10 # - DST
11 dst = OutputStream("RootDst")
12
13 dst.ItemList = ["/Event#999"]
14 dst.Output = "DATAFILE='PFN:HandleWB_ROOTIO.dst' SVC='Gaudi::RootCnvSvc' OPT='RECREATE'"
15
16 # - MiniDST
17 mini = OutputStream("RootMini")
18 mini.ItemList = ["/Event#1"]
19 mini.Output = "DATAFILE='PFN:HandleWB_ROOTIO.mdst' SVC='Gaudi::RootCnvSvc' OPT='RECREATE'";
20 mini.OutputLevel = VERBOSE
21
22
23 # - File Summary Record
24 fsr = RecordStream("FileRecords")
25 fsr.ItemList = [ "/FileRecords#999" ]
26 fsr.Output = dst.Output
27 fsr.EvtDataSvc = FileRecordDataSvc()
28 fsr.EvtConversionSvc = FileRecordPersistencySvc()
29
30 FileCatalog(Catalogs = [ "xmlcatalog_file:HandleWB_ROOTIO.xml" ])
31
32 # Output Levels
33 MessageSvc(OutputLevel=WARNING)
34 IncidentSvc(OutputLevel=DEBUG)
35 RootCnvSvc(OutputLevel=INFO)
36 AlgResourcePool(OutputLevel=DEBUG)
37 GaudiPersistency()
38
39 product_name="MyCollision"
40 product_name_full_path="/Event/"+product_name
41
42 writer = WriteHandleAlg ("Writer",
43 UseHandle=True,
44 Cardinality=4,
45 OutputLevel=WARNING)
46
47 writer.Output.Path ="/Event/"+product_name
48
49
50 evtslots = 20
51 algoparallel = 10
52
53 whiteboard = HiveWhiteBoard("EventDataSvc",
54 EventSlots = evtslots)
55
56 eventloopmgr = HiveSlimEventLoopMgr(OutputLevel=INFO)
57
58 # We must put the full path in this deprecated expression of dependencies.
59 # Using a controlflow for the output would be the way to go
60 scheduler = ForwardSchedulerSvc(MaxAlgosInFlight = algoparallel,
61 OutputLevel=INFO)
62
63 # Application setup
64 ApplicationMgr( TopAlg = [writer,dst],
65 EvtMax = 500,
66 EvtSel = "NONE", # do not use any event input
67 HistogramPersistency = "NONE",
68 ExtSvc = [whiteboard],
69 EventLoop = eventloopmgr)
Gaudi.Configuration
Definition: Configuration.py:1
RecordStream
Extension of OutputStream to write run records after last event.
Definition: RecordStream.h:13
OutputStream
A small to stream Data I/O.
Definition: OutputStream.h:29
Gaudi.Configuration.GaudiPersistency
Definition: Configuration.py:121
FileRecordDataSvc
A FileRecordDataSvc is the base class for event services.
Definition: FileRecordDataSvc.cpp:38
ApplicationMgr
The Application Manager class.
Definition: ApplicationMgr.h:46
IncidentSvc
Default implementation of the IIncidentSvc interface.
Definition: IncidentSvc.h:33
MessageSvc
Definition: MessageSvc.h:30