61from AthenaConfiguration.AllConfigFlags
import initConfigFlags
62from AthenaConfiguration.ComponentFactory
import CompFactory
64from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg, outputStreamName
66stream1name =
"Stream1"
67file1Name =
"ROOTTREE:SimplePoolFile1.root"
68stream2name =
"Stream2"
69file2Name =
"ROOTTREE:SimplePoolFile2.root"
70stream3name =
"Stream3"
71file3Name =
"ROOTTREE:EmptyPoolFile.root"
75flags = initConfigFlags()
76flags.Common.MsgSuppression =
False
77flags.Exec.MaxEvents = 20
79flags.addFlag(f
"Output.{stream1name}FileName", file1Name)
80flags.addFlag(f
"Output.{stream2name}FileName", file2Name)
81flags.addFlag(f
"Output.{stream3name}FileName", file3Name)
82flags.Exec.DebugMessageComponents = [ outputStreamName(stream1name) ,
"PoolSvc",
"AthenaPoolCnvSvc",
"WriteData" ]
86from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
87acc = MainServicesCfg( flags )
89from xAODEventInfoCnv.xAODEventInfoCnvConfig
import EventInfoCnvAlgCfg
90acc.merge( EventInfoCnvAlgCfg( flags, disableBeamSpot=
True ) )
93from EventBookkeeperTools.EventBookkeeperToolsConfig
import CutFlowSvcCfg
94acc.merge( CutFlowSvcCfg( flags ) )
96from IOVDbSvc.IOVDbSvcConfig
import IOVDbSvcCfg
97acc.merge( IOVDbSvcCfg( flags ) )
100acc.addEventAlgo( CompFactory.AthPoolEx.WriteData(
"WriteData", OutputLevel = DEBUG) )
103from AthenaPoolExampleAlgorithms.AthenaPoolExampleConfig
import AthenaPoolExampleWriteCfg
104acc.merge( AthenaPoolExampleWriteCfg( flags, stream1name, writeCatalog =
"file:Catalog1.xml",
105 disableEventTag = noTag ) )
107stream1ca = OutputStreamCfg( flags, stream1name, disableEventTag = noTag,
109 'EventInfo#*',
'EventStreamInfo#*',
110 'ExampleHitContainer#MyHits',
'ExampleHitContainer#PetersHits' ] )
111acc.merge( stream1ca )
114acc.merge( AthenaPoolExampleWriteCfg( flags, stream2name, disableEventTag = noTag ) )
115stream2ca = OutputStreamCfg(flags, stream2name, disableEventTag = noTag,
116 ItemList = [
'EventInfo#*',
'ExampleHitContainer#MyHits'] )
117acc.merge( stream2ca )
120filterAlg = CompFactory.AthPoolEx.PassNoneFilter(
"PassNoneFilter", OutputLevel = DEBUG)
121acc.addEventAlgo( filterAlg )
122acc.merge( AthenaPoolExampleWriteCfg( flags, stream3name, disableEventTag = noTag ) )
123stream3ca = OutputStreamCfg(flags, stream3name, disableEventTag = noTag )
124stream3 = stream3ca.getEventAlgo( outputStreamName( stream3name ) )
125stream3.RequireAlgs = [
"PassNoneFilter" ]
126acc.merge( stream3ca )
130sc = acc.run(flags.Exec.MaxEvents)
131sys.exit(sc.isFailure())