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

Detailed Description

Definition at line 654 of file html.py.

Constructor & Destructor Documentation

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

Definition at line 655 of file html.py.

655  def __init__(self, sample, title, fastVsFull, pileupComparison):
656  self._sample = sample
657 
658  self._sampleName = ""
659  if sample.fastsim():
660  self._sampleName += "FastSim "
661  if fastVsFull:
662  self._sampleName += "vs FullSim "
663 
664  pileup = ""
665  if hasattr(sample, "hasPileup"):
666  pileup = "with no pileup"
667  if sample.hasPileup():
668  pileup = "with %d pileup (%s)" % (sample.pileupNumber(), sample.pileupType())
669  if pileupComparison is not None:
670  pileup += " "+pileupComparison
671  if hasattr(sample, "customPileupLabel"):
672  pileup = sample.customPileupLabel()
673 
674  scenario = ""
675  if hasattr(sample, "hasScenario") and sample.hasScenario():
676  scenario = " (\"%s\")" % sample.scenario()
677  self._sampleName += "%s sample%s %s" % (_sampleName.get(sample.name(), sample.name()), scenario, pileup)
678 
679  params = [title, self._sampleName, sample, fastVsFull, pileupComparison is not None]
680  self._summaryPage = PageSet(*params)
682  self._vertexPage = PageSet(*params)
683  self._miniaodPage = PageSet(*params)
684  self._timingPage = PageSet(*params)
685  self._hltPages = PageSet(*params, dqmSubFolderTranslatedToSectionName=lambda algoQuality: algoQuality[0])
686  self._pixelPages = PageSet(*params, dqmSubFolderTranslatedToSectionName=lambda algoQuality: algoQuality[0])
687  self._otherPages = PageSet(*params)
688 
697  }
698 
def __init__(self, sample, title, fastVsFull, pileupComparison)
Definition: html.py:655

Member Function Documentation

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

Definition at line 699 of file html.py.

References html.IndexSection._otherPages.

699  def addPlots(self, plotterFolder, dqmSubFolder, plotFiles):
700  page = self._purposePageMap.get(plotterFolder.getPurpose(), self._otherPages)
701  page.addPlotSet(plotterFolder, dqmSubFolder, plotFiles)
702 
def addPlots(self, plotterFolder, dqmSubFolder, plotFiles)
Definition: html.py:699
def html.IndexSection.addTable (   self,
  table 
)

Definition at line 703 of file html.py.

References html.IndexSection._otherPages.

703  def addTable(self, table):
704  if table is None:
705  return
706 
707  page = self._purposePageMap.get(table.getPurpose(), self._otherPages)
708  page.addTable(table)
709  params = []
710 
def addTable(self, table)
Definition: html.py:703
def html.IndexSection.write (   self,
  baseDir 
)

Definition at line 711 of file html.py.

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

711  def write(self, baseDir):
712  ret = [
713  " "+self._sampleName,
714  " <br/>",
715  " <ul>",
716  ]
717 
718  for pages in [self._summaryPage, self._iterationPages, self._pixelPages, self._vertexPage, self._miniaodPage, self._timingPage, self._hltPages, self._otherPages]:
719  labelFiles = pages.write(baseDir)
720  for label, fname in labelFiles:
721  ret.append(' <li><a href="%s">%s</a></li>' % (fname, label))
722 
723  ret.extend([
724  ' </ul>',
725  ' <br/>',
726  ])
727 
728  return ret
729 
def write(self, baseDir)
Definition: html.py:711

Member Data Documentation

html.IndexSection._hltPages
private

Definition at line 685 of file html.py.

Referenced by html.IndexSection.write().

html.IndexSection._iterationPages
private

Definition at line 681 of file html.py.

Referenced by html.IndexSection.write().

html.IndexSection._miniaodPage
private

Definition at line 683 of file html.py.

Referenced by html.IndexSection.write().

html.IndexSection._otherPages
private
html.IndexSection._pixelPages
private

Definition at line 686 of file html.py.

Referenced by html.IndexSection.write().

html.IndexSection._purposePageMap
private

Definition at line 689 of file html.py.

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

Definition at line 658 of file html.py.

Referenced by html.IndexSection.write().

html.IndexSection._summaryPage
private

Definition at line 680 of file html.py.

Referenced by html.IndexSection.write().

html.IndexSection._timingPage
private

Definition at line 684 of file html.py.

Referenced by html.IndexSection.write().

html.IndexSection._vertexPage
private

Definition at line 682 of file html.py.

Referenced by html.IndexSection.write().