CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Attributes
html.IndexSection Class Reference

Public Member Functions

def __init__
 
def addPlots
 
def addTable
 
def write
 

Private Attributes

 _hltPages
 
 _iterationPages
 
 _miniaodPage
 
 _otherPages
 
 _pfPages
 
 _pixelPages
 
 _purposePageMap
 
 _sample
 
 _sampleName
 
 _summaryPage
 
 _timingPage
 
 _vertexPage
 

Detailed Description

Definition at line 701 of file html.py.

Constructor & Destructor Documentation

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

Definition at line 702 of file html.py.

703  def __init__(self, sample, title, fastVsFull, pileupComparison):
704  self._sample = sample
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)
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)
738  self._purposePageMap = {
744  PlotPurpose.PF: self._pfPages,
747  }

Member Function Documentation

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

Definition at line 748 of file html.py.

References html.IndexSection._otherPages.

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

Definition at line 752 of file html.py.

References html.IndexSection._otherPages.

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 = []
def html.IndexSection.write (   self,
  baseDir 
)

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

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

Member Data Documentation

html.IndexSection._hltPages
private

Definition at line 733 of file html.py.

Referenced by html.IndexSection.write().

html.IndexSection._iterationPages
private

Definition at line 728 of file html.py.

Referenced by html.IndexSection.write().

html.IndexSection._miniaodPage
private

Definition at line 730 of file html.py.

Referenced by html.IndexSection.write().

html.IndexSection._otherPages
private

Definition at line 735 of file html.py.

Referenced by html.IndexSection.addPlots(), html.IndexSection.addTable(), and html.IndexSection.write().

html.IndexSection._pfPages
private

Definition at line 732 of file html.py.

Referenced by html.IndexSection.write().

html.IndexSection._pixelPages
private

Definition at line 734 of file html.py.

Referenced by html.IndexSection.write().

html.IndexSection._purposePageMap
private

Definition at line 737 of file html.py.

html.IndexSection._sample
private

Definition at line 703 of file html.py.

Referenced by validation.Sample.datasetpattern(), validation.Sample.filename(), validation.Sample.label(), validation.Sample.name(), and validation.Sample.sample().

html.IndexSection._sampleName
private

Definition at line 705 of file html.py.

Referenced by html.IndexSection.write().

html.IndexSection._summaryPage
private

Definition at line 727 of file html.py.

Referenced by html.IndexSection.write().

html.IndexSection._timingPage
private

Definition at line 731 of file html.py.

Referenced by html.IndexSection.write().

html.IndexSection._vertexPage
private

Definition at line 729 of file html.py.

Referenced by html.IndexSection.write().