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"]
36from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
37acc = MainServicesCfg( flags )
40from AthenaPoolExampleAlgorithms.AthenaPoolExampleConfig
import AthenaPoolExampleReadCfg, AthenaPoolExampleWriteCfg
41acc.merge( AthenaPoolExampleReadCfg(flags, readCatalogs = [
"file:Catalog1.xml"]) )
42acc.merge( AthenaPoolExampleWriteCfg(flags, streamName,
43 writeCatalog =
"file:Catalog1.xml",
44 disableEventTag = noTag) )
47acc.addEventAlgo( CompFactory.AthPoolEx.ReadData(
"ReadData", OutputLevel = DEBUG) )
48acc.addEventAlgo( CompFactory.AthPoolEx.ReWriteData(
"ReWriteData", ExampleHitKey=
"", OutputLevel = DEBUG) )
51streamCA = OutputStreamCfg(flags, streamName, disableEventTag = noTag,
52 ItemList = [
"EventInfo#*",
"ExampleTrackContainer#MyTracks"] )
53stream = streamCA.getEventAlgo( outputStreamName( streamName ) )
59stream.WritingTool.OutputLevel = 3
60stream.HelperTools[0].OutputLevel = 3
64sc = acc.run(flags.Exec.MaxEvents)
65sys.exit(sc.isFailure())