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

Constructor & Destructor Documentation

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

Definition at line 210 of file html.py.

210  def __init__(self, columnHeaders, rowHeaders, table, purpose, page, section):
211  if len(columnHeaders) != len(table):
212  raise Exception("Got %d columnHeaders for table with %d columns for page %s, section %s" % (len(columnHeaders), len(table), page, section))
213  lenRow = len(table[0])
214  for icol, column in enumerate(table):
215  if len(column) != lenRow:
216  raise Exception("Got non-square table, first column has %d rows, column %d has %d rows" % (lenRow, icol, len(column)))
217  if len(rowHeaders) != lenRow:
218  raise Exception("Got %d rowHeaders for table with %d rows" % (len(rowHeaders), lenRow))
219 
220  self._columnHeaders = columnHeaders
221  self._rowHeaders = rowHeaders
222  self._table = table
223 
224  self._purpose = purpose
225  self._page = page
226  self._section = section
227 
_purpose
Definition: html.py:224
def __init__(self, columnHeaders, rowHeaders, table, purpose, page, section)
Definition: html.py:210
_rowHeaders
Definition: html.py:221
_columnHeaders
Definition: html.py:220
_section
Definition: html.py:226

Member Function Documentation

def html.Table.columnHeaders (   self)

Definition at line 243 of file html.py.

References html.Table._columnHeaders.

243  def columnHeaders(self):
244  return self._columnHeaders
245 
_columnHeaders
Definition: html.py:220
def columnHeaders(self)
Definition: html.py:243
def html.Table.getPage (   self)

Definition at line 231 of file html.py.

References html.Table._page.

231  def getPage(self):
232  return self._page
233 
def getPage(self)
Definition: html.py:231
def html.Table.getPurpose (   self)

Definition at line 228 of file html.py.

References html.Table._purpose.

228  def getPurpose(self):
229  return self._purpose
230 
_purpose
Definition: html.py:224
def getPurpose(self)
Definition: html.py:228
def html.Table.getSection (   self)

Definition at line 234 of file html.py.

References html.Table._section.

234  def getSection(self):
235  return self._section
236 
def getSection(self)
Definition: html.py:234
_section
Definition: html.py:226
def html.Table.ncolumns (   self)

Definition at line 237 of file html.py.

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

237  def ncolumns(self):
238  return len(self._table)
239 
def ncolumns(self)
Definition: html.py:237
def html.Table.nrows (   self)

Definition at line 240 of file html.py.

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

240  def nrows(self):
241  return len(self._table[0])
242 
def nrows(self)
Definition: html.py:240
def html.Table.rowHeaders (   self)

Definition at line 246 of file html.py.

References html.Table._rowHeaders.

246  def rowHeaders(self):
247  return self._rowHeaders
248 
_rowHeaders
Definition: html.py:221
def rowHeaders(self)
Definition: html.py:246
def html.Table.tableAsColumnRow (   self)

Definition at line 249 of file html.py.

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

249  def tableAsColumnRow(self):
250  return self._table
251 
def tableAsColumnRow(self)
Definition: html.py:249
def html.Table.tableAsRowColumn (   self)

Definition at line 252 of file html.py.

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

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

Member Data Documentation

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

Definition at line 221 of file html.py.

Referenced by html.Table.rowHeaders().

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