17 |
|
import os |
18 |
|
|
19 |
|
## setup the output dir and input files |
20 |
< |
##output = "Data_PromptReco_HF_2" |
21 |
< |
output = "Wenu_HF" |
22 |
< |
##inputlist = "config/input_PromptReco_2.txt" |
23 |
< |
inputlist = "input_Wenu_HF.txt" |
20 |
> |
##output = "Data_PromptReco" |
21 |
> |
output = "WenuD6T_PU" |
22 |
> |
##inputlist = "config/input_PromptReco.txt" |
23 |
> |
inputlist = "config/input_WenuD6T_PU.txt" |
24 |
|
## the cut file (still needed...) |
25 |
|
settingfile = "config/cutFileExample.txt" |
26 |
|
## number of max jobs |
27 |
< |
##ijobmax = 54 |
28 |
< |
ijobmax = 51 |
27 |
> |
##ijobmax = 578 |
28 |
> |
ijobmax = 33 |
29 |
> |
numfiles = 99 |
30 |
|
|
31 |
|
################################################ |
32 |
|
# to write on local disks |
52 |
|
tmp.close() |
53 |
|
os.system("\\rm tmp.log") |
54 |
|
################################################# |
55 |
< |
numfiles = reduce(lambda x,y: x+1, file(inputlist).xreadlines(), 0) |
55 |
> |
##numfiles = reduce(lambda x,y: x+1, file(inputlist).xreadlines(), 0) |
56 |
|
filesperjob = numfiles/ijobmax |
57 |
< |
filesperjob = filesperjob |
57 |
> |
##filesperjob = filesperjob |
58 |
|
extrafiles = numfiles%ijobmax |
59 |
|
input = open(inputlist) |
60 |
|
################################################# |
86 |
|
outputfile.write('#$ -l s_rt=01:30:00,h_rt=04:00:00\n') |
87 |
|
outputfile.write('#$ -q all.q\n') |
88 |
|
outputfile.write('#$ -cwd\n') |
89 |
< |
outputfile.write('#$ -o /shome/jueugste/CMSSW/CMSSW_3_6_1_patch2/src/DiLeptonAnalysis/NTupleProducer/test/rootEWKanalyzer/'+output+'/log/\n') |
90 |
< |
outputfile.write('#$ -e /shome/jueugste/CMSSW/CMSSW_3_6_1_patch2/src/DiLeptonAnalysis/NTupleProducer/test/rootEWKanalyzer/'+output+'/log/\n') |
89 |
> |
outputfile.write('#$ -o /shome/jueugste/CMSSW/CMSSW_3_6_1_patch2_diff/src/DiLeptonAnalysis/NTupleProducer/test/rootEWKanalyzer/'+output+'/log/\n') |
90 |
> |
outputfile.write('#$ -e /shome/jueugste/CMSSW/CMSSW_3_6_1_patch2_diff/src/DiLeptonAnalysis/NTupleProducer/test/rootEWKanalyzer/'+output+'/log/\n') |
91 |
|
|
92 |
|
outputfile.write('source /swshare/cms/cmsset_default.sh\n') |
93 |
< |
outputfile.write('cd /shome/jueugste/CMSSW/CMSSW_3_6_1_patch2/src/DiLeptonAnalysis/NTupleProducer/test/rootEWKanalyzer\n') |
93 |
> |
outputfile.write('cd /shome/jueugste/CMSSW/CMSSW_3_6_1_patch2_diff/src/DiLeptonAnalysis/NTupleProducer/test/rootEWKanalyzer\n') |
94 |
|
outputfile.write('eval `scramv1 runtime -sh`\n') |
95 |
|
outputfile.write('export LD_LIBRARY_PATH=/swshare/glite/d-cache/dcap/lib:$LD_LIBRARY_PATH\n') |
96 |
|
outputfile.write('./main '+inputfilename+' '+settingfile+' analyze/Analysis '+outputroot+output+'_'+str(ijob)+' '+output+"/log/cutEfficiencyFile_"+str(ijob)+"\n") |