The Gaudi Framework  v36r1 (3e2fb5a8)
WriteWhiteBoard.py
Go to the documentation of this file.
1 
14 
15 from Gaudi.Configuration import *
16 from Configurables import Gaudi__RootCnvSvc as RootCnvSvc, GaudiPersistency
17 from Configurables import WriteHandleAlg, ReadHandleAlg, HiveWhiteBoard, HiveSlimEventLoopMgr, AlgResourcePool, AvalancheSchedulerSvc
18 
19 # Output setup
20 # - DST
21 dst = OutputStream("RootDst")
22 
23 dst.ItemList = ["/Event#999"]
24 dst.Output = "DATAFILE='PFN:HandleWB_ROOTIO.dst' SVC='Gaudi::RootCnvSvc' OPT='RECREATE'"
25 
26 # - MiniDST
27 mini = OutputStream("RootMini")
28 mini.ItemList = ["/Event#1"]
29 mini.Output = "DATAFILE='PFN:HandleWB_ROOTIO.mdst' SVC='Gaudi::RootCnvSvc' OPT='RECREATE'"
30 mini.OutputLevel = VERBOSE
31 
32 # - File Summary Record
33 fsr = RecordStream("FileRecords")
34 fsr.ItemList = ["/FileRecords#999"]
35 fsr.Output = dst.Output
36 fsr.EvtDataSvc = FileRecordDataSvc()
37 fsr.EvtConversionSvc = FileRecordPersistencySvc()
38 
39 FileCatalog(Catalogs=["xmlcatalog_file:HandleWB_ROOTIO.xml"])
40 
41 # Output Levels
42 MessageSvc(OutputLevel=WARNING)
43 IncidentSvc(OutputLevel=DEBUG)
44 RootCnvSvc(OutputLevel=INFO)
45 AlgResourcePool(OutputLevel=DEBUG)
47 
48 product_name = "MyCollision"
49 product_name_full_path = "/Event/" + product_name
50 
51 writer = WriteHandleAlg(
52  "Writer", UseHandle=True, Cardinality=1, OutputLevel=WARNING)
53 
54 writer.Output.Path = "/Event/" + product_name
55 
56 evtslots = 1
57 algoparallel = 1
58 
59 whiteboard = HiveWhiteBoard("EventDataSvc", EventSlots=evtslots)
60 
61 eventloopmgr = HiveSlimEventLoopMgr(OutputLevel=INFO)
62 
63 # We must put the full path in this deprecated expression of dependencies.
64 # Using a controlflow for the output would be the way to go
65 scheduler = AvalancheSchedulerSvc(
66  ThreadPoolSize=algoparallel, OutputLevel=INFO)
67 
68 # Application setup
70  TopAlg=[writer, dst],
71  EvtMax=500,
72  EvtSel="NONE", # do not use any event input
73  HistogramPersistency="NONE",
74  ExtSvc=[whiteboard],
75  EventLoop=eventloopmgr)
OutputStream
A small to stream Data I/O.
Definition: OutputStream.h:38
IncidentSvc
Default implementation of the IIncidentSvc interface.
Definition: IncidentSvc.h:48
Gaudi.Configuration
Definition: Configuration.py:1
MessageSvc
Definition: MessageSvc.h:40
FileRecordDataSvc
Definition: FileRecordDataSvc.cpp:48
ApplicationMgr
Definition: ApplicationMgr.h:57
Gaudi.Configuration.GaudiPersistency
Definition: Configuration.py:125
RecordStream
Definition: RecordStream.h:23