ProgressBar.h
1 /* -*- C++ -*-.***************************************************************************************************
2  Author: Ben Strutt
3  Email: b.strutt.12@ucl.ac.uk
4 
5  Description:
6  Just a bit of fun while waiting for jobs to run.
7 *************************************************************************************************************** */
8 
9 
10 
11 #ifndef PROGRESSBAR_H
12 #define PROGRESSBAR_H
13 
14 #include "TObject.h"
15 #include "TStopwatch.h"
16 #include <iostream>
17 
18 
23 
24 public:
25  ProgressBar();
26  ProgressBar(Long64_t maxEntry);
27 
28  void operator++(int);
29  void status();
30 
31 private:
32  Long64_t maxEntry;
33  Long64_t counter;
34  UInt_t percentage;
35  TStopwatch watch;
36 
37 };
38 
39 
40 #endif //PROGRESSBAR_H
Prints a progress bar and timer to stderr.
Definition: ProgressBar.h:22
ProgressBar()
Default constructor - don&#39;t use this.
Definition: ProgressBar.cxx:19
void operator++(int)
Increment operator, use when you have completed one iteration of the main loop.
Definition: ProgressBar.cxx:53
void status()
For debugging, prints state of internal variables.