From 3ead8aab5a3a878d92b05f54bdfa3a71c2995efe Mon Sep 17 00:00:00 2001 From: ats2008 Date: Wed, 20 Dec 2023 20:01:59 +0530 Subject: [PATCH] exception handling --- PhysObjectExtractor/python/poet_cfg.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/PhysObjectExtractor/python/poet_cfg.py b/PhysObjectExtractor/python/poet_cfg.py index f623b95..5b951d8 100644 --- a/PhysObjectExtractor/python/poet_cfg.py +++ b/PhysObjectExtractor/python/poet_cfg.py @@ -13,9 +13,12 @@ options = VarParsing ('analysis') isData = False if len(sys.argv) > 2: - isData = eval(sys.argv[2]) - sys.argv.pop( 2 ) - + try: + isData = eval(sys.argv[2]) + sys.argv.pop( 2 ) + print "isData is set to ",isData + except: + pass options.parseArguments() isMC = True if isData: isMC = False @@ -240,7 +243,7 @@ if len(options.inputFiles) > 0: process.source.fileNames=options.inputFiles -print "Processing for maxEvents = ",process.maxEvents +print "Processing for maxEvents = ",process.maxEvents.input print "Processing input files " for fl in process.source.fileNames: print " > ",fl