CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Public Attributes | Static Public Attributes | Static Private Attributes
progressbar.FormatLabel Class Reference
Inheritance diagram for progressbar.FormatLabel:
progressbar.Timer progressbar.Widget

Public Member Functions

def __init__
 
def update
 
- Public Member Functions inherited from progressbar.Timer
def __init__
 
def update
 
- Public Member Functions inherited from progressbar.Widget
def update
 

Public Attributes

 format
 
- Public Attributes inherited from progressbar.Timer
 format
 

Static Public Attributes

dictionary mapping
 
- Static Public Attributes inherited from progressbar.Timer
 TIME_SENSITIVE = True
 
- Static Public Attributes inherited from progressbar.Widget
 TIME_SENSITIVE = False
 

Static Private Attributes

tuple __slots__ = ('format',)
 

Additional Inherited Members

- Static Public Member Functions inherited from progressbar.Timer
def format_time
 

Detailed Description

Definition at line 132 of file progressbar.py.

Constructor & Destructor Documentation

def progressbar.FormatLabel.__init__ (   self,
  format 
)

Definition at line 146 of file progressbar.py.

147  def __init__(self, format):
148  self.format = format

Member Function Documentation

def progressbar.FormatLabel.update (   self,
  pbar 
)

Definition at line 149 of file progressbar.py.

References Formatter.SimpleAsciiFormatter.format, progressbar.Timer.format, Formatter.SimpleHTMLFormatter.format, and HcalDetIdTransform.transform().

Referenced by progressbar.ProgressBar.__next__(), MatrixUtil.Matrix.__setitem__(), MatrixUtil.Steps.__setitem__(), progressbar.ProgressBar.finish(), and MatrixUtil.Steps.overwrite().

150  def update(self, pbar):
151  context = {}
152  for name, (key, transform) in self.mapping.items():
153  try:
154  value = getattr(pbar, key)
155 
156  if transform is None:
157  context[name] = value
158  else:
159  context[name] = transform(value)
160  except: pass
161 
162  return self.format % context
unsigned transform(const HcalDetId &id, unsigned transformCode)

Member Data Documentation

tuple progressbar.FormatLabel.__slots__ = ('format',)
staticprivate

Definition at line 145 of file progressbar.py.

progressbar.FormatLabel.format

Definition at line 147 of file progressbar.py.

Referenced by genericValidation.ValidationWithPlotsSummaryBase.SummaryItem.values().

dictionary progressbar.FormatLabel.mapping
static
Initial value:
1 = {
2  'elapsed': ('seconds_elapsed', Timer.format_time),
3  'finished': ('finished', None),
4  'last_update': ('last_update_time', None),
5  'max': ('maxval', None),
6  'seconds': ('seconds_elapsed', None),
7  'start': ('start_time', None),
8  'value': ('currval', None)
9  }

Definition at line 135 of file progressbar.py.