4#include "KVClassMonitor.h"
33 while ((cl = (
TClass*) next())) {
34 Int_t n = cl->GetInstanceCount();
53 while ((cl = (
TClass*) next())) {
54 Int_t n = cl->GetInstanceCount();
106 Info(
"Check",
"Checking class instance statistics");
111 while ((cl = (
TClass*) next())) {
112 Int_t n = cl->GetInstanceCount();
115 if (
n > old)
Warning(
"Check",
"%s +%d (%d --> %d)", cl->GetName(),
n - old, old,
n);
116 else Warning(
"Check",
"%s -%d (%d --> %d)", cl->GetName(), old -
n, old,
n);
133 Info(
"CompareToInit",
"Checking class instance statistics");
137 while ((cl = (
TClass*) next())) {
138 Int_t n = cl->GetInstanceCount();
141 if (
n > old)
Warning(
"CompareToInit",
"%s +%d (%d --> %d)", cl->GetName(),
n - old, old,
n);
142 else Warning(
"CompareToInit",
"%s -%d (%d --> %d)", cl->GetName(), old -
n, old,
n);
R__EXTERN TObjectTable * gObjectTable
Simple tool to track which classes instance count increases over time.
static KVClassMonitor * GetInstance()
Return pointer to unique instance of class monitor class.
std::map< std::string, int > fChanges
list of classes whose number changed in last Check()
std::map< std::string, int > & GetListOfChanges() const
TEnv fClassStats
store class instance statistics
TEnv fClassStatsInit
intitial class instance statistics
static Bool_t fDisableCheck
disable static DoCheck() method
virtual ~KVClassMonitor()
Destructor.
static KVClassMonitor * fgClassMonitor
singleton
virtual const char * GetValue(const char *name, const char *dflt) const
virtual void SetValue(const char *name, const char *value, EEnvLevel level=kEnvChange, const char *type=nullptr)
void UpdateInstCount() const
virtual void Warning(const char *method, const char *msgfmt,...) const
virtual void Info(const char *method, const char *msgfmt,...) const