56 #ifndef ROOT_TMVA_Config 59 #ifndef ROOT_TMVA_Tools 62 #ifndef ROOT_TMVA_MsgLogger 66 const TString TMVA::Timer::fgClassName =
"Timer";
76 fPrefix ( strcmp(prefix,"")==0?
Timer::fgClassName:
TString(prefix) ),
77 fColourfulOutput( colourfulOutput ),
90 : fNcounts ( ncounts ),
91 fPrefix ( strcmp(prefix,
"")==0?
Timer::fgClassName:
TString(prefix) ),
92 fColourfulOutput( colourfulOutput ),
142 Double_t leftTime = ( icounts <= 0 ? -1 :
157 std::clog <<
"Please wait ";
160 std::clog <<
"." << std::flush;
176 std::clog <<
"\r" << std::flush;
189 if (icounts < 0 ) icounts = 0;
194 else std::clog <<
"[";
195 for (
Int_t i=0; i<ic; i++) {
197 else std::clog <<
">";
201 else std::clog <<
".";
204 else std::clog <<
"]" ;
217 <<
", " <<
"time left: " << this->
GetLeftTime( icounts ) <<
") ";
220 std::clog <<
"[" << comment <<
"] ";
222 std::clog <<
"\r" << std::flush;
231 if (Scientific ) out =
Form(
"%.3g sec", seconds );
232 else if (seconds < 0 ) out =
"unknown";
233 else if (seconds <= 300) out =
Form(
"%i sec",
Int_t(seconds) );
235 if (seconds > 3600) {
237 if (h <= 1) out =
Form(
"%i hr : ", h );
238 else out =
Form(
"%i hrs : ", h );
240 seconds =
Int_t(seconds)%3600;
243 if (m <= 1) out +=
Form(
"%i min", m );
244 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 DrawProgressBar(void)
draws the progressbar
TString GetLeftTime(Int_t icounts)
returns pretty string with time left
void Reset(void)
resets timer
virtual ~Timer(void)
destructor
std::vector< std::vector< double > > Data
TString GetElapsedTime(Bool_t Scientific=kTRUE)
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,...)
void Reset(Detail::TBranchProxy *x)
Abstract ClassifierFactory template that handles arbitrary types.
TString SecToText(Double_t, Bool_t) const
pretty string output