The Gaudi Framework
v41r0 (bdbe7744)
Toggle main menu visibility
Loading...
Searching...
No Matches
WriteAndReadHandle.py
Go to the documentation of this file.
1
14
15
from
Configurables
import
Gaudi__RootCnvSvc
as
RootCnvSvc
16
from
Configurables
import
Gaudi__TestSuite__ReadHandleAlg
as
ReadHandleAlg
17
from
Configurables
import
Gaudi__TestSuite__WriteHandleAlg
as
WriteHandleAlg
18
from
Configurables
import
GaudiPersistency
19
from
Gaudi.Configuration
import
*
20
21
# Output setup
22
# - DST
23
dst =
OutputStream
(
"RootDst"
)
24
25
dst.ItemList = [
"/Event#999"
]
26
dst.Output =
"DATAFILE='PFN:Handle_ROOTIO.dst' SVC='Gaudi::RootCnvSvc' OPT='RECREATE'"
27
28
# - MiniDST
29
mini =
OutputStream
(
"RootMini"
)
30
mini.ItemList = [
"/Event#1"
]
31
mini.Output =
"DATAFILE='PFN:Handle_ROOTIO.mdst' SVC='Gaudi::RootCnvSvc' OPT='RECREATE'"
32
33
# - File Summary Record
34
fsr =
RecordStream
(
"FileRecords"
)
35
fsr.ItemList = [
"/FileRecords#999"
]
36
fsr.Output = dst.Output
37
fsr.EvtDataSvc =
FileRecordDataSvc
()
38
fsr.EvtConversionSvc = FileRecordPersistencySvc()
39
40
FileCatalog(Catalogs=[
"xmlcatalog_file:Handle_ROOTIO.xml"
])
41
42
# Output Levels
43
MessageSvc
(OutputLevel=INFO)
44
IncidentSvc
(OutputLevel=INFO)
45
RootCnvSvc(OutputLevel=INFO)
46
47
GaudiPersistency()
48
49
writer = WriteHandleAlg(
"Writer"
, UseHandle=
True
, OutputLevel=DEBUG)
50
writer.Output.Path =
"/Event/MyCollision"
51
writer.AdditionalOutputs = [
"/Event/MyCollisionA"
,
"/Event/MyCollisionB"
]
52
53
reader = ReadHandleAlg(
"Reader"
, OutputLevel=DEBUG)
54
reader.Input.Path =
"MyCollision"
55
reader.AdditionalInputs = [
"MyCollisionA"
,
"MyCollisionB"
]
56
57
# Application setup
58
app =
ApplicationMgr
()
59
# - I/O
60
app.OutStream += [dst, mini, fsr]
61
# - Algorithms
62
app.TopAlg = [writer, reader]
63
# - Events
64
app.EvtMax = 10
65
app.EvtSel =
"NONE"
# do not use any event input
66
app.HistogramPersistency =
"NONE"
ApplicationMgr
The Application Manager class.
Definition
ApplicationMgr.h:54
FileRecordDataSvc
A FileRecordDataSvc is the base class for event services.
Definition
FileRecordDataSvc.cpp:48
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
WriteAndReadHandle.py
Generated on
for The Gaudi Framework by
1.17.0