Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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(
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())
EventFormatTestConfig.EventFormatTestFlags
def EventFormatTestFlags(eventsPerFile=5, inputFiles=None)
Definition: EventFormatTestConfig.py:12
TestReadEventFormat.main
def main()
Definition: TestReadEventFormat.py:11
python.MetaDataSvcConfig.MetaDataSvcCfg
def MetaDataSvcCfg(flags, toolNames=[], tools=[])
Definition: MetaDataSvcConfig.py:6
python.PoolReadConfig.PoolReadCfg
def PoolReadCfg(flags)
Definition: PoolReadConfig.py:69