17from AthenaConfiguration.AllConfigFlags
import initConfigFlags
18from AthenaConfiguration.ComponentFactory
import CompFactory
21outputStreamName =
"ExampleCond"
22outputFileName =
"ROOTTREE:SimplePoolFile4.root"
26flags = initConfigFlags()
27flags.Input.Files = [
"SimplePoolFile1.root"]
28flags.addFlag(f
"Output.{outputStreamName}FileName", outputFileName)
29flags.Exec.MaxEvents = -1
30flags.Common.MsgSuppression =
False
31flags.Exec.DebugMessageComponents = [
"PoolSvc",
"AthenaPoolCnvSvc",
"AthenaPoolAddressProviderSvc",
"MetaDataSvc"]
35from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
36acc = MainServicesCfg( flags )
38from AthenaPoolExampleAlgorithms.AthenaPoolExampleConfig
import AthenaPoolExampleReadCfg, AthenaPoolExampleWriteCfg
39acc.merge( AthenaPoolExampleReadCfg(flags, readCatalogs = [
"file:Catalog1.xml"]) )
40acc.merge( AthenaPoolExampleWriteCfg(flags, outputStreamName,
41 writeCatalog =
"file:Catalog1.xml",
42 disableEventTag = noTag) )
45acc.addEventAlgo( CompFactory.AthPoolEx.ReadData(
"ReadData", OutputLevel = DEBUG) )
46acc.addEventAlgo( CompFactory.AthPoolEx.WriteCond(
"WriteCond",
47 DetStore = acc.getService(
"DetectorStore"),
48 ConditionName =
"PedestalWriteData",
49 Weight = 0.0, Offset = 0.0,
50 OutputLevel = DEBUG) )
52from RegistrationServices.OutputConditionsAlgConfig
import OutputConditionsAlgCfg
53acc.merge( OutputConditionsAlgCfg(flags, outputStreamName, outputFile = outputFileName,
54 ObjectList = [
"ExampleHitContainer#PedestalWriteData"],
61sc = acc.run(flags.Exec.MaxEvents)
62sys.exit(sc.isFailure())