CMS 3D CMS Logo

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__ (self, format)
 
def update (self, pbar)
 

Public Attributes

 format
 
- Public Attributes inherited from progressbar.Timer
 format
 

Static Public Attributes

 mapping
 
- Static Public Attributes inherited from progressbar.Timer
 TIME_SENSITIVE
 
- Static Public Attributes inherited from progressbar.Widget
 TIME_SENSITIVE
 

Static Private Attributes

 __slots__
 

Additional Inherited Members

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

Detailed Description

Definition at line 132 of file progressbar.py.

Constructor & Destructor Documentation

◆ __init__()

def progressbar.FormatLabel.__init__ (   self,
  format 
)

Reimplemented from progressbar.Timer.

Definition at line 146 of file progressbar.py.

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

Member Function Documentation

◆ update()

def progressbar.FormatLabel.update (   self,
  pbar 
)
Updates the widget.

pbar - a reference to the calling ProgressBar

Reimplemented from progressbar.Timer.

Definition at line 149 of file progressbar.py.

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

References Formatter.SimpleAsciiFormatter.format, progressbar.Timer.format, Formatter.SimpleHTMLFormatter.format, mps_monitormerge.items, CSCTFUnpacker.mapping, DTDAQInfo.mapping, DTDataIntegrityTest.mapping, DTBlockedROChannelsTest.mapping, GenericMVAComputer::TaggingVariableIterator< Iter_t >::Value.mapping, DTDigiTask.mapping, GenericMVAComputer.mapping, progressbar.FormatLabel.mapping, cmsHarvester.DBSXMLHandler.mapping, and HcalDetIdTransform.transform().

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

Member Data Documentation

◆ __slots__

progressbar.FormatLabel.__slots__
staticprivate

Definition at line 145 of file progressbar.py.

◆ format

progressbar.FormatLabel.format

◆ mapping

progressbar.FormatLabel.mapping
static

Definition at line 135 of file progressbar.py.

Referenced by progressbar.FormatLabel.update().

mps_monitormerge.items
list items
Definition: mps_monitormerge.py:29
HcalDetIdTransform::transform
unsigned transform(const HcalDetId &id, unsigned transformCode)
Definition: HcalDetIdTransform.cc:7
update
#define update(a, b)
Definition: TrackClassifier.cc:10