| The Gaudi Framework v32r1 (f65d50dc)

WriteWhiteBoard.py
Go to the documentation of this file.
1
4
5 from Gaudi.Configuration import *
6 from Configurables import Gaudi__RootCnvSvc as RootCnvSvc, GaudiPersistency
7 from Configurables import WriteHandleAlg, ReadHandleAlg, HiveWhiteBoard, HiveSlimEventLoopMgr, AlgResourcePool, AvalancheSchedulerSvc
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 # - File Summary Record
23 fsr = RecordStream("FileRecords")
24 fsr.ItemList = ["/FileRecords#999"]
25 fsr.Output = dst.Output
26 fsr.EvtDataSvc = FileRecordDataSvc()
27 fsr.EvtConversionSvc = FileRecordPersistencySvc()
28
29 FileCatalog(Catalogs=["xmlcatalog_file:HandleWB_ROOTIO.xml"])
30
31 # Output Levels
32 MessageSvc(OutputLevel=WARNING)
33 IncidentSvc(OutputLevel=DEBUG)
34 RootCnvSvc(OutputLevel=INFO)
35 AlgResourcePool(OutputLevel=DEBUG)
36 GaudiPersistency()
37
38 product_name = "MyCollision"
39 product_name_full_path = "/Event/" + product_name
40
41 writer = WriteHandleAlg(
42 "Writer", UseHandle=True, Cardinality=1, OutputLevel=WARNING)
43
44 writer.Output.Path = "/Event/" + product_name
45
46 evtslots = 1
47 algoparallel = 1
48
49 whiteboard = HiveWhiteBoard("EventDataSvc", EventSlots=evtslots)
50
51 eventloopmgr = HiveSlimEventLoopMgr(OutputLevel=INFO)
52
53 # We must put the full path in this deprecated expression of dependencies.
54 # Using a controlflow for the output would be the way to go
55 scheduler = AvalancheSchedulerSvc(
56 ThreadPoolSize=algoparallel, OutputLevel=INFO)
57
58 # Application setup
59 ApplicationMgr(
60 TopAlg=[writer, dst],
61 EvtMax=500,
62 EvtSel="NONE", # do not use any event input
63 HistogramPersistency="NONE",
64 ExtSvc=[whiteboard],
65 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:28
Gaudi.Configuration.GaudiPersistency
Definition: Configuration.py:113
FileRecordDataSvc
A FileRecordDataSvc is the base class for event services.
Definition: FileRecordDataSvc.cpp:38
ApplicationMgr
The Application Manager class.
Definition: ApplicationMgr.h:45
IncidentSvc
Default implementation of the IIncidentSvc interface.
Definition: IncidentSvc.h:38
MessageSvc
Definition: MessageSvc.h:30