Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework  master (f31105fd)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
WriteWhiteBoard.py
Go to the documentation of this file.
1 
14 
15 from Configurables import AlgResourcePool, AvalancheSchedulerSvc
16 from Configurables import Gaudi__RootCnvSvc as RootCnvSvc
17 from Configurables import Gaudi__TestSuite__WriteHandleAlg as WriteHandleAlg
18 from Configurables import GaudiPersistency, HiveSlimEventLoopMgr, HiveWhiteBoard
19 from Gaudi.Configuration import *
20 
21 # Output setup
22 # - DST
23 dst = OutputStream("RootDst")
24 
25 dst.ItemList = ["/Event#999"]
26 dst.Output = (
27  "DATAFILE='PFN:HandleWB_ROOTIO.dst' SVC='Gaudi::RootCnvSvc' OPT='RECREATE'"
28 )
29 
30 # - MiniDST
31 mini = OutputStream("RootMini")
32 mini.ItemList = ["/Event#1"]
33 mini.Output = (
34  "DATAFILE='PFN:HandleWB_ROOTIO.mdst' SVC='Gaudi::RootCnvSvc' OPT='RECREATE'"
35 )
36 mini.OutputLevel = VERBOSE
37 
38 # - File Summary Record
39 fsr = RecordStream("FileRecords")
40 fsr.ItemList = ["/FileRecords#999"]
41 fsr.Output = dst.Output
42 fsr.EvtDataSvc = FileRecordDataSvc()
43 fsr.EvtConversionSvc = FileRecordPersistencySvc()
44 
45 FileCatalog(Catalogs=["xmlcatalog_file:HandleWB_ROOTIO.xml"])
46 
47 # Output Levels
48 MessageSvc(OutputLevel=WARNING)
49 IncidentSvc(OutputLevel=DEBUG)
50 RootCnvSvc(OutputLevel=INFO)
51 AlgResourcePool(OutputLevel=DEBUG)
52 GaudiPersistency()
53 
54 product_name = "MyCollision"
55 product_name_full_path = "/Event/" + product_name
56 
57 writer = WriteHandleAlg("Writer", UseHandle=True, Cardinality=1, OutputLevel=WARNING)
58 
59 writer.Output.Path = "/Event/" + product_name
60 
61 evtslots = 1
62 algoparallel = 1
63 
64 whiteboard = HiveWhiteBoard("EventDataSvc", EventSlots=evtslots)
65 
66 eventloopmgr = HiveSlimEventLoopMgr(OutputLevel=INFO)
67 
68 # We must put the full path in this deprecated expression of dependencies.
69 # Using a controlflow for the output would be the way to go
70 scheduler = AvalancheSchedulerSvc(ThreadPoolSize=algoparallel, OutputLevel=INFO)
71 
72 # Application setup
74  TopAlg=[writer, dst],
75  EvtMax=500,
76  EvtSel="NONE", # do not use any event input
77  HistogramPersistency="NONE",
78  ExtSvc=[whiteboard],
79  EventLoop=eventloopmgr,
80 )
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
WriteHandleAlg
Definition: ExamplesHandleAlgs.cpp:46
FileRecordDataSvc
Definition: FileRecordDataSvc.cpp:48
ApplicationMgr
Definition: ApplicationMgr.h:57
RecordStream
Definition: RecordStream.h:23