15from AthenaConfiguration.AllConfigFlags
import initConfigFlags
16from AthenaConfiguration.ComponentFactory
import CompFactory
18from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg, outputStreamName
21outputFileName =
"SimplePoolFile4.root"
25flags = initConfigFlags()
26flags.Input.Files = [
"SimplePoolFile3.root"]
27flags.addFlag(f
"Output.{streamName}FileName", outputFileName)
28flags.Exec.MaxEvents = -1
29flags.Common.MsgSuppression =
False
30flags.Exec.DebugMessageComponents = [outputStreamName(streamName),
31 "ReadData",
"ReWriteData",
32 "PoolSvc",
"AthenaPoolCnvSvc",
"AthenaPoolAddressProviderSvc",
"MetaDataSvc"]
35from AthenaConfiguration.TestDefaults
import defaultGeometryTags
36flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN3
41from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
42acc = MainServicesCfg( flags )
45from AthenaPoolExampleAlgorithms.AthenaPoolExampleConfig
import AthenaPoolExampleReadCfg, AthenaPoolExampleWriteCfg
46acc.merge( AthenaPoolExampleReadCfg(flags, readCatalogs = [
"file:Catalog1.xml"]) )
47acc.merge( AthenaPoolExampleWriteCfg(flags, streamName,
48 writeCatalog =
"file:Catalog1.xml",
49 disableEventTag = noTag) )
52acc.addEventAlgo( CompFactory.AthPoolEx.ReadData(
"ReadData", OutputLevel = DEBUG) )
53acc.addEventAlgo( CompFactory.AthPoolEx.ReWriteData(
"ReWriteData", ExampleHitKey=
"", OutputLevel = DEBUG) )
56streamCA = OutputStreamCfg(flags, streamName, disableEventTag = noTag,
57 ItemList = [
"EventInfo#*",
"ExampleTrackContainer#MyTracks"] )
58stream = streamCA.getEventAlgo( outputStreamName( streamName ) )
64stream.WritingTool.OutputLevel = 3
65stream.HelperTools[0].OutputLevel = 3
69sc = acc.run(flags.Exec.MaxEvents)
70sys.exit(sc.isFailure())