File indexing completed on 2024-04-06 12:12:29
0001 import FWCore.ParameterSet.Config as cms
0002 from argparse import ArgumentParser
0003
0004 parser = ArgumentParser(description='Test argparse')
0005 parser.add_argument("--maxEvents", help="max events to process", type=int, default=1)
0006
0007 parser.add_argument("-j", "--jobreport", help="file name for job report file", type=str, default="UNSET")
0008 parser.add_argument("-e", "--enablejobreport", help="enable job report file(s)", default="UNSET", action="store_true")
0009 parser.add_argument("-m", "--mode", help="job mode for MessageLogger", type=str, default="UNSET")
0010 parser.add_argument("-n", "--numThreads", help="number of threads", type=str, default="UNSET")
0011 parser.add_argument("-s", "--sizeOfStackForThreadsInKB", help="size of thread stack in KB", type=str, default="UNSET")
0012 parser.add_argument("--strict", help="strict parsing", default="UNSET", action="store_true")
0013 parser.add_argument("-c", "--command", help="config passed in as string", type=str, default="UNSET")
0014 args = parser.parse_args()
0015
0016 print(args)
0017
0018 process = cms.Process("TEST")
0019 process.source = cms.Source("EmptySource")
0020
0021 process.maxEvents.input = args.maxEvents
0022
0023 print('TestArgParse')