CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Static Private Attributes
progressbar.Timer Class Reference
Inheritance diagram for progressbar.Timer:
progressbar.Widget progressbar.FormatLabel

Public Member Functions

def __init__ (self, format='Elapsed Time:%s')
 
def update (self, pbar)
 
- Public Member Functions inherited from progressbar.Widget
def update (self, pbar)
 

Static Public Member Functions

def format_time (seconds)
 

Public Attributes

 format
 

Static Public Attributes

 TIME_SENSITIVE
 
- Static Public Attributes inherited from progressbar.Widget
 TIME_SENSITIVE
 

Static Private Attributes

 __slots__
 

Detailed Description

Definition at line 37 of file progressbar.py.

Constructor & Destructor Documentation

◆ __init__()

def progressbar.Timer.__init__ (   self,
  format = 'Elapsed Time: %s' 
)

Definition at line 43 of file progressbar.py.

43  def __init__(self, format='Elapsed Time: %s'): self.format = format
44 
45 
def __init__(self, dataset, job_number, job_id, job_name, isDA, isMC, applyBOWS, applyEXTRACOND, extraconditions, runboundary, lumilist, intlumi, maxevents, gt, allFromGT, alignmentDB, alignmentTAG, apeDB, apeTAG, bowDB, bowTAG, vertextype, tracktype, refittertype, ttrhtype, applyruncontrol, ptcut, CMSSW_dir, the_dir)

Member Function Documentation

◆ format_time()

def progressbar.Timer.format_time (   seconds)
static

Definition at line 47 of file progressbar.py.

References createfilelist.int, and str.

Referenced by progressbar.Timer.update().

47  def format_time(seconds):
48  'Formats time as the string "HH:MM:SS".'
49 
50  return str(datetime.timedelta(seconds=int(seconds)))
51 
52 
#define str(s)

◆ update()

def progressbar.Timer.update (   self,
  pbar 
)

Definition at line 53 of file progressbar.py.

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

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

53  def update(self, pbar):
54  'Updates the widget to show the elapsed time.'
55 
56  return self.format % self.format_time(pbar.seconds_elapsed)
#define update(a, b)

Member Data Documentation

◆ __slots__

progressbar.Timer.__slots__
staticprivate

Definition at line 40 of file progressbar.py.

◆ format

◆ TIME_SENSITIVE

progressbar.Timer.TIME_SENSITIVE
static

Definition at line 41 of file progressbar.py.