15from AthenaConfiguration.AllConfigFlags
import initConfigFlags
16from AthenaConfiguration.ComponentFactory
import CompFactory
18from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg, outputStreamName
21outputFileName =
"SimplePoolFile3.root"
25flags = initConfigFlags()
26flags.Input.Files = [
"SimplePoolFile1.root"]
27flags.addFlag(f
"Output.{streamName}FileName", outputFileName)
28flags.Exec.MaxEvents = -1
29flags.Common.MsgSuppression =
False
30flags.Exec.DebugMessageComponents = [outputStreamName(streamName),
31 "PoolSvc",
"AthenaPoolCnvSvc",
"AthenaPoolAddressProviderSvc",
"MetaDataSvc"]
34from AthenaConfiguration.TestDefaults
import defaultGeometryTags
35flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN3
40from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
41acc = MainServicesCfg( flags )
44from AthenaPoolExampleAlgorithms.AthenaPoolExampleConfig
import AthenaPoolExampleReadCfg, AthenaPoolExampleWriteCfg
45acc.merge( AthenaPoolExampleReadCfg(flags, readCatalogs = [
"file:Catalog1.xml"]) )
46acc.merge( AthenaPoolExampleWriteCfg( flags, streamName,
47 writeCatalog =
"file:Catalog1.xml",
48 disableEventTag = noTag ) )
51acc.addEventAlgo( CompFactory.AthPoolEx.ReadData(
"ReadData", OutputLevel = DEBUG) )
52acc.addEventAlgo( CompFactory.AthPoolEx.ReWriteData(
"ReWriteData", OutputLevel = DEBUG) )
55from xAODEventInfoCnv.xAODEventInfoCnvConfig
import EventInfoCnvAlgCfg
56acc.merge( EventInfoCnvAlgCfg(flags, disableBeamSpot =
True) )
59streamCA = OutputStreamCfg( flags, streamName, disableEventTag =
True,
60 ItemList = [
"ExampleTrackContainer#MyTracks" ] )
61stream = streamCA.getEventAlgo( outputStreamName( streamName ) )
67stream.WritingTool.OutputLevel = 3
68stream.HelperTools[0].OutputLevel = 3
72sc = acc.run(flags.Exec.MaxEvents)
73sys.exit(sc.isFailure())