CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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__
 
def __str__
 
def addRow
 
def getCols
 
def getTable
 
def newRow
 
def transpose
 

Public Attributes

 colNames
 
 keys
 
 rows
 

Private Member Functions

def _newCol
 

Detailed Description

Definition at line 120 of file cmsPerfPublish.py.

Constructor & Destructor Documentation

def cmsPerfPublish.Table.__init__ (   self)

Definition at line 122 of file cmsPerfPublish.py.

123  def __init__(self):
124  self.colNames = []
125  self.keys = [None]
126  self.rows = {None: self.colNames}

Member Function Documentation

def cmsPerfPublish.Table.__str__ (   self)

Definition at line 127 of file cmsPerfPublish.py.

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

128  def __str__(self):
129  out = self.keys
130  out += "\n" + self.rows
131  return out
def cmsPerfPublish.Table._newCol (   self,
  name 
)
private

Definition at line 132 of file cmsPerfPublish.py.

References cmsPerfPublish.Table.colNames.

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

Definition at line 178 of file cmsPerfPublish.py.

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

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

Definition at line 138 of file cmsPerfPublish.py.

References cmsPerfPublish.Table.colNames.

139  def getCols(self):
140  return self.colNames
def cmsPerfPublish.Table.getTable (   self,
  mode = 0 
)

Definition at line 150 of file cmsPerfPublish.py.

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

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

Definition at line 141 of file cmsPerfPublish.py.

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

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

Definition at line 185 of file cmsPerfPublish.py.

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

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

Member Data Documentation

cmsPerfPublish.Table.colNames

Definition at line 123 of file cmsPerfPublish.py.

Referenced by cmsPerfPublish.Table._newCol(), cmsPerfPublish.Table.getCols(), and cmsPerfPublish.Table.getTable().

cmsPerfPublish.Table.keys

Definition at line 124 of file cmsPerfPublish.py.

Referenced by psClasses.queueList.__init__(), cmsPerfPublish.Table.__str__(), cmsPerfPublish.Table.getTable(), psClasses.queueList.smallestQueue(), psClasses.queueList.thinerQueue(), and cmsPerfPublish.Table.transpose().

cmsPerfPublish.Table.rows

Definition at line 125 of file cmsPerfPublish.py.

Referenced by cmsPerfPublish.Table.__str__(), cmsPerfPublish.Table.addRow(), cmsPerfPublish.Table.getTable(), cmsPerfPublish.Table.newRow(), and cmsPerfPublish.Table.transpose().