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 661 of file html.py.

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 662 of file html.py.

662  def __init__(self, sample, title, fastVsFull, pileupComparison):
663  self._sample = sample
664 
665  self._sampleName = ""
666  if sample.fastsim():
667  self._sampleName += "FastSim "
668  if fastVsFull:
669  self._sampleName += "vs FullSim "
670 
671  pileup = ""
672  if hasattr(sample, "hasPileup"):
673  pileup = "with no pileup"
674  if sample.hasPileup():
675  pileup = "with %d pileup (%s)" % (sample.pileupNumber(), sample.pileupType())
676  if pileupComparison is not None:
677  pileup += " "+pileupComparison
678  if hasattr(sample, "customPileupLabel"):
679  pileup = sample.customPileupLabel()
680 
681  scenario = ""
682  if hasattr(sample, "hasScenario") and sample.hasScenario():
683  scenario = " (\"%s\")" % sample.scenario()
684  self._sampleName += "%s sample%s %s" % (_sampleName.get(sample.name(), sample.name()), scenario, pileup)
685 
686  params = [title, self._sampleName, sample, fastVsFull, pileupComparison is not None]
687  self._summaryPage = PageSet(*params)
688  self._iterationPages = TrackingPageSet(*params)
689  self._vertexPage = PageSet(*params)
690  self._miniaodPage = PageSet(*params)
691  self._timingPage = PageSet(*params)
692  self._pfPages = PageSet(*params)
693  self._hltPages = PageSet(*params, dqmSubFolderTranslatedToSectionName=lambda algoQuality: algoQuality[0])
694  self._pixelPages = PageSet(*params, dqmSubFolderTranslatedToSectionName=lambda algoQuality: algoQuality[0])
695  self._otherPages = PageSet(*params)
696 
697  self._purposePageMap = {
698  PlotPurpose.TrackingIteration: self._iterationPages,
699  PlotPurpose.TrackingSummary: self._summaryPage,
700  PlotPurpose.Vertexing: self._vertexPage,
701  PlotPurpose.MiniAOD: self._miniaodPage,
702  PlotPurpose.Timing: self._timingPage,
703  PlotPurpose.PF: self._pfPages,
704  PlotPurpose.HLT: self._hltPages,
705  PlotPurpose.Pixel: self._pixelPages,
706  }
707 

Member Function Documentation

◆ addPlots()

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

Definition at line 708 of file html.py.

708  def addPlots(self, plotterFolder, dqmSubFolder, plotFiles):
709  page = self._purposePageMap.get(plotterFolder.getPurpose(), self._otherPages)
710  page.addPlotSet(plotterFolder, dqmSubFolder, plotFiles)
711 

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

◆ addTable()

def html.IndexSection.addTable (   self,
  table 
)

Definition at line 712 of file html.py.

712  def addTable(self, table):
713  if table is None:
714  return
715 
716  page = self._purposePageMap.get(table.getPurpose(), self._otherPages)
717  page.addTable(table)
718  params = []
719 

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

◆ write()

def html.IndexSection.write (   self,
  baseDir 
)

Definition at line 720 of file html.py.

720  def write(self, baseDir):
721  ret = [
722  " "+self._sampleName,
723  " <br/>",
724  " <ul>",
725  ]
726 
727  for pages in [self._summaryPage, self._iterationPages, self._pixelPages, self._vertexPage, self._miniaodPage, self._timingPage, self._hltPages, self._pfPages, self._otherPages]:
728  labelFiles = pages.write(baseDir)
729  for label, fname in labelFiles:
730  ret.append(' <li><a href="%s">%s</a></li>' % (fname, label))
731 
732  ret.extend([
733  ' </ul>',
734  ' <br/>',
735  ])
736 
737  return ret
738 

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.

Member Data Documentation

◆ _hltPages

html.IndexSection._hltPages
private

Definition at line 693 of file html.py.

Referenced by html.IndexSection.write().

◆ _iterationPages

html.IndexSection._iterationPages
private

Definition at line 688 of file html.py.

Referenced by html.IndexSection.write().

◆ _miniaodPage

html.IndexSection._miniaodPage
private

Definition at line 690 of file html.py.

Referenced by html.IndexSection.write().

◆ _otherPages

html.IndexSection._otherPages
private

◆ _pfPages

html.IndexSection._pfPages
private

Definition at line 692 of file html.py.

Referenced by html.IndexSection.write().

◆ _pixelPages

html.IndexSection._pixelPages
private

Definition at line 694 of file html.py.

Referenced by html.IndexSection.write().

◆ _purposePageMap

html.IndexSection._purposePageMap
private

Definition at line 697 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 665 of file html.py.

Referenced by html.IndexSection.write().

◆ _summaryPage

html.IndexSection._summaryPage
private

Definition at line 687 of file html.py.

Referenced by html.IndexSection.write().

◆ _timingPage

html.IndexSection._timingPage
private

Definition at line 691 of file html.py.

Referenced by html.IndexSection.write().

◆ _vertexPage

html.IndexSection._vertexPage
private

Definition at line 689 of file html.py.

Referenced by html.IndexSection.write().

writeEcalDQMStatus.write
write
Definition: writeEcalDQMStatus.py:48