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
 
 _purposePageMap
 
 _sample
 
 _sampleName
 
 _summaryPage
 
 _timingPage
 
 _vertexPage
 

Detailed Description

Definition at line 607 of file html.py.

Constructor & Destructor Documentation

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

Definition at line 608 of file html.py.

608  def __init__(self, sample, title, fastVsFull, pileupComparison):
609  self._sample = sample
610 
611  self._sampleName = ""
612  if sample.fastsim():
613  self._sampleName += "FastSim "
614  if fastVsFull:
615  self._sampleName += "vs FullSim "
616 
617  pileup = ""
618  if hasattr(sample, "hasPileup"):
619  pileup = "with no pileup"
620  if sample.hasPileup():
621  pileup = "with %d pileup (%s)" % (sample.pileupNumber(), sample.pileupType())
622  if pileupComparison is not None:
623  pileup += " "+pileupComparison
624  if hasattr(sample, "customPileupLabel"):
625  pileup = sample.customPileupLabel()
626 
627  scenario = ""
628  if hasattr(sample, "hasScenario") and sample.hasScenario():
629  scenario = " (\"%s\")" % sample.scenario()
630  self._sampleName += "%s sample%s %s" % (_sampleName.get(sample.name(), sample.name()), scenario, pileup)
631 
632  params = [title, self._sampleName, sample, fastVsFull, pileupComparison is not None]
633  self._summaryPage = PageSet(*params)
635  self._vertexPage = PageSet(*params)
636  self._miniaodPage = PageSet(*params)
637  self._timingPage = PageSet(*params)
638  self._hltPages = PageSet(*params, dqmSubFolderTranslatedToSectionName=lambda algoQuality: algoQuality[0])
639  self._otherPages = PageSet(*params)
640 
648  }
649 
def __init__(self, sample, title, fastVsFull, pileupComparison)
Definition: html.py:608

Member Function Documentation

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

Definition at line 650 of file html.py.

References html.IndexSection._otherPages.

650  def addPlots(self, plotterFolder, dqmSubFolder, plotFiles):
651  page = self._purposePageMap.get(plotterFolder.getPurpose(), self._otherPages)
652  page.addPlotSet(plotterFolder, dqmSubFolder, plotFiles)
653 
def addPlots(self, plotterFolder, dqmSubFolder, plotFiles)
Definition: html.py:650
def html.IndexSection.addTable (   self,
  table 
)

Definition at line 654 of file html.py.

References html.IndexSection._otherPages.

654  def addTable(self, table):
655  if table is None:
656  return
657 
658  page = self._purposePageMap.get(table.getPurpose(), self._otherPages)
659  page.addTable(table)
660  params = []
661 
def addTable(self, table)
Definition: html.py:654
def html.IndexSection.write (   self,
  baseDir 
)

Definition at line 662 of file html.py.

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

662  def write(self, baseDir):
663  ret = [
664  " "+self._sampleName,
665  " <br/>",
666  " <ul>",
667  ]
668 
669  for pages in [self._summaryPage, self._iterationPages, self._vertexPage, self._miniaodPage, self._timingPage, self._hltPages, self._otherPages]:
670  labelFiles = pages.write(baseDir)
671  for label, fname in labelFiles:
672  ret.append(' <li><a href="%s">%s</a></li>' % (fname, label))
673 
674  ret.extend([
675  ' </ul>',
676  ' <br/>',
677  ])
678 
679  return ret
680 
def write(self, baseDir)
Definition: html.py:662

Member Data Documentation

html.IndexSection._hltPages
private

Definition at line 638 of file html.py.

Referenced by html.IndexSection.write().

html.IndexSection._iterationPages
private

Definition at line 634 of file html.py.

Referenced by html.IndexSection.write().

html.IndexSection._miniaodPage
private

Definition at line 636 of file html.py.

Referenced by html.IndexSection.write().

html.IndexSection._otherPages
private
html.IndexSection._purposePageMap
private

Definition at line 641 of file html.py.

html.IndexSection._sample
private
html.IndexSection._sampleName
private

Definition at line 611 of file html.py.

Referenced by html.IndexSection.write().

html.IndexSection._summaryPage
private

Definition at line 633 of file html.py.

Referenced by html.IndexSection.write().

html.IndexSection._timingPage
private

Definition at line 637 of file html.py.

Referenced by html.IndexSection.write().

html.IndexSection._vertexPage
private

Definition at line 635 of file html.py.

Referenced by html.IndexSection.write().