Loading [MathJax]/jax/output/SVG/config.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Functions
TestReadWriteEventFormat Namespace Reference

Functions

def main ()
 

Function Documentation

◆ main()

def TestReadWriteEventFormat.main ( )

Definition at line 14 of file TestReadWriteEventFormat.py.

14 def main():
15  numberOfStreams = 1
16  flags = EventFormatTestFlags(
17  inputFiles=["Test0.pool.root"],
18  eventsPerFile=1,
19  )
20  streamName = "ReadWriteTest"
21  for i in range(numberOfStreams):
22  flags.addFlag(
23  f"Output.{streamName}{i}FileName",
24  f"{streamName}{i}.pool.root",
25  )
26  flags.addFlag(f"Output.doWrite{streamName}{i}", True)
27 
28  flags.fillFromArgs()
29  flags.lock()
30 
31  itemList = [
32  "xAODMakerTest::AVec#TestObject",
33  "xAODMakerTest::AAuxContainer#TestObjectAux.",
34  "xAODMakerTest::AVec#TestObject2",
35  "xAODMakerTest::AAuxContainer#TestObject2Aux.",
36  "xAOD::EventInfo#EventInfo",
37  "xAOD::EventAuxInfo#EventInfoAux.",
38  ]
39 
41  flags,
42  streamName="ReadWriteTest",
43  itemList=itemList,
44  numberOfStreams=numberOfStreams,
45  )
46 
47  acc.addEventAlgo(
48  CompFactory.xAODMakerTest.ACreatorAlg("ACreator", OutputKey="TestObject2")
49  )
50  acc.merge(EventInfoCnvAlgCfg(flags=flags, inputKey="", disableBeamSpot=True))
51  acc.merge(PoolReadCfg(flags))
52  acc.merge(
54  flags,
55  tools=[
56  CompFactory.xAODMaker.EventFormatMetaDataTool(
57  "EventFormatMetaDataTool",
58  OutputLevel=1,
59  Keys=[
60  "EventFormatStreamTest0",
61  "EventFormatAOD",
62  "SomeNotExistentKey",
63  ],
64  ),
65  CompFactory.xAODMaker.FileMetaDataTool(
66  "FileMetaDataTool",
67  OutputLevel=3,
68  ),
69  ],
70  )
71  )
72  acc.addEventAlgo(CompFactory.xAODMakerTest.EventFormatPrinterAlg())
73  acc.addEventAlgo(
74  CompFactory.xAODMakerTest.ACreatorAlg("ACreator", OutputKey="TestObject2")
75  )
76  acc.run(flags.Exec.MaxEvents)
77 
78 
EventFormatTestConfig.EventFormatTestFlags
def EventFormatTestFlags(eventsPerFile=5, inputFiles=None)
Definition: EventFormatTestConfig.py:12
TestReadWriteEventFormat.main
def main()
Definition: TestReadWriteEventFormat.py:14
EventFormatTestConfig.EventFormatTestOutputCfg
def EventFormatTestOutputCfg(flags, streamName="Test", numberOfStreams=5, itemList=None)
Definition: EventFormatTestConfig.py:24
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
python.MetaDataSvcConfig.MetaDataSvcCfg
def MetaDataSvcCfg(flags, toolNames=[], tools=[])
Definition: MetaDataSvcConfig.py:6
python.xAODEventInfoCnvConfig.EventInfoCnvAlgCfg
def EventInfoCnvAlgCfg(flags, name="EventInfoCnvAlg", inputKey="McEventInfo", outputKey="EventInfo", disableBeamSpot=False, **kwargs)
Definition: xAODEventInfoCnvConfig.py:11
python.PoolReadConfig.PoolReadCfg
def PoolReadCfg(flags)
Definition: PoolReadConfig.py:69