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

Constructor & Destructor Documentation

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

Definition at line 245 of file html.py.

245  def __init__(self, columnHeaders, rowHeaders, table, purpose, page, section):
246  if len(columnHeaders) != len(table):
247  raise Exception("Got %d columnHeaders for table with %d columns for page %s, section %s" % (len(columnHeaders), len(table), page, section))
248  lenRow = len(table[0])
249  for icol, column in enumerate(table):
250  if len(column) != lenRow:
251  raise Exception("Got non-square table, first column has %d rows, column %d has %d rows" % (lenRow, icol, len(column)))
252  if len(rowHeaders) != lenRow:
253  raise Exception("Got %d rowHeaders for table with %d rows" % (len(rowHeaders), lenRow))
254 
255  self._columnHeaders = columnHeaders
256  self._rowHeaders = rowHeaders
257  self._table = table
258 
259  self._purpose = purpose
260  self._page = page
261  self._section = section
262 
_purpose
Definition: html.py:259
def __init__(self, columnHeaders, rowHeaders, table, purpose, page, section)
Definition: html.py:245
_rowHeaders
Definition: html.py:256
_columnHeaders
Definition: html.py:255
_section
Definition: html.py:261

Member Function Documentation

def html.Table.columnHeaders (   self)

Definition at line 278 of file html.py.

References html.Table._columnHeaders.

278  def columnHeaders(self):
279  return self._columnHeaders
280 
_columnHeaders
Definition: html.py:255
def columnHeaders(self)
Definition: html.py:278
def html.Table.getPage (   self)

Definition at line 266 of file html.py.

References html.Table._page.

266  def getPage(self):
267  return self._page
268 
def getPage(self)
Definition: html.py:266
def html.Table.getPurpose (   self)

Definition at line 263 of file html.py.

References html.Table._purpose.

263  def getPurpose(self):
264  return self._purpose
265 
_purpose
Definition: html.py:259
def getPurpose(self)
Definition: html.py:263
def html.Table.getSection (   self)

Definition at line 269 of file html.py.

References html.Table._section.

269  def getSection(self):
270  return self._section
271 
def getSection(self)
Definition: html.py:269
_section
Definition: html.py:261
def html.Table.ncolumns (   self)

Definition at line 272 of file html.py.

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

272  def ncolumns(self):
273  return len(self._table)
274 
def ncolumns(self)
Definition: html.py:272
def html.Table.nrows (   self)

Definition at line 275 of file html.py.

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

275  def nrows(self):
276  return len(self._table[0])
277 
def nrows(self)
Definition: html.py:275
def html.Table.rowHeaders (   self)

Definition at line 281 of file html.py.

References html.Table._rowHeaders.

281  def rowHeaders(self):
282  return self._rowHeaders
283 
_rowHeaders
Definition: html.py:256
def rowHeaders(self)
Definition: html.py:281
def html.Table.tableAsColumnRow (   self)

Definition at line 284 of file html.py.

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

284  def tableAsColumnRow(self):
285  return self._table
286 
def tableAsColumnRow(self)
Definition: html.py:284
def html.Table.tableAsRowColumn (   self)

Definition at line 287 of file html.py.

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

287  def tableAsRowColumn(self):
288  return map(list, zip(*self._table))
289 
OutputIterator zip(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result, Compare comp)
def tableAsRowColumn(self)
Definition: html.py:287

Member Data Documentation

html.Table._columnHeaders
private
html.Table._page
private
html.Table._purpose
private
html.Table._rowHeaders
private

Definition at line 256 of file html.py.

Referenced by html.Table.rowHeaders().

html.Table._section
private
html.Table._table
private