CMS 3D CMS Logo

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

Public Member Functions

def __init__
 
def addPlots
 
def write
 

Private Attributes

 _iterationPages
 
 _miniaodPage
 
 _otherPages
 
 _sample
 
 _sampleName
 
 _summaryPage
 
 _vertexPage
 

Detailed Description

Definition at line 339 of file html.py.

Constructor & Destructor Documentation

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

Definition at line 340 of file html.py.

341  def __init__(self, sample, fastVsFull, title, base):
342  self._sample = sample
344  self._sampleName = ""
345  if sample.fastsim():
346  self._sampleName += "FastSim "
347  if fastVsFull:
348  self._sampleName += "vs FullSim "
349 
350  pileup = ""
351  if hasattr(sample, "hasPileup"):
352  pileup = "with no pileup"
353  if sample.hasPileup():
354  pileup = "with %s pileup" % sample.pileupType()
355  self._sampleName += "%s sample %s" % (_sampleName.get(sample.name(), sample.name()), pileup)
356 
357  params = [title, base, self._sampleName, sample, fastVsFull]
358  self._summaryPage = PageSet(*params)
360  self._vertexPage = PageSet(*params)
361  self._miniaodPage = PageSet(*params)
362  self._otherPages = PageSet(*params)

Member Function Documentation

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

Definition at line 363 of file html.py.

364  def addPlots(self, plotterFolder, dqmSubFolder, plotFiles):
365  params = [plotterFolder, dqmSubFolder, plotFiles]
366 
367  purpose = plotterFolder.getPurpose()
368  if purpose is PlotPurpose.TrackingIteration:
369  self._iterationPages.addPlotSet(*params)
370  elif purpose is PlotPurpose.TrackingSummary:
371  self._summaryPage.addPlotSet(*params)
372  elif purpose is PlotPurpose.Vertexing:
373  self._vertexPage.addPlotSet(*params)
374  elif purpose is PlotPurpose.MiniAOD:
375  self._miniaodPage.addPlotSet(*params)
376  else:
377  self._otherPages.addPlotSet(*params)
def html.IndexSection.write (   self,
  baseDir 
)

Definition at line 378 of file html.py.

References html.IndexSection._iterationPages, html.IndexSection._miniaodPage, html.IndexSection._otherPages, html.PageSet._sampleName, html.IndexSection._sampleName, html.IndexSection._summaryPage, and html.IndexSection._vertexPage.

379  def write(self, baseDir):
380  ret = [
381  " "+self._sampleName,
382  " <br/>",
383  " <ul>",
384  ]
385 
386  for pages in [self._summaryPage, self._iterationPages, self._vertexPage, self._miniaodPage, self._otherPages]:
387  labelFiles = pages.write(baseDir)
388  for label, fname in labelFiles:
389  ret.append(' <li><a href="%s">%s</a></li>' % (fname, label))
390 
391  ret.extend([
392  ' </ul>',
393  ' <br/>',
394  ])
395 
396  return ret

Member Data Documentation

html.IndexSection._iterationPages
private

Definition at line 358 of file html.py.

Referenced by html.IndexSection.write().

html.IndexSection._miniaodPage
private

Definition at line 360 of file html.py.

Referenced by html.IndexSection.write().

html.IndexSection._otherPages
private

Definition at line 361 of file html.py.

Referenced by html.IndexSection.write().

html.IndexSection._sample
private

Definition at line 341 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 343 of file html.py.

Referenced by html.IndexSection.write().

html.IndexSection._summaryPage
private

Definition at line 357 of file html.py.

Referenced by html.IndexSection.write().

html.IndexSection._vertexPage
private

Definition at line 359 of file html.py.

Referenced by html.IndexSection.write().