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

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 703 of file html.py.

703  def __init__(self, sample, title, fastVsFull, pileupComparison):
704  self._sample = sample
705 
706  self._sampleName = ""
707  if sample.fastsim():
708  self._sampleName += "FastSim "
709  if fastVsFull:
710  self._sampleName += "vs FullSim "
711 
712  pileup = ""
713  if hasattr(sample, "hasPileup"):
714  pileup = "with no pileup"
715  if sample.hasPileup():
716  pileup = "with %d pileup (%s)" % (sample.pileupNumber(), sample.pileupType())
717  if pileupComparison is not None:
718  pileup += " "+pileupComparison
719  if hasattr(sample, "customPileupLabel"):
720  pileup = sample.customPileupLabel()
721 
722  scenario = ""
723  if hasattr(sample, "hasScenario") and sample.hasScenario():
724  scenario = " (\"%s\")" % sample.scenario()
725  self._sampleName += "%s sample%s %s" % (_sampleName.get(sample.name(), sample.name()), scenario, pileup)
726 
727  params = [title, self._sampleName, sample, fastVsFull, pileupComparison is not None]
728  self._summaryPage = PageSet(*params)
729  self._iterationPages = TrackingPageSet(*params)
730  self._vertexPage = PageSet(*params)
731  self._miniaodPage = PageSet(*params)
732  self._timingPage = PageSet(*params)
733  self._pfPages = PageSet(*params)
734  self._hltPages = PageSet(*params, dqmSubFolderTranslatedToSectionName=lambda algoQuality: algoQuality[0])
735  self._pixelPages = TrackingPageSet(*params)
736  self._otherPages = PageSet(*params)
737 
738  self._purposePageMap = {
739  PlotPurpose.TrackingIteration: self._iterationPages,
740  PlotPurpose.TrackingSummary: self._summaryPage,
741  PlotPurpose.Vertexing: self._vertexPage,
742  PlotPurpose.MiniAOD: self._miniaodPage,
743  PlotPurpose.Timing: self._timingPage,
744  PlotPurpose.PF: self._pfPages,
745  PlotPurpose.HLT: self._hltPages,
746  PlotPurpose.Pixel: self._pixelPages,
747  }
748 

Member Function Documentation

◆ addPlots()

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

Definition at line 749 of file html.py.

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

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

◆ addTable()

def html.IndexSection.addTable (   self,
  table 
)

Definition at line 753 of file html.py.

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

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

◆ write()

def html.IndexSection.write (   self,
  baseDir 
)

Definition at line 761 of file html.py.

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

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

Referenced by html.IndexSection.write().

◆ _iterationPages

html.IndexSection._iterationPages
private

Definition at line 729 of file html.py.

Referenced by html.IndexSection.write().

◆ _miniaodPage

html.IndexSection._miniaodPage
private

Definition at line 731 of file html.py.

Referenced by html.IndexSection.write().

◆ _otherPages

html.IndexSection._otherPages
private

◆ _pfPages

html.IndexSection._pfPages
private

Definition at line 733 of file html.py.

Referenced by html.IndexSection.write().

◆ _pixelPages

html.IndexSection._pixelPages
private

Definition at line 735 of file html.py.

Referenced by html.IndexSection.write().

◆ _purposePageMap

html.IndexSection._purposePageMap
private

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

Referenced by html.IndexSection.write().

◆ _summaryPage

html.IndexSection._summaryPage
private

Definition at line 728 of file html.py.

Referenced by html.IndexSection.write().

◆ _timingPage

html.IndexSection._timingPage
private

Definition at line 732 of file html.py.

Referenced by html.IndexSection.write().

◆ _vertexPage

html.IndexSection._vertexPage
private

Definition at line 730 of file html.py.

Referenced by html.IndexSection.write().

writeEcalDQMStatus.write
write
Definition: writeEcalDQMStatus.py:48