File indexing completed on 2023-03-17 11:10:10
0001
0002 import os
0003 os.system("make clean; make; \\rm *.log log.list")
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050 dir1='/afs/cern.ch/user/c/chiorbo/scratch0/SUSY_2007/TriggerValidation/TriggerValidation_DQM_312_commit_V00-06-00/src/HLTriggerOffline/SUSYBSM/test'
0051 dir2='/afs/cern.ch/user/c/chiorbo/scratch0/SUSY_2007/TriggerValidation/TriggerValidation_DQM_312_commit_V00-06-00/src/HLTriggerOffline/SUSYBSM/test'
0052 out='mc1_vs_mc2'
0053
0054 samples=['_HLT']
0055 prefix1 = "DQM_V0001"
0056 prefix2 = "DQM_V0001"
0057 sufix1 = "_R000000001"
0058 sufix2 = "_R000000001_2"
0059 label1 = "HLT"
0060 label2 = "HLT"
0061
0062
0063
0064 os.system('mkdir html/'+out)
0065
0066 os.system('cp html/template/index.html html/'+out+'/index.html')
0067
0068
0069
0070 inputhtml = open('html/template/beginning.html')
0071 outputhtml = open('html/'+out+'/cover.html','w')
0072 for line in inputhtml:
0073
0074 if line.find('<!-- Here python will write the name of first release -->') != -1: outputhtml.write(dir1)
0075
0076 elif line.find('<!-- Here python will write the name of second release -->') != -1: outputhtml.write(dir2)
0077 else: outputhtml.write(line)
0078 continue
0079 inputhtml.close()
0080 outputhtml.close()
0081
0082
0083 os.system('cp html/template/menu_beginning.html html/'+out+'/menu.html')
0084 for sample in samples:
0085 tmp1 = open('tmp.html','w')
0086 tmp2 = open('html/template/menu_body.html')
0087 for line in tmp2:
0088 if line.find('thissample') != -1:
0089 newline = line.replace('thissample',sample)
0090 tmp1.write(newline)
0091 else: tmp1.write(line)
0092 continue
0093 tmp1.close()
0094 tmp2.close()
0095 os.system('more tmp.html >> html/'+out+'/menu.html')
0096 os.system('rm tmp.html')
0097 continue
0098 os.system('more html/template/menu_end.html >> html/'+out+'/menu.html')
0099
0100
0101 for sample in samples:
0102 file1 = dir1+'/'+prefix1+sample+sufix1+'.root'
0103 file2 = dir2+'/'+prefix2+sample+sufix2+'.root'
0104 outputfile = 'outputfile.root'
0105
0106
0107 inputhtml = open('html/template/comp_beginning.html')
0108 os.system('mkdir html/'+out+'/'+sample)
0109 outputhtml = open('html/'+out+'/'+sample+'/comparison.html','w')
0110
0111
0112 for line in inputhtml:
0113 if line.find('<!-- Here python will write the name of first release -->') != -1: outputhtml.write(dir1)
0114 elif line.find('<!-- Here python will write the name of second release -->') != -1: outputhtml.write(dir2)
0115 elif line.find('<!-- Here python will write the name of the model -->') != -1: outputhtml.write(sample)
0116
0117 elif line.find('thissample') != -1:
0118 newline = line.replace('thissample',sample)
0119 outputhtml.write(newline)
0120 else: outputhtml.write(line)
0121 continue
0122 inputhtml.close()
0123 outputhtml.close()
0124
0125
0126 os.system('./triggerComparison.x -File1='+file1+' -File2='+file2+' -OutputFile='+outputfile+' -label1='+label1+' -label2='+label2)
0127
0128
0129 os.system('mv HLTcomparison.log html/'+out+'/'+sample)
0130 os.system('mv L1comparison.log html/'+out+'/'+sample)
0131
0132
0133 os.system('mv '+outputfile+' html/'+out+'/'+sample)
0134
0135
0136 os.system('more html/template/comp.html >> html/'+out+'/'+sample+'/comparison.html')
0137
0138
0139 os.system('more compatibility.html >> html/'+out+'/'+sample+'/comparison.html')
0140
0141
0142 os.system("ls *eps > listeps.log")
0143 listeps = open("listeps.log")
0144 for epsfile in listeps: os.system("convert \""+epsfile[:-1]+"\" \""+epsfile[:-4]+"jpg\"")
0145 thefile = open('html/'+out+'/'+sample+'/comparison.html',"r+")
0146
0147
0148
0149
0150
0151
0152
0153
0154
0155
0156
0157
0158
0159
0160
0161
0162
0163
0164
0165
0166
0167
0168
0169
0170
0171
0172
0173
0174
0175
0176
0177
0178
0179 os.system('more html/template/end.html >> html/'+out+'/'+sample+'/comparison.html')
0180
0181 os.system('mv *jpg html/'+out+'/'+sample+'/')
0182 os.system('mv *eps html/'+out+'/'+sample+'/')
0183 continue
0184 os.system('\\rm listeps.log')