CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
html.IndexSection Class Reference

Public Member Functions

def __init__ (self, sample, title, fastVsFull, pileupComparison)
 
def addPlots (self, plotterFolder, dqmSubFolder, plotFiles)
 
def addTable (self, table)
 
def write (self, baseDir)
 

Private Attributes

 _hltPages
 
 _iterationPages
 
 _miniaodPage
 
 _otherPages
 
 _pfPages
 
 _pixelPages
 
 _purposePageMap
 
 _sample
 
 _sampleName
 
 _summaryPage
 
 _timingPage
 
 _vertexPage
 

Detailed Description

Definition at line 701 of file html.py.

Constructor & Destructor Documentation

◆ __init__()

def html.IndexSection.__init__ (   self,
  sample,
  title,
  fastVsFull,
  pileupComparison 
)

Definition at line 702 of file html.py.

702  def __init__(self, sample, title, fastVsFull, pileupComparison):
703  self._sample = sample
704 
705  self._sampleName = ""
706  if sample.fastsim():
707  self._sampleName += "FastSim "
708  if fastVsFull:
709  self._sampleName += "vs FullSim "
710 
711  pileup = ""
712  if hasattr(sample, "hasPileup"):
713  pileup = "with no pileup"
714  if sample.hasPileup():
715  pileup = "with %d pileup (%s)" % (sample.pileupNumber(), sample.pileupType())
716  if pileupComparison is not None:
717  pileup += " "+pileupComparison
718  if hasattr(sample, "customPileupLabel"):
719  pileup = sample.customPileupLabel()
720 
721  scenario = ""
722  if hasattr(sample, "hasScenario") and sample.hasScenario():
723  scenario = " (\"%s\")" % sample.scenario()
724  self._sampleName += "%s sample%s %s" % (_sampleName.get(sample.name(), sample.name()), scenario, pileup)
725 
726  params = [title, self._sampleName, sample, fastVsFull, pileupComparison is not None]
727  self._summaryPage = PageSet(*params)
728  self._iterationPages = TrackingPageSet(*params)
729  self._vertexPage = PageSet(*params)
730  self._miniaodPage = PageSet(*params)
731  self._timingPage = PageSet(*params)
732  self._pfPages = PageSet(*params)
733  self._hltPages = PageSet(*params, dqmSubFolderTranslatedToSectionName=lambda algoQuality: algoQuality[0])
734  self._pixelPages = TrackingPageSet(*params)
735  self._otherPages = PageSet(*params)
736 
737  self._purposePageMap = {
738  PlotPurpose.TrackingIteration: self._iterationPages,
739  PlotPurpose.TrackingSummary: self._summaryPage,
740  PlotPurpose.Vertexing: self._vertexPage,
741  PlotPurpose.MiniAOD: self._miniaodPage,
742  PlotPurpose.Timing: self._timingPage,
743  PlotPurpose.PF: self._pfPages,
744  PlotPurpose.HLT: self._hltPages,
745  PlotPurpose.Pixel: self._pixelPages,
746  }
747 
def __init__(self, dataset, job_number, job_id, job_name, isDA, isMC, applyBOWS, applyEXTRACOND, extraconditions, runboundary, lumilist, intlumi, maxevents, gt, allFromGT, alignmentDB, alignmentTAG, apeDB, apeTAG, bowDB, bowTAG, vertextype, tracktype, refittertype, ttrhtype, applyruncontrol, ptcut, CMSSW_dir, the_dir)

Member Function Documentation

◆ addPlots()

def html.IndexSection.addPlots (   self,
  plotterFolder,
  dqmSubFolder,
  plotFiles 
)

Definition at line 748 of file html.py.

References html.IndexSection._otherPages, and html.IndexSection._purposePageMap.

748  def addPlots(self, plotterFolder, dqmSubFolder, plotFiles):
749  page = self._purposePageMap.get(plotterFolder.getPurpose(), self._otherPages)
750  page.addPlotSet(plotterFolder, dqmSubFolder, plotFiles)
751 

◆ addTable()

def html.IndexSection.addTable (   self,
  table 
)

Definition at line 752 of file html.py.

References html.IndexSection._otherPages, and html.IndexSection._purposePageMap.

752  def addTable(self, table):
753  if table is None:
754  return
755 
756  page = self._purposePageMap.get(table.getPurpose(), self._otherPages)
757  page.addTable(table)
758  params = []
759 

◆ write()

def html.IndexSection.write (   self,
  baseDir 
)

Definition at line 760 of file html.py.

References html.IndexSection._hltPages, html.IndexSection._iterationPages, html.IndexSection._miniaodPage, html.IndexSection._otherPages, html.IndexSection._pfPages, html.IndexSection._pixelPages, html.PageSet._sampleName, html.IndexSection._sampleName, html.IndexSection._summaryPage, html.IndexSection._timingPage, and html.IndexSection._vertexPage.

760  def write(self, baseDir):
761  ret = [
762  " "+self._sampleName,
763  " <br/>",
764  " <ul>",
765  ]
766 
767  for pages in [self._summaryPage, self._iterationPages, self._pixelPages, self._vertexPage, self._miniaodPage, self._timingPage, self._hltPages, self._pfPages, self._otherPages]:
768  labelFiles = pages.write(baseDir)
769  for label, fname in labelFiles:
770  ret.append(' <li><a href="%s">%s</a></li>' % (fname, label))
771 
772  ret.extend([
773  ' </ul>',
774  ' <br/>',
775  ])
776 
777  return ret
778 

Member Data Documentation

◆ _hltPages

html.IndexSection._hltPages
private

Definition at line 733 of file html.py.

Referenced by html.IndexSection.write().

◆ _iterationPages

html.IndexSection._iterationPages
private

Definition at line 728 of file html.py.

Referenced by html.IndexSection.write().

◆ _miniaodPage

html.IndexSection._miniaodPage
private

Definition at line 730 of file html.py.

Referenced by html.IndexSection.write().

◆ _otherPages

html.IndexSection._otherPages
private

◆ _pfPages

html.IndexSection._pfPages
private

Definition at line 732 of file html.py.

Referenced by html.IndexSection.write().

◆ _pixelPages

html.IndexSection._pixelPages
private

Definition at line 734 of file html.py.

Referenced by html.IndexSection.write().

◆ _purposePageMap

html.IndexSection._purposePageMap
private

Definition at line 737 of file html.py.

Referenced by html.IndexSection.addPlots(), and html.IndexSection.addTable().

◆ _sample

html.IndexSection._sample
private

◆ _sampleName

html.IndexSection._sampleName
private

Definition at line 705 of file html.py.

Referenced by html.IndexSection.write().

◆ _summaryPage

html.IndexSection._summaryPage
private

Definition at line 727 of file html.py.

Referenced by html.IndexSection.write().

◆ _timingPage

html.IndexSection._timingPage
private

Definition at line 731 of file html.py.

Referenced by html.IndexSection.write().

◆ _vertexPage

html.IndexSection._vertexPage
private

Definition at line 729 of file html.py.

Referenced by html.IndexSection.write().