CMS 3D CMS Logo

List of all members | Public Member Functions
ProducePlots.ProducePlots Class Reference

Public Member Functions

def convertAndMove (self, plotsDir, type)
 
def makePlots (self)
 
def plotAllAndLast40Runs (self, plotsDir, selectionType, selectionFileName="empty")
 

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

Definition at line 4 of file ProducePlots.py.

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

4  def makePlots(self):
5  # 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"
6  # Plots without any selection
7  plotsDir = self.Dir+"/HistoricDQMPlots/Plots_"+self.DetName+"HistoricInfoClient"
8  self.plotAllAndLast40Runs(plotsDir, "NoSelection")
9  # Plots with good runs selection
10  plotsDir = self.Dir+"/HistoricDQMPlots/Plots_"+self.DetName+"HistoricInfoClient"
11  import SelectRuns
12  selectRuns = SelectRuns.SelectRuns()
13  selectRuns.BaseDir = self.Dir
14  selectRuns.Group = self.Group
15  selectRuns.FirstRun = self.FirstRun
16  selectRuns.FileName = self.Dir+"/SelectedGoodRuns_"+self.DetName+"_"+self.RunType+".txt"
17  selectRuns.HLTNameFilter = ""
18  selectRuns.QualityFlag = self.QualityFlag
19  selectRuns.makeList()
20  self.plotAllAndLast40Runs(plotsDir, "GoodRuns", selectRuns.FileName)
21 
def plotAllAndLast40Runs(self, plotsDir, selectionType, selectionFileName="empty")
Definition: ProducePlots.py:22
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(), HDQMDatabaseProducerConfiguration.HDQMDatabaseProducerConfiguration.Database, TagName.TagName(), and HDQMDatabaseProducerConfiguration.HDQMDatabaseProducerConfiguration.TagName.

Referenced by ProducePlots.ProducePlots.makePlots().

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