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 Member Functions | Private Attributes
html.PageSet Class Reference
Inheritance diagram for html.PageSet:
html.TrackingPageSet

Public Member Functions

def __init__
 
def addPlotSet
 
def write
 

Private Member Functions

def _mapPagesName
 
def _orderPages
 

Private Attributes

 _base
 
 _pages
 
 _prefix
 
 _sampleName
 
 _title
 

Detailed Description

Definition at line 220 of file html.py.

Constructor & Destructor Documentation

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

Definition at line 221 of file html.py.

222  def __init__(self, title, base, sampleName, sample, fastVsFull):
223  self._title = title
224  self._base = base
225  self._sampleName = sampleName
226  self._pages = collections.OrderedDict()
228  self._prefix=""
229  if hasattr(sample, "hasPileup"):
230  self._prefix = "nopu"
231  if sample.hasPileup():
232  self._prefix = "pu"+sample.pileupType()
233  self._prefix += "_"
234 
235  if sample.fastsim():
236  self._prefix += "fast_"
237  if fastVsFull:
238  self._prefix += "full_"
239 
240  self._prefix += _sampleFileName.get(sample.label(), sample.label())+"_"
def __init__
Definition: html.py:221

Member Function Documentation

def html.PageSet._mapPagesName (   self,
  name 
)
private

Definition at line 275 of file html.py.

Referenced by html.PageSet.write().

276  def _mapPagesName(self, name):
277  return _pageNameMap.get(name, name)
def _mapPagesName
Definition: html.py:275
def html.PageSet._orderPages (   self,
  keys 
)
private

Definition at line 278 of file html.py.

Referenced by html.PageSet.write().

279  def _orderPages(self, keys):
280  return keys
281 
282 
def _orderPages
Definition: html.py:278
def html.PageSet.addPlotSet (   self,
  plotterFolder,
  dqmSubFolder,
  plotFiles 
)

Definition at line 241 of file html.py.

References html.PageSet._base, html.PageSet._pages, html.PageSet._sampleName, HistoParams< T >._title, HistoParams< TH2F >._title, HistoParams< TProfile2D >._title, and html.PageSet._title.

242  def addPlotSet(self, plotterFolder, dqmSubFolder, plotFiles):
243  pageKey = plotterFolder.getPage()
244  if pageKey is None:
245  if dqmSubFolder is not None:
246  pageKey = dqmSubFolder.translated
247  else:
248  pageKey = plotterFolder.getName()
249 
250  if pageKey not in self._pages:
251  page = Page(self._title, self._base, self._sampleName)
252  self._pages[pageKey] = page
253  else:
254  page = self._pages[pageKey]
255  sectionName = plotterFolder.getSection()
256  if sectionName is None:
257  if plotterFolder.getPage() is not None and dqmSubFolder is not None:
258  sectionName = dqmSubFolder.translated
259  else:
260  sectionName = ""
261 
262  page.addPlotSet(sectionName, plotFiles)
def addPlotSet
Definition: html.py:241
def html.PageSet.write (   self,
  baseDir 
)

Definition at line 263 of file html.py.

References html.PageSet._mapPagesName(), html.PageSet._orderPages(), html.PageSet._pages, CommonAnalyzer._prefix, and html.PageSet._prefix.

264  def write(self, baseDir):
265  #print "TrackingPageSet.write"
266  ret = []
267 
268  keys = self._orderPages(self._pages.keys())
269  for key in keys:
270  page = self._pages[key]
271  fileName = "%s%s.html" % (self._prefix, key)
272  page.write(os.path.join(baseDir, fileName))
273  ret.append( (self._mapPagesName(key), fileName) )
274  return ret
def _orderPages
Definition: html.py:278
def write
Definition: html.py:263
def _mapPagesName
Definition: html.py:275

Member Data Documentation

html.PageSet._base
private

Definition at line 223 of file html.py.

Referenced by html.PageSet.addPlotSet(), and html.TrackingPageSet.addPlotSet().

html.PageSet._pages
private

Definition at line 225 of file html.py.

Referenced by html.PageSet.addPlotSet(), html.TrackingPageSet.addPlotSet(), and html.PageSet.write().

html.PageSet._prefix
private

Definition at line 227 of file html.py.

Referenced by html.PageSet.write().

html.PageSet._sampleName
private

Definition at line 224 of file html.py.

Referenced by html.PageSet.addPlotSet(), html.TrackingPageSet.addPlotSet(), and html.IndexSection.write().

html.PageSet._title
private

Definition at line 222 of file html.py.

Referenced by html.PageSet.addPlotSet(), html.TrackingPageSet.addPlotSet(), plotting.Subtract.create(), plotting.FakeDuplicate.create(), and plotting.Plot.create().