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

Constructor & Destructor Documentation

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

Definition at line 648 of file html.py.

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

Member Function Documentation

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

Definition at line 692 of file html.py.

References html.IndexSection._otherPages.

692  def addPlots(self, plotterFolder, dqmSubFolder, plotFiles):
693  page = self._purposePageMap.get(plotterFolder.getPurpose(), self._otherPages)
694  page.addPlotSet(plotterFolder, dqmSubFolder, plotFiles)
695 
def addPlots(self, plotterFolder, dqmSubFolder, plotFiles)
Definition: html.py:692
def html.IndexSection.addTable (   self,
  table 
)

Definition at line 696 of file html.py.

References html.IndexSection._otherPages.

696  def addTable(self, table):
697  if table is None:
698  return
699 
700  page = self._purposePageMap.get(table.getPurpose(), self._otherPages)
701  page.addTable(table)
702  params = []
703 
def addTable(self, table)
Definition: html.py:696
def html.IndexSection.write (   self,
  baseDir 
)

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

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

Member Data Documentation

html.IndexSection._hltPages
private

Definition at line 678 of file html.py.

Referenced by html.IndexSection.write().

html.IndexSection._iterationPages
private

Definition at line 674 of file html.py.

Referenced by html.IndexSection.write().

html.IndexSection._miniaodPage
private

Definition at line 676 of file html.py.

Referenced by html.IndexSection.write().

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

Definition at line 679 of file html.py.

Referenced by html.IndexSection.write().

html.IndexSection._purposePageMap
private

Definition at line 682 of file html.py.

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

Definition at line 651 of file html.py.

Referenced by html.IndexSection.write().

html.IndexSection._summaryPage
private

Definition at line 673 of file html.py.

Referenced by html.IndexSection.write().

html.IndexSection._timingPage
private

Definition at line 677 of file html.py.

Referenced by html.IndexSection.write().

html.IndexSection._vertexPage
private

Definition at line 675 of file html.py.

Referenced by html.IndexSection.write().