File indexing completed on 2025-01-18 10:17:59
0001 import argparse
0002
0003 def parse_standard_job_options(scriptname=""):
0004 """
0005 Returns the parsed arguments, adding a parser with commonly needed opts:
0006 - args.nevents -- number of events (int), specify with --nevents
0007 - args.inputfile -- the input file (string), specify with --inputfile
0008 - args.outputfile -- the output file (string), specify with --outputfile
0009 """
0010 parser = argparse.ArgumentParser()
0011 parser.add_argument('--inputfile', type=str, default='', help='specify an input file')
0012 parser.add_argument('--outputfile', type=str, default='', help='specify an output file')
0013 parser.add_argument('--nevents', type=int, default=None, help='specify number of events to process')
0014 args, _ = parser.parse_known_args()
0015 return args