CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes | Private Member Functions
cmsPerfPublish.Table Class Reference
Inheritance diagram for cmsPerfPublish.Table:

Public Member Functions

def __init__ (self)
 
def __str__ (self)
 
def addRow (self, row, name)
 
def getCols (self)
 
def getTable (self, mode=0)
 
def newRow (self, name)
 
def transpose (self)
 

Public Attributes

 colNames
 
 keys
 
 rows
 

Private Member Functions

def _newCol (self, name)
 

Detailed Description

Definition at line 123 of file cmsPerfPublish.py.

Constructor & Destructor Documentation

def cmsPerfPublish.Table.__init__ (   self)

Definition at line 125 of file cmsPerfPublish.py.

125  def __init__(self):
126  self.colNames = []
127  self.keys = [None]
128  self.rows = {None: self.colNames}
129 

Member Function Documentation

def cmsPerfPublish.Table.__str__ (   self)
def cmsPerfPublish.Table._newCol (   self,
  name 
)
private

Definition at line 135 of file cmsPerfPublish.py.

References cmsPerfPublish.Table.colNames.

135  def _newCol(self,name):
136  if name in self.colNames:
137  pass
138  else:
139  self.colNames.append(name)
140 
def _newCol(self, name)
def cmsPerfPublish.Table.addRow (   self,
  row,
  name 
)

Definition at line 181 of file cmsPerfPublish.py.

References PhysicsTools::Calibration::Matrix.rows, ProcMatrix::Matrix.rows, and cmsPerfPublish.Table.rows.

181  def addRow(self,row,name):
182  if name in self.rows.keys():
183  pass
184  else:
185  self.keys.append(name)
186  self.rows[name] = row
187 
def addRow(self, row, name)
def cmsPerfPublish.Table.getCols (   self)

Definition at line 141 of file cmsPerfPublish.py.

References cmsPerfPublish.Table.colNames.

141  def getCols(self):
142  return self.colNames
143 
def cmsPerfPublish.Table.getTable (   self,
  mode = 0 
)

Definition at line 153 of file cmsPerfPublish.py.

References cmsPerfPublish.Table.colNames, cms::Filter.keys, MagFieldConfig.keys, cmsPerfPublish.Table.keys, PhysicsTools::Calibration::Matrix.rows, ProcMatrix::Matrix.rows, and cmsPerfPublish.Table.rows.

153  def getTable(self,mode=0):
154  name = "Total"
155 
156  for key in self.keys:
157  if key == None:
158  pass
159  else:
160  total1 = 0
161  total2 = 0
162  rowobj = self.rows[key]
163  rowdict = rowobj.getRowDict()
164  for col in self.colNames:
165  if col == None:
166  pass
167  elif col in rowdict and not col == name:
168  if mode == 1:
169  total1 += rowdict[col]
170  else:
171  (step_tot1, step_tot2) = rowdict[col]
172  total1 += step_tot1
173  total2 += step_tot2
174  if mode == 1:
175  rowobj.addEntry(name,total1)
176  else:
177  rowobj.addEntry(name,(total1,total2))
178 
179  return (self.keys, self.rows)
180 
def getTable(self, mode=0)
def cmsPerfPublish.Table.newRow (   self,
  name 
)

Definition at line 144 of file cmsPerfPublish.py.

References PhysicsTools::Calibration::Matrix.rows, ProcMatrix::Matrix.rows, and cmsPerfPublish.Table.rows.

144  def newRow(self,name):
145  if name in self.rows.keys():
146  pass
147  else:
148  self.keys.append(name)
149  self.rows[name] = Row(self)
150 
151  return self.rows[name]
152 
def newRow(self, name)
def cmsPerfPublish.Table.transpose (   self)

Definition at line 188 of file cmsPerfPublish.py.

References cms::Filter.keys, MagFieldConfig.keys, cmsPerfPublish.Table.keys, PhysicsTools::Calibration::Matrix.rows, ProcMatrix::Matrix.rows, and cmsPerfPublish.Table.rows.

188  def transpose(self):
189  transp = Table()
190  for col in self.colnames:
191  rowobj = transp.newRow(col)
192  for key in self.keys:
193  if key == None:
194  pass
195  else:
196  row_dict = self.rows[key].getRowDict()
197  if key in row_dict:
198  rowobj.addEntry(key,row_dict[col])
199  return transp
200 

Member Data Documentation

cmsPerfPublish.Table.colNames
cmsPerfPublish.Table.keys
cmsPerfPublish.Table.rows