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

Constructor & Destructor Documentation

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

Definition at line 649 of file html.py.

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

Member Function Documentation

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

Definition at line 693 of file html.py.

References html.IndexSection._otherPages.

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

Definition at line 697 of file html.py.

References html.IndexSection._otherPages.

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

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

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

Member Data Documentation

html.IndexSection._hltPages
private

Definition at line 679 of file html.py.

Referenced by html.IndexSection.write().

html.IndexSection._iterationPages
private

Definition at line 675 of file html.py.

Referenced by html.IndexSection.write().

html.IndexSection._miniaodPage
private

Definition at line 677 of file html.py.

Referenced by html.IndexSection.write().

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

Definition at line 680 of file html.py.

Referenced by html.IndexSection.write().

html.IndexSection._purposePageMap
private

Definition at line 683 of file html.py.

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

Definition at line 652 of file html.py.

Referenced by html.IndexSection.write().

html.IndexSection._summaryPage
private

Definition at line 674 of file html.py.

Referenced by html.IndexSection.write().

html.IndexSection._timingPage
private

Definition at line 678 of file html.py.

Referenced by html.IndexSection.write().

html.IndexSection._vertexPage
private

Definition at line 676 of file html.py.

Referenced by html.IndexSection.write().