15 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
16 from AthenaConfiguration.ComponentFactory
import CompFactory
18 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg, outputStreamName
20 streamName =
"ReWrite"
21 outputFileName =
"SimplePoolFile3.root"
26 flags.Input.Files = [
"SimplePoolFile1.root"]
27 flags.addFlag(f
"Output.{streamName}FileName", outputFileName)
28 flags.Exec.MaxEvents = -1
29 flags.Common.MsgSuppression =
False
31 "PoolSvc",
"AthenaPoolCnvSvc",
"AthenaPoolAddressProviderSvc",
"MetaDataSvc"]
35 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
39 from AthenaPoolExampleAlgorithms.AthenaPoolExampleConfig
import AthenaPoolExampleReadCfg, AthenaPoolExampleWriteCfg
42 writeCatalog =
"file:Catalog1.xml",
43 disableEventTag = noTag ) )
46 acc.addEventAlgo( CompFactory.AthPoolEx.ReadData(
"ReadData", OutputLevel = DEBUG) )
47 acc.addEventAlgo( CompFactory.AthPoolEx.ReWriteData(
"ReWriteData", OutputLevel = DEBUG) )
49 WriteTag = CompFactory.AthPoolEx.WriteTag(
"WriteTag", OutputLevel = DEBUG)
50 acc.addEventAlgo( WriteTag )
52 MagicWriteTag = CompFactory.AthPoolEx.WriteTag(
"MagicWriteTag", OutputLevel = DEBUG)
53 MagicWriteTag.Key =
"MagicTag"
54 MagicWriteTag.TagKey =
"MagicTag"
55 MagicWriteTag.Magic = 24
56 acc.addEventAlgo( MagicWriteTag )
59 from xAODEventInfoCnv.xAODEventInfoCnvConfig
import EventInfoCnvAlgCfg
64 ItemList = [
"ExampleTrackContainer#MyTracks" ] )
66 stream.WritingTool.AttributeListKey = MagicWriteTag.Key
72 stream.WritingTool.OutputLevel = 3
73 stream.HelperTools[0].OutputLevel = 3
77 sc = acc.run(flags.Exec.MaxEvents)
78 sys.exit(sc.isFailure())