4from OutputStreamAthenaPool.OutputStreamConfig
import (
9from AthExHiveAthenaPool.WriteHiveDataObjConfig
import WriteHiveDataObjCfg
10from AthenaConfiguration.MainServicesConfig
import MainEvgenServicesCfg
11from AthenaConfiguration.AllConfigFlags
import initConfigFlags
12from AthenaConfiguration.ComponentFactory
import CompFactory
14if __name__ ==
"__main__":
15 flags = initConfigFlags()
16 flags.Input.Files = []
17 flags.Input.RunNumbers = [284600]
18 flags.Input.TimeStamps = [1]
20 flags.Input.TypedCollections = []
21 flags.Exec.MaxEvents = 20
23 streamName =
"TestStream"
25 f
"Output.{streamName}FileName",
26 f
"{streamName}.pool.root",
28 flags.addFlag(f
"Output.doWrite{streamName}",
True)
34 cfg = MainEvgenServicesCfg(flags, withSequences=
True)
35 cfg.merge(WriteHiveDataObjCfg(flags))
41 streamName=streamName,
43 "xAOD::EventInfo#EventInfo",
44 "xAOD::EventAuxInfo#EventInfoAux.",
52 streamName=streamName,
54 f
"xAOD::EventFormat#EventFormat{outputStreamName(streamName)}",
55 "xAOD::FileMetaData#FileMetaData",
56 "xAOD::FileMetaDataAuxInfo#FileMetaDataAux.",
59 CompFactory.xAODMaker.EventFormatStreamHelperTool(
60 f
"{outputStreamName(streamName)}_EventFormatStreamHelperTool",
61 Key=f
"EventFormat{outputStreamName(streamName)}",
62 DataHeaderKey=f
"{outputStreamName(streamName)}",
63 TypeNames=[
"HiveDataObj#*"],
65 CompFactory.xAODMaker.FileMetaDataCreatorTool(
66 f
"{outputStreamName(streamName)}_FileMetaDataCreatorTool",
67 OutputKey=
"FileMetaData",
68 StreamName=f
"{outputStreamName(streamName)}",
75 sys.exit(cfg.run().isFailure())