61 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
62 from AthenaConfiguration.ComponentFactory
import CompFactory
64 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg, outputStreamName
66 stream1name =
"Stream1"
67 file1Name =
"ROOTTREE:SimplePoolFile1.root"
68 stream2name =
"Stream2"
69 file2Name =
"ROOTTREE:SimplePoolFile2.root"
70 stream3name =
"Stream3"
71 file3Name =
"ROOTTREE:EmptyPoolFile.root"
76 flags.Common.MsgSuppression =
False
77 flags.Exec.MaxEvents = 20
78 flags.Input.Files = []
79 flags.addFlag(f
"Output.{stream1name}FileName", file1Name)
80 flags.addFlag(f
"Output.{stream2name}FileName", file2Name)
81 flags.addFlag(f
"Output.{stream3name}FileName", file3Name)
82 flags.Exec.DebugMessageComponents = [
outputStreamName(stream1name) ,
"PoolSvc",
"AthenaPoolCnvSvc",
"WriteData" ]
86 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
90 from EventBookkeeperTools.EventBookkeeperToolsConfig
import CutFlowSvcCfg
93 from IOVDbSvc.IOVDbSvcConfig
import IOVDbSvcCfg
97 acc.addEventAlgo( CompFactory.AthPoolEx.WriteData(
"WriteData", OutputLevel = DEBUG) )
99 WriteTag = CompFactory.AthPoolEx.WriteTag(
"WriteTag", OutputLevel = DEBUG)
101 acc.addEventAlgo( WriteTag )
103 MagicWriteTag = CompFactory.AthPoolEx.WriteTag(
"MagicWriteTag", OutputLevel = DEBUG)
104 MagicWriteTag.Key =
"MagicTag"
105 MagicWriteTag.TagKey =
"MagicTag"
106 MagicWriteTag.Magic = 24
107 acc.addEventAlgo( MagicWriteTag )
110 from AthenaPoolExampleAlgorithms.AthenaPoolExampleConfig
import AthenaPoolExampleWriteCfg
112 disableEventTag = noTag ) )
116 'EventInfo#*',
'EventStreamInfo#*',
117 'ExampleHitContainer#MyHits',
'ExampleHitContainer#PetersHits' ] )
119 stream1.WritingTool.AttributeListKey = MagicWriteTag.Key
120 acc.merge( stream1ca )
125 ItemList = [
'EventInfo#*',
'ExampleHitContainer#MyHits'] )
127 stream2.ExcludeList += [
"ExampleHitContainer#MyHits" ]
128 stream2.WritingTool.AttributeListKey =
"RunEventTag"
129 acc.merge( stream2ca )
132 filterAlg = CompFactory.AthPoolEx.PassNoneFilter(
"PassNoneFilter", OutputLevel = DEBUG)
133 acc.addEventAlgo( filterAlg )
137 stream3.RequireAlgs = [
"PassNoneFilter" ]
138 acc.merge( stream3ca )
143 stream1.WritingTool.OutputLevel = 3
144 stream1.HelperTools[0].OutputLevel = 3
145 stream2.WritingTool.OutputLevel = 3
146 stream2.HelperTools[0].OutputLevel = 3
150 sc = acc.run(flags.Exec.MaxEvents)
151 sys.exit(sc.isFailure())