CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
html.Table Class Reference

Public Member Functions

def __init__ (self, columnHeaders, rowHeaders, table, purpose, page, section)
 
def columnHeaders (self)
 
def getPage (self)
 
def getPurpose (self)
 
def getSection (self)
 
def ncolumns (self)
 
def nrows (self)
 
def rowHeaders (self)
 
def tableAsColumnRow (self)
 
def tableAsRowColumn (self)
 

Private Attributes

 _columnHeaders
 
 _page
 
 _purpose
 
 _rowHeaders
 
 _section
 
 _table
 

Detailed Description

Definition at line 293 of file html.py.

Constructor & Destructor Documentation

◆ __init__()

def html.Table.__init__ (   self,
  columnHeaders,
  rowHeaders,
  table,
  purpose,
  page,
  section 
)

Definition at line 295 of file html.py.

295  def __init__(self, columnHeaders, rowHeaders, table, purpose, page, section):
296  if len(columnHeaders) != len(table):
297  raise Exception("Got %d columnHeaders for table with %d columns for page %s, section %s" % (len(columnHeaders), len(table), page, section))
298  lenRow = len(table[0])
299  for icol, column in enumerate(table):
300  if len(column) != lenRow:
301  raise Exception("Got non-square table, first column has %d rows, column %d has %d rows" % (lenRow, icol, len(column)))
302  if len(rowHeaders) != lenRow:
303  raise Exception("Got %d rowHeaders for table with %d rows" % (len(rowHeaders), lenRow))
304 
305  self._columnHeaders = columnHeaders
306  self._rowHeaders = rowHeaders
307  self._table = table
308 
309  self._purpose = purpose
310  self._page = page
311  self._section = section
312 

Member Function Documentation

◆ columnHeaders()

def html.Table.columnHeaders (   self)

Definition at line 328 of file html.py.

328  def columnHeaders(self):
329  return self._columnHeaders
330 

References html.Table._columnHeaders.

◆ getPage()

def html.Table.getPage (   self)

Definition at line 316 of file html.py.

316  def getPage(self):
317  return self._page
318 

References html.Table._page.

◆ getPurpose()

def html.Table.getPurpose (   self)

Definition at line 313 of file html.py.

313  def getPurpose(self):
314  return self._purpose
315 

References html.Table._purpose.

◆ getSection()

def html.Table.getSection (   self)

Definition at line 319 of file html.py.

319  def getSection(self):
320  return self._section
321 

References html.Table._section.

◆ ncolumns()

def html.Table.ncolumns (   self)

Definition at line 322 of file html.py.

322  def ncolumns(self):
323  return len(self._table)
324 

References LMap::impl._table, and html.Table._table.

◆ nrows()

def html.Table.nrows (   self)

Definition at line 325 of file html.py.

325  def nrows(self):
326  return len(self._table[0])
327 

References LMap::impl._table, and html.Table._table.

◆ rowHeaders()

def html.Table.rowHeaders (   self)

Definition at line 331 of file html.py.

331  def rowHeaders(self):
332  return self._rowHeaders
333 

References html.Table._rowHeaders.

◆ tableAsColumnRow()

def html.Table.tableAsColumnRow (   self)

Definition at line 334 of file html.py.

334  def tableAsColumnRow(self):
335  return self._table
336 

References LMap::impl._table, and html.Table._table.

◆ tableAsRowColumn()

def html.Table.tableAsRowColumn (   self)

Definition at line 337 of file html.py.

337  def tableAsRowColumn(self):
338  return map(list, zip(*self._table))
339 

References LMap::impl._table, html.Table._table, genParticles_cff.map, and ComparisonHelper.zip().

Member Data Documentation

◆ _columnHeaders

html.Table._columnHeaders
private

◆ _page

html.Table._page
private

◆ _purpose

html.Table._purpose
private

◆ _rowHeaders

html.Table._rowHeaders
private

Definition at line 306 of file html.py.

Referenced by html.Table.rowHeaders().

◆ _section

html.Table._section
private

◆ _table

html.Table._table
private
Exception
ComparisonHelper::zip
OutputIterator zip(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result, Compare comp)
Definition: L1TStage2CaloLayer1.h:41
genParticles_cff.map
map
Definition: genParticles_cff.py:11