CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions
ProducePlots.ProducePlots Class Reference

Public Member Functions

def convertAndMove
 
def makePlots
 
def plotAllAndLast40Runs
 

Detailed Description

Definition at line 3 of file ProducePlots.py.

Member Function Documentation

def ProducePlots.ProducePlots.convertAndMove (   self,
  plotsDir,
  type 
)

Definition at line 32 of file ProducePlots.py.

References HDQMDatabaseProducerConfiguration.HDQMDatabaseProducerConfiguration.RunType, TEcnaHistos.RunType(), and HDQMDatabaseProducerConfiguration.HDQMDatabaseProducerConfiguration.StorageDir.

Referenced by ProducePlots.ProducePlots.plotAllAndLast40Runs().

32 
33  def convertAndMove(self, plotsDir, type):
34  # print "cd "+plotsDir+"; cp "+self.Dir+"/DeanConvert.pl .; ./DeanConvert.pl; rm -f DeanConvert.pl"
35  # print "cp "+self.Dir+"/html/"+self.DetName+"HDQMInspector.html "+plotsDir+"/index.html"
36  # print "rm -rf "+self.StorageDir+"backup/"+self.RunType+"/"+type
37  # print "mkdir -pv "+self.StorageDir+"backup/"+self.RunType+"/"+type
38  # print "mv "+destinationDir+"/Plots_"+self.DetName+"HistoricInfoClient "+self.StorageDir+"backup/"+self.RunType+"/"+type
39  # print "mkdir -pv "+destinationDir
40  # print "mv "+plotsDir+" "+destinationDir
41  # print "cp "+self.Dir+"/index.html "+destinationDir
42  destinationDir = self.StorageDir+"/"+self.RunType+"/"+type
43  # Create the small images and copy the html for the expert plots
44  os.system("cd "+plotsDir+"; cp "+self.Dir+"/DeanConvert.pl .; ./DeanConvert.pl; rm -f DeanConvert.pl")
45  os.system("cp "+self.Dir+"/html/"+self.DetName+"HDQMInspector.html "+plotsDir+"/index.html")
46  # Backup the old files
47  backupDir = self.StorageDir+"backup/"+self.RunType+"/"+type
48  os.system("rm -rf "+backupDir)
49  os.system("mkdir -pv "+backupDir)
50  os.system("mv "+destinationDir+"/Plots_"+self.DetName+"HistoricInfoClient "+backupDir)
51  # Move the plots to the web area and copy the html file for the main web page
52  os.system("mkdir -pv "+destinationDir)
53  os.system("mv "+plotsDir+" "+destinationDir)
54  os.system("cp "+self.Dir+"/index.html "+destinationDir)
def ProducePlots.ProducePlots.makePlots (   self)

Definition at line 4 of file ProducePlots.py.

References SelectRuns.SelectRuns.FirstRun, HDQMDatabaseProducerConfiguration.HDQMDatabaseProducerConfiguration.FirstRun, SelectRuns.SelectRuns.Group, HDQMDatabaseProducerConfiguration.HDQMDatabaseProducerConfiguration.Group, ProducePlots.ProducePlots.plotAllAndLast40Runs(), SelectRuns.SelectRuns.QualityFlag, HDQMDatabaseProducerConfiguration.HDQMDatabaseProducerConfiguration.QualityFlag, HDQMDatabaseProducerConfiguration.HDQMDatabaseProducerConfiguration.RunType, and TEcnaHistos.RunType().

4 
5  def makePlots(self):
6  # print "cd "+self.CMSSW_Version+"/src; eval `scramv1 r -sh`; cd "+self.Dir+"; mkdir -pv HistoricDQMPlots/"+self.TagName+"; cd HistoricDQMPlots/"+self.TagName+"; "+self.DetName+"HDQMInspector "+self.Database+" "+self.TagName+" "+self.Password+" empty 40"
7  # Plots without any selection
8  plotsDir = self.Dir+"/HistoricDQMPlots/Plots_"+self.DetName+"HistoricInfoClient"
9  self.plotAllAndLast40Runs(plotsDir, "NoSelection")
10  # Plots with good runs selection
11  plotsDir = self.Dir+"/HistoricDQMPlots/Plots_"+self.DetName+"HistoricInfoClient"
12  import SelectRuns
13  selectRuns = SelectRuns.SelectRuns()
14  selectRuns.BaseDir = self.Dir
15  selectRuns.Group = self.Group
16  selectRuns.FirstRun = self.FirstRun
17  selectRuns.FileName = self.Dir+"/SelectedGoodRuns_"+self.DetName+"_"+self.RunType+".txt"
18  selectRuns.HLTNameFilter = ""
19  selectRuns.QualityFlag = self.QualityFlag
20  selectRuns.makeList()
21  self.plotAllAndLast40Runs(plotsDir, "GoodRuns", selectRuns.FileName)
def ProducePlots.ProducePlots.plotAllAndLast40Runs (   self,
  plotsDir,
  selectionType,
  selectionFileName = "empty" 
)

Definition at line 22 of file ProducePlots.py.

References HDQMDatabaseProducerConfiguration.HDQMDatabaseProducerConfiguration.CMSSW_Version, ProducePlots.ProducePlots.convertAndMove(), ora::Database.Database(), HDQMDatabaseProducerConfiguration.HDQMDatabaseProducerConfiguration.Database, TagName.TagName(), and HDQMDatabaseProducerConfiguration.HDQMDatabaseProducerConfiguration.TagName.

Referenced by ProducePlots.ProducePlots.makePlots().

22 
23  def plotAllAndLast40Runs(self, plotsDir, selectionType, selectionFileName = "empty"):
24  # Plot all runs
25  os.system("mkdir -pv "+plotsDir)
26  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")
27  self.convertAndMove(plotsDir, selectionType+"/AllRuns")
28  # Plot the last 40 runs
29  os.system("mkdir -pv "+plotsDir)
30  os.system("cd "+self.CMSSW_Version+"/src; eval `scramv1 r -sh`; cd "+plotsDir+"; "+self.DetName+"HDQMInspector "+self.Database+" "+self.TagName+" "+self.Password+" "+selectionFileName+" 40")
31  self.convertAndMove(plotsDir, selectionType+"/Last40Runs")