test
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 121 of file cmsPerfPublish.py.

Constructor & Destructor Documentation

def cmsPerfPublish.Table.__init__ (   self)

Definition at line 123 of file cmsPerfPublish.py.

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

Member Function Documentation

def cmsPerfPublish.Table.__str__ (   self)

Definition at line 128 of file cmsPerfPublish.py.

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

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

Definition at line 133 of file cmsPerfPublish.py.

References cmsPerfPublish.Table.colNames.

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

Definition at line 179 of file cmsPerfPublish.py.

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

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

Definition at line 139 of file cmsPerfPublish.py.

References cmsPerfPublish.Table.colNames.

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

Definition at line 151 of file cmsPerfPublish.py.

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

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

Definition at line 142 of file cmsPerfPublish.py.

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

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

Definition at line 186 of file cmsPerfPublish.py.

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

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

Member Data Documentation

cmsPerfPublish.Table.colNames

Definition at line 124 of file cmsPerfPublish.py.

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

cmsPerfPublish.Table.keys

Definition at line 125 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 126 of file cmsPerfPublish.py.

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