72#define STDERR_FILENO 2
86 :
Timer(0, prefix, colourfulOutput)
156 Double_t leftTime = ( icounts <= 0 ? -1 :
171 std::clog <<
fLogger->GetPrintedSource();
172 std::clog <<
"Please wait ";
175 std::clog <<
"." << std::flush;
184 std::clog <<
fLogger->GetPrintedSource();
194 std::clog <<
"\r" << std::flush;
208 if (icounts < 0 ) icounts = 0;
218 std::clog <<
Int_t((100*(icounts+1))/
Float_t(
fNcounts)) <<
"%, time left: " << timeLeft << std::endl;
226 std::clog <<
fLogger->GetPrintedSource();
228 else std::clog <<
"[";
231 else std::clog <<
">";
235 else std::clog <<
".";
238 else std::clog <<
"]" ;
251 <<
", " <<
"time left: " << timeLeft <<
") ";
254 std::clog <<
"[" << comment <<
"] ";
256 std::clog <<
"\r" << std::flush;
266 else if (seconds < 0 ) out =
"unknown";
269 if (seconds > 3600) {
274 seconds =
Int_t(seconds)%3600;
ostringstream derivative to redirect and format output
Timing information for training and evaluation of MVA methods.
TString fPrefix
prefix for outputs
Bool_t fColourfulOutput
flag for use of colors
Double_t ElapsedSeconds(void)
computes elapsed tim in seconds
TString fPreviousTimeEstimate
static const Int_t fgNbins
number of bins in progress bar
void DrawProgressBar(void)
draws the progressbar
TString SecToText(Double_t, Bool_t) const
pretty string output
TString GetLeftTime(Int_t icounts)
returns pretty string with time left
MsgLogger * fLogger
! the output logger
Timer(const char *prefix="", Bool_t colourfulOutput=kTRUE)
constructor
void Reset(void)
resets timer
virtual ~Timer(void)
destructor
Int_t fProgressBarStringLength
static const TString fgClassName
used for output
Int_t fNcounts
reference number of "counts"
TString GetElapsedTime(Bool_t Scientific=kTRUE)
returns pretty string with elapsed time
void DrawProgressBar(Int_t, const TString &comment="")
draws progress bar in color or B&W caution:
Double_t RealTime()
Stop the stopwatch (if it is running) and return the realtime (in seconds) passed between the start a...
void Start(Bool_t reset=kTRUE)
Start the stopwatch.
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.