17 |
|
import os |
18 |
|
|
19 |
|
## setup the output dir and input files |
20 |
< |
output = "Data" |
21 |
< |
inputlist = "config/input_Data.txt" |
20 |
> |
##output = "Data_PromptReco_HF_2" |
21 |
> |
output = "Wenu_HF" |
22 |
> |
##inputlist = "config/input_PromptReco_2.txt" |
23 |
> |
inputlist = "input_Wenu_HF.txt" |
24 |
|
## the cut file (still needed...) |
25 |
|
settingfile = "config/cutFileExample.txt" |
26 |
|
## number of max jobs |
27 |
< |
ijobmax = 10 |
27 |
> |
##ijobmax = 54 |
28 |
> |
ijobmax = 51 |
29 |
|
|
30 |
|
################################################ |
31 |
|
# to write on local disks |
82 |
|
outputfile = open(outputname,'w') |
83 |
|
outputfile.write('#!/bin/bash\n') |
84 |
|
outputfile.write('#$ -N '+output+'_'+str(ijob)+'\n') |
85 |
< |
outputfile.write('#$ -l s_rt=00:30:00,h_rt=01:00:00\n') |
85 |
> |
outputfile.write('#$ -l s_rt=01:30:00,h_rt=04:00:00\n') |
86 |
|
outputfile.write('#$ -q all.q\n') |
87 |
|
outputfile.write('#$ -cwd\n') |
88 |
< |
outputfile.write('#$ -o /shome/jueugste/CMSSW/CMSSW_3_5_6_7TeV/src/DiLeptonAnalysis/NTupleProducer/test/rootEWKanalyzer/'+output+'/log/\n') |
89 |
< |
outputfile.write('#$ -e /shome/jueugste/CMSSW/CMSSW_3_5_6_7TeV/src/DiLeptonAnalysis/NTupleProducer/test/rootEWKanalyzer/'+output+'/log/\n') |
88 |
> |
outputfile.write('#$ -o /shome/jueugste/CMSSW/CMSSW_3_6_1_patch2/src/DiLeptonAnalysis/NTupleProducer/test/rootEWKanalyzer/'+output+'/log/\n') |
89 |
> |
outputfile.write('#$ -e /shome/jueugste/CMSSW/CMSSW_3_6_1_patch2/src/DiLeptonAnalysis/NTupleProducer/test/rootEWKanalyzer/'+output+'/log/\n') |
90 |
|
|
91 |
|
outputfile.write('source /swshare/cms/cmsset_default.sh\n') |
92 |
< |
outputfile.write('cd /shome/jueugste/CMSSW/CMSSW_3_5_6_7TeV/src/DiLeptonAnalysis/NTupleProducer/test/rootEWKanalyzer\n') |
92 |
> |
outputfile.write('cd /shome/jueugste/CMSSW/CMSSW_3_6_1_patch2/src/DiLeptonAnalysis/NTupleProducer/test/rootEWKanalyzer\n') |
93 |
|
outputfile.write('eval `scramv1 runtime -sh`\n') |
94 |
|
outputfile.write('export LD_LIBRARY_PATH=/swshare/glite/d-cache/dcap/lib:$LD_LIBRARY_PATH\n') |
95 |
|
outputfile.write('./main '+inputfilename+' '+settingfile+' analyze/Analysis '+outputroot+output+'_'+str(ijob)+' '+output+"/log/cutEfficiencyFile_"+str(ijob)+"\n") |
101 |
|
|
102 |
|
## now submit the jobs... |
103 |
|
for ijob in range(ijobmax): |
101 |
– |
os.system('qsub '+output+'/src/submit_'+str(ijob)+'.src') |
104 |
|
os.system('echo qsub '+output+'/src/submit_'+str(ijob)+'.src') |
105 |
+ |
os.system('qsub '+output+'/src/submit_'+str(ijob)+'.src') |