5 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
6 from AthenaConfiguration.ComponentFactory
import CompFactory
10 from argparse
import ArgumentParser
12 parser = ArgumentParser()
13 parser.add_argument(
"-i",
"--inputFile", required=
True, help=
"Input file to run on ", nargs=
"+")
14 parser.add_argument(
"-o",
"--outputFile", default=
"MSVtxVal_out.root", help=
"output root file")
15 parser.add_argument(
"--maxEvents", default=-1, type=int, help=
"How many events shall be run maximally")
16 parser.add_argument(
"--skipEvents", default=0, type=int, help=
"How many events shall be skipped")
17 parser.add_argument(
"--threads", default=1, type=int, help=
"number of threads")
24 if len(out_file) == 0:
return result
25 histSvc = CompFactory.THistSvc(Output=[f
"{out_stream} DATAFILE='{out_file}', OPT='RECREATE'"])
26 result.addService(histSvc, primary=
True)
30 def MSVtxValidationCfg(flags, name="MSVertexValidationAlg", outStream="MSVtxValidation", outFile="out.root", **kwargs):
34 alg = CompFactory.MSVtxValidationAlg(name, **kwargs)
35 result.merge(
setupHistSvcCfg(flags,out_file=outFile, out_stream=outStream))
36 result.addEventAlgo(alg)
42 cfg.printConfig(withDetails=
True, summariseProps=
True)
43 if not cfg.run().isSuccess():
exit(1)
46 if __name__ ==
"__main__":
47 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
48 from MuonCondTest.MdtCablingTester
import setupServicesCfg
52 flags.Concurrency.NumThreads = args.threads
53 flags.Exec.MaxEvents = args.maxEvents
54 flags.Exec.SkipEvents = args.skipEvents
55 flags.Concurrency.NumConcurrentEvents = args.threads
56 flags.Input.Files = args.inputFile
57 flags.Scheduler.ShowDataDeps =
True
58 flags.Scheduler.ShowDataFlow =
True