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

Constructor & Destructor Documentation

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

Definition at line 644 of file html.py.

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

Member Function Documentation

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

Definition at line 686 of file html.py.

References html.IndexSection._otherPages.

686  def addPlots(self, plotterFolder, dqmSubFolder, plotFiles):
687  page = self._purposePageMap.get(plotterFolder.getPurpose(), self._otherPages)
688  page.addPlotSet(plotterFolder, dqmSubFolder, plotFiles)
689 
def addPlots(self, plotterFolder, dqmSubFolder, plotFiles)
Definition: html.py:686
def html.IndexSection.addTable (   self,
  table 
)

Definition at line 690 of file html.py.

References html.IndexSection._otherPages.

690  def addTable(self, table):
691  if table is None:
692  return
693 
694  page = self._purposePageMap.get(table.getPurpose(), self._otherPages)
695  page.addTable(table)
696  params = []
697 
def addTable(self, table)
Definition: html.py:690
def html.IndexSection.write (   self,
  baseDir 
)

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

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

Member Data Documentation

html.IndexSection._hltPages
private

Definition at line 674 of file html.py.

Referenced by html.IndexSection.write().

html.IndexSection._iterationPages
private

Definition at line 670 of file html.py.

Referenced by html.IndexSection.write().

html.IndexSection._miniaodPage
private

Definition at line 672 of file html.py.

Referenced by html.IndexSection.write().

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

Definition at line 677 of file html.py.

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

Definition at line 647 of file html.py.

Referenced by html.IndexSection.write().

html.IndexSection._summaryPage
private

Definition at line 669 of file html.py.

Referenced by html.IndexSection.write().

html.IndexSection._timingPage
private

Definition at line 673 of file html.py.

Referenced by html.IndexSection.write().

html.IndexSection._vertexPage
private

Definition at line 671 of file html.py.

Referenced by html.IndexSection.write().