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

Constructor & Destructor Documentation

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

Definition at line 657 of file html.py.

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

Member Function Documentation

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

Definition at line 703 of file html.py.

References html.IndexSection._otherPages.

703  def addPlots(self, plotterFolder, dqmSubFolder, plotFiles):
704  page = self._purposePageMap.get(plotterFolder.getPurpose(), self._otherPages)
705  page.addPlotSet(plotterFolder, dqmSubFolder, plotFiles)
706 
def addPlots(self, plotterFolder, dqmSubFolder, plotFiles)
Definition: html.py:703
def html.IndexSection.addTable (   self,
  table 
)

Definition at line 707 of file html.py.

References html.IndexSection._otherPages.

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

Definition at line 715 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.

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

Member Data Documentation

html.IndexSection._hltPages
private

Definition at line 688 of file html.py.

Referenced by html.IndexSection.write().

html.IndexSection._iterationPages
private

Definition at line 683 of file html.py.

Referenced by html.IndexSection.write().

html.IndexSection._miniaodPage
private

Definition at line 685 of file html.py.

Referenced by html.IndexSection.write().

html.IndexSection._otherPages
private
html.IndexSection._pfPages
private

Definition at line 687 of file html.py.

Referenced by html.IndexSection.write().

html.IndexSection._pixelPages
private

Definition at line 689 of file html.py.

Referenced by html.IndexSection.write().

html.IndexSection._purposePageMap
private

Definition at line 692 of file html.py.

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

Definition at line 660 of file html.py.

Referenced by html.IndexSection.write().

html.IndexSection._summaryPage
private

Definition at line 682 of file html.py.

Referenced by html.IndexSection.write().

html.IndexSection._timingPage
private

Definition at line 686 of file html.py.

Referenced by html.IndexSection.write().

html.IndexSection._vertexPage
private

Definition at line 684 of file html.py.

Referenced by html.IndexSection.write().