74 :
Timer(0, prefix, colourfulOutput)
144 Double_t leftTime = ( icounts <= 0 ? -1 :
160 std::clog <<
"Please wait ";
163 std::clog <<
"." << std::flush;
182 std::clog <<
"\r" << std::flush;
196 if (icounts < 0 ) icounts = 0;
206 std::clog <<
Int_t((100*(icounts+1))/
Float_t(
fNcounts)) <<
"%, time left: " << timeLeft << std::endl;
216 else std::clog <<
"[";
217 for (
Int_t i=0; i<ic; i++) {
219 else std::clog <<
">";
223 else std::clog <<
".";
226 else std::clog <<
"]" ;
239 <<
", " <<
"time left: " << timeLeft <<
") ";
242 std::clog <<
"[" << comment <<
"] ";
244 std::clog <<
"\r" << std::flush;
253 if (Scientific ) out =
Form(
"%.3g sec", seconds );
254 else if (seconds < 0 ) out =
"unknown";
255 else if (seconds <= 300) out =
Form(
"%i sec",
Int_t(seconds) );
257 if (seconds > 3600) {
259 if (h <= 1) out =
Form(
"%i hr : ", h );
260 else out =
Form(
"%i hrs : ", h );
262 seconds =
Int_t(seconds)%3600;
265 if (m <= 1) out +=
Form(
"%i min", m );
266 else out +=
Form(
"%i mins", m );
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.
void DrawProgressBar(void)
draws the progressbar
TString fPreviousTimeEstimate
TString GetLeftTime(Int_t icounts)
returns pretty string with time left
void Reset(void)
resets timer
Int_t fProgressBarStringLength
virtual ~Timer(void)
destructor
void Clear()
Clear string without changing its capacity.
TString GetElapsedTime(Bool_t Scientific=kTRUE)
returns pretty string with elapsed time
std::string GetPrintedSource() const
the full logger prefix
static const Int_t fgNbins
Timer(const char *prefix="", Bool_t colourfulOutput=kTRUE)
constructor
Double_t ElapsedSeconds(void)
computes elapsed tim in seconds
char * Form(const char *fmt,...)
ostringstream derivative to redirect and format output
static const TString fgClassName
TString SecToText(Double_t, Bool_t) const
pretty string output
Timing information for training and evaluation of MVA methods.
const char * Data() const