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

Constructor & Destructor Documentation

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

Definition at line 249 of file html.py.

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

Member Function Documentation

def html.Table.columnHeaders (   self)

Definition at line 282 of file html.py.

References html.Table._columnHeaders.

282  def columnHeaders(self):
283  return self._columnHeaders
284 
_columnHeaders
Definition: html.py:259
def columnHeaders(self)
Definition: html.py:282
def html.Table.getPage (   self)

Definition at line 270 of file html.py.

References html.Table._page.

270  def getPage(self):
271  return self._page
272 
def getPage(self)
Definition: html.py:270
def html.Table.getPurpose (   self)

Definition at line 267 of file html.py.

References html.Table._purpose.

267  def getPurpose(self):
268  return self._purpose
269 
_purpose
Definition: html.py:263
def getPurpose(self)
Definition: html.py:267
def html.Table.getSection (   self)

Definition at line 273 of file html.py.

References html.Table._section.

273  def getSection(self):
274  return self._section
275 
def getSection(self)
Definition: html.py:273
_section
Definition: html.py:265
def html.Table.ncolumns (   self)

Definition at line 276 of file html.py.

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

276  def ncolumns(self):
277  return len(self._table)
278 
def ncolumns(self)
Definition: html.py:276
def html.Table.nrows (   self)

Definition at line 279 of file html.py.

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

279  def nrows(self):
280  return len(self._table[0])
281 
def nrows(self)
Definition: html.py:279
def html.Table.rowHeaders (   self)

Definition at line 285 of file html.py.

References html.Table._rowHeaders.

285  def rowHeaders(self):
286  return self._rowHeaders
287 
_rowHeaders
Definition: html.py:260
def rowHeaders(self)
Definition: html.py:285
def html.Table.tableAsColumnRow (   self)

Definition at line 288 of file html.py.

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

288  def tableAsColumnRow(self):
289  return self._table
290 
def tableAsColumnRow(self)
Definition: html.py:288
def html.Table.tableAsRowColumn (   self)

Definition at line 291 of file html.py.

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

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

Member Data Documentation

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

Definition at line 260 of file html.py.

Referenced by html.Table.rowHeaders().

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