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

Constructor & Destructor Documentation

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

Definition at line 609 of file html.py.

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

Member Function Documentation

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

Definition at line 651 of file html.py.

References html.IndexSection._otherPages.

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

Definition at line 655 of file html.py.

References html.IndexSection._otherPages.

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

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

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

Member Data Documentation

html.IndexSection._hltPages
private

Definition at line 639 of file html.py.

Referenced by html.IndexSection.write().

html.IndexSection._iterationPages
private

Definition at line 635 of file html.py.

Referenced by html.IndexSection.write().

html.IndexSection._miniaodPage
private

Definition at line 637 of file html.py.

Referenced by html.IndexSection.write().

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

Definition at line 642 of file html.py.

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

Definition at line 612 of file html.py.

Referenced by html.IndexSection.write().

html.IndexSection._summaryPage
private

Definition at line 634 of file html.py.

Referenced by html.IndexSection.write().

html.IndexSection._timingPage
private

Definition at line 638 of file html.py.

Referenced by html.IndexSection.write().

html.IndexSection._vertexPage
private

Definition at line 636 of file html.py.

Referenced by html.IndexSection.write().