#include <ProfilingTools.h>
Public Member Functions | |
void | add (double increment=1.0) |
double | get () const |
PerfCounter () | |
Static Public Member Functions | |
static void | add (const char *name, double increment=1.0) |
static void | enable () |
static PerfCounter & | get (const char *name) |
static void | printAll () |
Private Attributes | |
double | value_ |
Definition at line 8 of file ProfilingTools.h.
PerfCounter::PerfCounter | ( | ) | [inline] |
Definition at line 10 of file ProfilingTools.h.
: value_(0) {}
void PerfCounter::add | ( | double | increment = 1.0 | ) | [inline] |
static void PerfCounter::add | ( | const char * | name, |
double | increment = 1.0 |
||
) | [inline, static] |
Definition at line 16 of file ProfilingTools.h.
References get().
{ PerfCounter::get(name).add(increment); }
static void PerfCounter::enable | ( | ) | [static] |
PerfCounter & PerfCounter::get | ( | const char * | name | ) | [static] |
Definition at line 40 of file ProfilingTools.cc.
References mergeVDriftHistosByStation::name, and perfCounters_.
{ return perfCounters_[name]; }
double PerfCounter::get | ( | void | ) | const [inline] |
Definition at line 14 of file ProfilingTools.h.
References value_.
Referenced by add().
{ return value_; }
void PerfCounter::printAll | ( | ) | [static] |
Definition at line 45 of file ProfilingTools.cc.
References perfCounters_.
{ for (boost::unordered_map<const char *, PerfCounter>::const_iterator it = perfCounters_.begin(), ed = perfCounters_.end(); it != ed; ++it) { fprintf(stderr, "%-40s: %g\n", it->first, it->second.get()); } }
double PerfCounter::value_ [private] |
Definition at line 20 of file ProfilingTools.h.