9 """Main routine of the script. 12 - `argv`: arguments passed to the main routine 19 description=
"Prepare input db file for MillePede workflow.")
20 parser.add_argument(
"-g",
"--global-tag", dest=
"global_tag", required=
True,
22 help=
"global tag to extract the alignment payloads")
23 parser.add_argument(
"-r",
"--run-number", dest=
"run_number", required=
True,
24 metavar=
"INTEGER", type=int,
25 help=
"run number to select IOV")
26 parser.add_argument(
"-o",
"--output-db", dest=
"output_db",
27 default=
"alignment_input.db", metavar=
"PATH",
28 help=
"name of the output file (default: '%(default)s')")
29 args = parser.parse_args(argv)
31 inputs = mps_tools.get_tags(args.global_tag,
32 [
"TrackerAlignmentRcd",
33 "TrackerSurfaceDeformationRcd",
34 "TrackerAlignmentErrorExtendedRcd"])
35 for inp
in inputs.itervalues():
36 inp[
"iovs"] = mps_tools.get_iovs(inp[
"connect"], inp[
"tag"])
37 mps_tools.create_single_iov_db(inputs, args.run_number, args.output_db)