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

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 255 of file html.py.

255  def __init__(self, columnHeaders, rowHeaders, table, purpose, page, section):
256  if len(columnHeaders) != len(table):
257  raise Exception("Got %d columnHeaders for table with %d columns for page %s, section %s" % (len(columnHeaders), len(table), page, section))
258  lenRow = len(table[0])
259  for icol, column in enumerate(table):
260  if len(column) != lenRow:
261  raise Exception("Got non-square table, first column has %d rows, column %d has %d rows" % (lenRow, icol, len(column)))
262  if len(rowHeaders) != lenRow:
263  raise Exception("Got %d rowHeaders for table with %d rows" % (len(rowHeaders), lenRow))
264 
265  self._columnHeaders = columnHeaders
266  self._rowHeaders = rowHeaders
267  self._table = table
268 
269  self._purpose = purpose
270  self._page = page
271  self._section = section
272 

Member Function Documentation

◆ columnHeaders()

def html.Table.columnHeaders (   self)

Definition at line 288 of file html.py.

288  def columnHeaders(self):
289  return self._columnHeaders
290 

References html.Table._columnHeaders.

◆ getPage()

def html.Table.getPage (   self)

Definition at line 276 of file html.py.

276  def getPage(self):
277  return self._page
278 

References html.Table._page.

◆ getPurpose()

def html.Table.getPurpose (   self)

Definition at line 273 of file html.py.

273  def getPurpose(self):
274  return self._purpose
275 

References html.Table._purpose.

◆ getSection()

def html.Table.getSection (   self)

Definition at line 279 of file html.py.

279  def getSection(self):
280  return self._section
281 

References html.Table._section.

◆ ncolumns()

def html.Table.ncolumns (   self)

Definition at line 282 of file html.py.

282  def ncolumns(self):
283  return len(self._table)
284 

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

◆ nrows()

def html.Table.nrows (   self)

Definition at line 285 of file html.py.

285  def nrows(self):
286  return len(self._table[0])
287 

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

◆ rowHeaders()

def html.Table.rowHeaders (   self)

Definition at line 291 of file html.py.

291  def rowHeaders(self):
292  return self._rowHeaders
293 

References html.Table._rowHeaders.

◆ tableAsColumnRow()

def html.Table.tableAsColumnRow (   self)

Definition at line 294 of file html.py.

294  def tableAsColumnRow(self):
295  return self._table
296 

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

◆ tableAsRowColumn()

def html.Table.tableAsRowColumn (   self)

Definition at line 297 of file html.py.

297  def tableAsRowColumn(self):
298  return map(list, zip(*self._table))
299 

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