Go to the documentation of this file.00001 import os
00002
00003 class ProducePlots:
00004 def makePlots(self):
00005
00006
00007 plotsDir = self.Dir+"/HistoricDQMPlots/Plots_"+self.DetName+"HistoricInfoClient"
00008 self.plotAllAndLast40Runs(plotsDir, "NoSelection")
00009
00010 plotsDir = self.Dir+"/HistoricDQMPlots/Plots_"+self.DetName+"HistoricInfoClient"
00011 import SelectRuns
00012 selectRuns = SelectRuns.SelectRuns()
00013 selectRuns.BaseDir = self.Dir
00014 selectRuns.Group = self.Group
00015 selectRuns.FirstRun = self.FirstRun
00016 selectRuns.FileName = self.Dir+"/SelectedGoodRuns_"+self.DetName+"_"+self.RunType+".txt"
00017 selectRuns.HLTNameFilter = ""
00018 selectRuns.QualityFlag = self.QualityFlag
00019 selectRuns.makeList()
00020 self.plotAllAndLast40Runs(plotsDir, "GoodRuns", selectRuns.FileName)
00021
00022 def plotAllAndLast40Runs(self, plotsDir, selectionType, selectionFileName = "empty"):
00023
00024 os.system("mkdir -pv "+plotsDir)
00025 os.system("cd "+self.CMSSW_Version+"/src; eval `scramv1 r -sh`; cd "+plotsDir+"; "+self.DetName+"HDQMInspector "+self.Database+" "+self.TagName+" "+self.Password+" "+selectionFileName+" 1 2000000")
00026 self.convertAndMove(plotsDir, selectionType+"/AllRuns")
00027
00028 os.system("mkdir -pv "+plotsDir)
00029 os.system("cd "+self.CMSSW_Version+"/src; eval `scramv1 r -sh`; cd "+plotsDir+"; "+self.DetName+"HDQMInspector "+self.Database+" "+self.TagName+" "+self.Password+" "+selectionFileName+" 40")
00030 self.convertAndMove(plotsDir, selectionType+"/Last40Runs")
00031
00032 def convertAndMove(self, plotsDir, type):
00033
00034
00035
00036
00037
00038
00039
00040
00041 destinationDir = self.StorageDir+"/"+self.RunType+"/"+type
00042
00043 os.system("cd "+plotsDir+"; cp "+self.Dir+"/DeanConvert.pl .; ./DeanConvert.pl; rm -f DeanConvert.pl")
00044 os.system("cp "+self.Dir+"/html/"+self.DetName+"HDQMInspector.html "+plotsDir+"/index.html")
00045
00046 backupDir = self.StorageDir+"backup/"+self.RunType+"/"+type
00047 os.system("rm -rf "+backupDir)
00048 os.system("mkdir -pv "+backupDir)
00049 os.system("mv "+destinationDir+"/Plots_"+self.DetName+"HistoricInfoClient "+backupDir)
00050
00051 os.system("mkdir -pv "+destinationDir)
00052 os.system("mv "+plotsDir+" "+destinationDir)
00053 os.system("cp "+self.Dir+"/index.html "+destinationDir)