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

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 296 of file html.py.

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

Member Function Documentation

◆ columnHeaders()

def html.Table.columnHeaders (   self)

Definition at line 329 of file html.py.

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

References html.Table._columnHeaders.

◆ getPage()

def html.Table.getPage (   self)

Definition at line 317 of file html.py.

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

References html.Table._page.

◆ getPurpose()

def html.Table.getPurpose (   self)

Definition at line 314 of file html.py.

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

References html.Table._purpose.

◆ getSection()

def html.Table.getSection (   self)

Definition at line 320 of file html.py.

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

References html.Table._section.

◆ ncolumns()

def html.Table.ncolumns (   self)

Definition at line 323 of file html.py.

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

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

◆ nrows()

def html.Table.nrows (   self)

Definition at line 326 of file html.py.

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

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

◆ rowHeaders()

def html.Table.rowHeaders (   self)

Definition at line 332 of file html.py.

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

References html.Table._rowHeaders.

◆ tableAsColumnRow()

def html.Table.tableAsColumnRow (   self)

Definition at line 335 of file html.py.

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

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

◆ tableAsRowColumn()

def html.Table.tableAsRowColumn (   self)

Definition at line 338 of file html.py.

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

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 307 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