72 fPrefix ( strcmp(prefix,"")==0?
Timer::fgClassName:
TString(prefix) ),
73 fColourfulOutput( colourfulOutput ),
74 fProgressBarStringLength (0),
87 : fNcounts ( ncounts ),
88 fPrefix ( strcmp(prefix,
"")==0?
Timer::fgClassName:
TString(prefix) ),
89 fColourfulOutput( colourfulOutput ),
90 fProgressBarStringLength (0),
140 Double_t leftTime = ( icounts <= 0 ? -1 :
156 std::clog <<
"Please wait ";
159 std::clog <<
"." << std::flush;
178 std::clog <<
"\r" << std::flush;
192 if (icounts < 0 ) icounts = 0;
197 else std::clog <<
"[";
198 for (
Int_t i=0; i<ic; i++) {
200 else std::clog <<
">";
204 else std::clog <<
".";
207 else std::clog <<
"]" ;
220 <<
", " <<
"time left: " << this->
GetLeftTime( icounts ) <<
") ";
223 std::clog <<
"[" << comment <<
"] ";
225 std::clog <<
"\r" << std::flush;
234 if (Scientific ) out =
Form(
"%.3g sec", seconds );
235 else if (seconds < 0 ) out =
"unknown";
236 else if (seconds <= 300) out =
Form(
"%i sec",
Int_t(seconds) );
238 if (seconds > 3600) {
240 if (h <= 1) out =
Form(
"%i hr : ", h );
241 else out =
Form(
"%i hrs : ", h );
243 seconds =
Int_t(seconds)%3600;
246 if (m <= 1) out +=
Form(
"%i min", m );
247 else out +=
Form(
"%i mins", m );
static const TString fgClassName
Double_t RealTime()
Stop the stopwatch (if it is running) and return the realtime (in seconds) passed between the start a...
TString SecToText(Double_t, Bool_t) const
pretty string output
virtual ~Timer(void)
destructor
TString GetElapsedTime(Bool_t Scientific=kTRUE)
Int_t fProgressBarStringLength
std::vector< std::vector< double > > Data
void Reset(void)
resets timer
std::string GetPrintedSource() const
the full logger prefix
char * Form(const char *fmt,...)
void Reset(Detail::TBranchProxy *x)
TString GetLeftTime(Int_t icounts)
returns pretty string with time left
Timer(const char *prefix="", Bool_t colourfulOutput=kTRUE)
constructor
Double_t ElapsedSeconds(void)
computes elapsed tim in seconds
static const Int_t fgNbins
Abstract ClassifierFactory template that handles arbitrary types.
void DrawProgressBar(void)
draws the progressbar