00001
00002
00003
00004
00005 import os, re
00006
00007
00008 cmsDriverCmd="cmsDriver_highstats_hlt.txt"
00009
00010 cmsDriverCmdPath=os.environ["CMSSW_RELEASE_BASE"]+"/src/Configuration/PyReleaseValidation/data"
00011
00012 def get_cmsDriverOptions():
00013 '''Function returns a string with the cmsDriver.py options relevant to the performance suite used in file cmsDriver_highstats_hlt.txt in package Configuration/PyReleaseValidation/data\n'''
00014 filename=os.path.join(cmsDriverCmdPath,cmsDriverCmd)
00015 cmsDriverOptions=""
00016 if os.path.exists(filename):
00017 file=open(filename,"r")
00018 TTbar=re.compile("TTbar")
00019 STARTUP=re.compile("STARTUP")
00020 GENSIM=re.compile("GEN,SIM")
00021 option=re.compile("^--")
00022 for line in file.readlines():
00023
00024 if TTbar.search(line) and STARTUP.search(line) and GENSIM.search(line):
00025 tokens=line.split()
00026
00027
00028 for token in tokens:
00029 found = option.search(token)
00030
00031
00032
00033 if found and not (found.string == "--relval" or found.string == "--datatier"):
00034 cmsDriverOptions=cmsDriverOptions+found.string+" "+tokens[tokens.index(found.string)+1]+" "
00035 return cmsDriverOptions
00036 else:
00037 print "Could not find file %s!\n"%filename
00038 return NULL