10 TStopwatch *StiTimer::fgFindTimer=0;
11 int StiTimer::fgFindTally=0;
12 TList *StiTimer::fgList=0;
24 void StiTimer::Init(
const char *name,TStopwatch *&sw,
int &tally)
26 if (!fgList) {fgList=
new TList; fgList->SetOwner();}
30 sw =
new TStopwatch();
40 void StiTimer::Clear(
const char *)
42 delete fgList; fgList=0;
46 void StiTimer::Print(
const char *option)
49 LOG_DEBUG << Form(
"**** StiTimer::Print ****")<<endm;
50 TListIter next(fgList);
55 int tally = mh->fTally[0];
56 if (tally<=0)
continue;
58 double cpu = mh->fSW->CpuTime()/tally;
59 double rte = mh->fSW->RealTime()/tally;
61 LOG_DEBUG << Form(
"StiTimer for <%s> Evts =%d CPU/Evts = %g Time/Evts = %g"
62 ,mh->GetName(),tally,cpu,rte) << endm;