62os.system (
'rm -f *.root Catalog1.xml')
64from AthenaConfiguration.AllConfigFlags
import initConfigFlags
65from AthenaConfiguration.ComponentFactory
import CompFactory
67from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg, outputStreamName
69stream1name =
"Stream1"
70file1Name =
"SimplePoolFile1.root"
71stream2name =
"Stream2"
72file2Name =
"SimplePoolFile2.root"
73stream3name =
"Stream3"
74file3Name =
"EmptyPoolFile.root"
78flags = initConfigFlags()
79flags.Common.MsgSuppression =
False
80flags.Exec.MaxEvents = 20
82flags.addFlag(f
"Output.{stream1name}FileName", file1Name)
83flags.addFlag(f
"Output.{stream2name}FileName", file2Name)
84flags.addFlag(f
"Output.{stream3name}FileName", file3Name)
85flags.Exec.DebugMessageComponents = [ outputStreamName(stream1name) ,
"PoolSvc",
"AthenaPoolCnvSvc",
"WriteData" ]
88from AthenaConfiguration.TestDefaults
import defaultGeometryTags
89flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN3
94from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
95acc = MainServicesCfg( flags )
97from xAODEventInfoCnv.xAODEventInfoCnvConfig
import EventInfoCnvAlgCfg
98acc.merge( EventInfoCnvAlgCfg( flags, disableBeamSpot=
True ) )
101from EventBookkeeperTools.EventBookkeeperToolsConfig
import CutFlowSvcCfg
102acc.merge( CutFlowSvcCfg( flags ) )
104from IOVDbSvc.IOVDbSvcConfig
import IOVDbSvcCfg
105acc.merge( IOVDbSvcCfg( flags ) )
108acc.addEventAlgo( CompFactory.AthPoolEx.WriteData(
"WriteData", OutputLevel = DEBUG) )
111from AthenaPoolExampleAlgorithms.AthenaPoolExampleConfig
import AthenaPoolExampleWriteCfg
112acc.merge( AthenaPoolExampleWriteCfg( flags, stream1name, writeCatalog =
"file:Catalog1.xml",
113 disableEventTag = noTag ) )
115stream1ca = OutputStreamCfg( flags, stream1name, disableEventTag = noTag,
117 'EventInfo#*',
'EventStreamInfo#*',
118 'ExampleHitContainer#MyHits',
'ExampleHitContainer#PetersHits' ] )
119acc.merge( stream1ca )
122acc.merge( AthenaPoolExampleWriteCfg( flags, stream2name, disableEventTag = noTag ) )
123stream2ca = OutputStreamCfg(flags, stream2name, disableEventTag = noTag,
124 ItemList = [
'EventInfo#*',
'ExampleHitContainer#MyHits'] )
125acc.merge( stream2ca )
128filterAlg = CompFactory.AthPoolEx.PassNoneFilter(
"PassNoneFilter", OutputLevel = DEBUG)
129acc.addEventAlgo( filterAlg )
130acc.merge( AthenaPoolExampleWriteCfg( flags, stream3name, disableEventTag = noTag ) )
131stream3ca = OutputStreamCfg(flags, stream3name, disableEventTag = noTag )
132stream3 = stream3ca.getEventAlgo( outputStreamName( stream3name ) )
133stream3.RequireAlgs = [
"PassNoneFilter" ]
134acc.merge( stream3ca )
138sc = acc.run(flags.Exec.MaxEvents)
139sys.exit(sc.isFailure())