14from AthenaConfiguration.AllConfigFlags
import initConfigFlags
15from AthenaConfiguration.ComponentFactory
import CompFactory
18outputFileName =
"ROOTTREE:SimplePoolFile5.root"
19outputStreamName =
"ExampleMeta"
23flags = initConfigFlags()
25flags.addFlag(f
"Output.{outputStreamName}FileName", outputFileName)
26flags.Exec.MaxEvents = 10
27flags.Common.MsgSuppression =
False
28flags.Exec.DebugMessageComponents = [
"PoolSvc",
"AthenaPoolCnvSvc",
"AthenaPoolAddressProviderSvc",
"MetaDataSvc"]
32from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
33acc = MainServicesCfg( flags )
35from xAODEventInfoCnv.xAODEventInfoCnvConfig
import EventInfoCnvAlgCfg
36acc.merge( EventInfoCnvAlgCfg( flags, disableBeamSpot=
True ) )
38from AthenaPoolExampleAlgorithms.AthenaPoolExampleConfig
import AthenaPoolExampleWriteCfg
39acc.merge( AthenaPoolExampleWriteCfg( flags, outputStreamName,
40 writeCatalog =
"file:Catalog2.xml",
41 disableEventTag = noTag ) )
44acc.addEventAlgo( CompFactory.AthPoolEx.WriteData(
"WriteData", OutputLevel = DEBUG) )
45acc.addEventAlgo( CompFactory.AthPoolEx.WriteCond(
"WriteCond",
46 DetStore = acc.getService(
"MetaDataStore"),
47 ConditionName =
"PedestalWriteData",
48 OutputLevel = DEBUG) )
50from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
51acc.merge( OutputStreamCfg( flags, outputStreamName, disableEventTag = noTag,
52 ItemList = [
"EventInfo#*",
"ExampleHitContainer#MyHits"],
53 MetadataItemList = [
"ExampleHitContainer#PedestalWriteData"],
58sc = acc.run(flags.Exec.MaxEvents)
59sys.exit(sc.isFailure())