GammaWare  Head Version for release 0.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
XtermProgressBar.cpp
Go to the documentation of this file.
1 
2 
3 #ifndef GW_XTERMPROGRESSBAR_H
4 #include "XtermProgressBar.h"
5 #endif
6 
7 #include <iostream>
8 #include <fstream>
9 
10 using namespace Gw;
11 using namespace std;
12 
13 XtermProgressBar::XtermProgressBar(Double_t min, Double_t max) : fMaxSize(80), fCurrentSize(0), fMin(min), fMax(max), fCurrent(min)
14 {
15 
16 }
17 
19 {
20 
21 }
22 
24 {
25  fCurrent = fMin; fCurrentSize = 0;
26  cout << endl << "[";
27  for(UInt_t i = 0; i < fMaxSize; i++) { cout << " "; }
28  cout << "]" << "\r";
29 
30  cout.flush();
31 }
32 
34 {
35  cout << "[";
36  for(UInt_t i = 0; i < fCurrentSize; i++) { cout << "-"; }
37  for(UInt_t i = fCurrentSize+1; i < fMaxSize; i++) { cout << " "; }
38  cout << "]" << "\r";
39 
40  cout.flush();
41 }
42 
virtual void UpdateCurrentStatus()
Display current status on the standard output.
ADF::LogMessage & endl(ADF::LogMessage &log)
virtual void Start()
Re-initialised the counters.
XtermProgressBar(Double_t min, Double_t max)
Defines a ProgressBar that counts events from min to max.