ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Event
xAOD
xAODEventFormatCnv
python
TestReadEventFormat.py
Go to the documentation of this file.
1
# Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
2
import
sys
3
4
from
AthenaPoolCnvSvc.PoolReadConfig
import
PoolReadCfg
5
from
AthenaConfiguration.ComponentFactory
import
CompFactory
6
from
AthenaConfiguration
import
MainServicesConfig
7
from
AthenaServices.MetaDataSvcConfig
import
MetaDataSvcCfg
8
from
xAODEventFormatCnv.EventFormatTestConfig
import
EventFormatTestFlags
9
10
11
def
main
():
12
flags = EventFormatTestFlags(
13
inputFiles=[
"Test0.pool.root"
],
14
eventsPerFile=1,
15
)
16
17
flags.fillFromArgs()
18
flags.lock()
19
20
acc = MainServicesConfig.MainServicesCfg(flags)
21
acc.merge(PoolReadCfg(flags))
22
acc.addEventAlgo(CompFactory.xAODMakerTest.EventFormatPrinterAlg())
23
24
acc.merge(
25
MetaDataSvcCfg(
26
flags,
27
tools=[
28
CompFactory.xAODMaker.EventFormatMetaDataTool(
29
"EventFormatMetaDataTool"
,
30
OutputLevel=1,
31
Keys=[
32
"EventFormatStreamTest0"
,
33
"EventFormatAOD"
,
34
"SomeNotExistentKey"
,
35
],
36
),
37
CompFactory.xAODMaker.FileMetaDataTool(
38
"FileMetaDataTool"
,
39
OutputLevel=3,
40
),
41
],
42
)
43
)
44
45
acc.run(flags.Exec.MaxEvents)
46
47
48
if
__name__ ==
"__main__"
:
49
sys.exit(
main
())
TestReadEventFormat.main
main()
Definition
TestReadEventFormat.py:11
Generated on
for ATLAS Offline Software by
1.17.0