The Gaudi Framework
v41r0 (bdbe7744)
Toggle main menu visibility
Loading...
Searching...
No Matches
WriteAndReadHandleWhiteBoard.py
Go to the documentation of this file.
1
14
15
from
Configurables
import
AvalancheSchedulerSvc
16
from
Configurables
import
Gaudi__RootCnvSvc
as
RootCnvSvc
17
from
Configurables
import
Gaudi__TestSuite__ReadHandleAlg
as
ReadHandleAlg
18
from
Configurables
import
Gaudi__TestSuite__WriteHandleAlg
as
WriteHandleAlg
19
from
Configurables
import
GaudiPersistency, HiveSlimEventLoopMgr, HiveWhiteBoard
20
from
Gaudi.Configuration
import
*
21
22
# Output setup
23
# - DST
24
dst =
OutputStream
(
"RootDst"
)
25
26
dst.ItemList = [
"/Event#999"
]
27
dst.Output = (
28
"DATAFILE='PFN:HandleWB_ROOTIO.dst' SVC='Gaudi::RootCnvSvc' OPT='RECREATE'"
29
)
30
31
# - MiniDST
32
mini =
OutputStream
(
"RootMini"
)
33
mini.ItemList = [
"/Event#1"
]
34
mini.Output = (
35
"DATAFILE='PFN:HandleWB_ROOTIO.mdst' SVC='Gaudi::RootCnvSvc' OPT='RECREATE'"
36
)
37
mini.OutputLevel = VERBOSE
38
39
# - File Summary Record
40
fsr =
RecordStream
(
"FileRecords"
)
41
fsr.ItemList = [
"/FileRecords#999"
]
42
fsr.Output = dst.Output
43
fsr.EvtDataSvc =
FileRecordDataSvc
()
44
fsr.EvtConversionSvc = FileRecordPersistencySvc()
45
46
FileCatalog(Catalogs=[
"xmlcatalog_file:HandleWB_ROOTIO.xml"
])
47
48
# Output Levels
49
MessageSvc
(OutputLevel=WARNING)
50
IncidentSvc
(OutputLevel=DEBUG)
51
RootCnvSvc(OutputLevel=INFO)
52
53
GaudiPersistency()
54
55
product_name =
"/Event/MyCollision"
56
57
writer = WriteHandleAlg(
"Writer"
, OutputLevel=DEBUG, UseHandle=
True
)
58
writer.Output.Path = product_name
59
60
reader = ReadHandleAlg(
"Reader"
, OutputLevel=DEBUG)
61
reader.Input.Path = product_name
62
63
evtslots = 15
64
algoparallel = 10
65
66
whiteboard =
HiveWhiteBoard
(
"EventDataSvc"
, EventSlots=evtslots)
67
68
slimeventloopmgr =
HiveSlimEventLoopMgr
()
69
70
scheduler =
AvalancheSchedulerSvc
(ThreadPoolSize=algoparallel, OutputLevel=WARNING)
71
72
# Application setup
73
app =
ApplicationMgr
()
74
# - I/O
75
# Do not put them here, but as normal algorithms.
76
# Putting two of them in the top alg list will not work if more than one
77
# algo is allowed to be in flight: at some point they will write to disk
78
# simultaneously, with catastrophic effects.
79
80
# app.OutStream += [ mini ]
81
# - Algorithms
82
app.TopAlg = [writer, reader, mini]
83
# - Events
84
app.EvtMax = 50
85
app.EvtSel =
"NONE"
# do not use any event input
86
app.HistogramPersistency =
"NONE"
87
app.ExtSvc = [whiteboard]
88
app.EventLoop = slimeventloopmgr
ApplicationMgr
The Application Manager class.
Definition
ApplicationMgr.h:54
AvalancheSchedulerSvc
Definition
AvalancheSchedulerSvc.h:114
FileRecordDataSvc
A FileRecordDataSvc is the base class for event services.
Definition
FileRecordDataSvc.cpp:48
HiveSlimEventLoopMgr
Definition
HiveSlimEventLoopMgr.h:31
HiveWhiteBoard
Data service base class.
Definition
HiveWhiteBoard.cpp:100
IncidentSvc
Default implementation of the IIncidentSvc interface.
Definition
IncidentSvc.h:35
MessageSvc
Definition
MessageSvc.h:36
OutputStream
A small to stream Data I/O.
Definition
OutputStream.h:37
RecordStream
Extension of OutputStream to write run records after last event.
Definition
RecordStream.h:22
Gaudi.Configuration
Definition
Configuration.py:1
GaudiTestSuite
options
ROOT_IO
WriteAndReadHandleWhiteBoard.py
Generated on
for The Gaudi Framework by
1.17.0