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"]
35from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
36acc = MainServicesCfg( flags )
39from AthenaPoolExampleAlgorithms.AthenaPoolExampleConfig
import AthenaPoolExampleReadCfg, AthenaPoolExampleWriteCfg
40acc.merge( AthenaPoolExampleReadCfg(flags, readCatalogs = [
"file:Catalog1.xml"]) )
41acc.merge( AthenaPoolExampleWriteCfg( flags, streamName,
42 writeCatalog =
"file:Catalog1.xml",
43 disableEventTag = noTag ) )
46acc.addEventAlgo( CompFactory.AthPoolEx.ReadData(
"ReadData", OutputLevel = DEBUG) )
47acc.addEventAlgo( CompFactory.AthPoolEx.ReWriteData(
"ReWriteData", OutputLevel = DEBUG) )
50from xAODEventInfoCnv.xAODEventInfoCnvConfig
import EventInfoCnvAlgCfg
51acc.merge( EventInfoCnvAlgCfg(flags, disableBeamSpot =
True) )
54streamCA = OutputStreamCfg( flags, streamName, disableEventTag =
True,
55 ItemList = [
"ExampleTrackContainer#MyTracks" ] )
56stream = streamCA.getEventAlgo( outputStreamName( streamName ) )
62stream.WritingTool.OutputLevel = 3
63stream.HelperTools[0].OutputLevel = 3
67sc = acc.run(flags.Exec.MaxEvents)
68sys.exit(sc.isFailure())