![]() |
DD4hep
1.33.0
Detector Description Toolkit for High Energy Physics
|
Helper to support object counting when debugging memory leaks. More...
#include <InstanceCount.h>
Classes | |
| class | Counter |
| Internal class to could object constructions and destructions. More... | |
Public Types | |
| enum | { NONE = 1 << 0, STRING = 1 << 1, TYPEINFO = 1 << 2, ALL = STRING | TYPEINFO } |
| Enumeration to steer the output. More... | |
| typedef long long int | counter_t |
Public Member Functions | |
| InstanceCount () | |
| Standard Constructor - No need to call explicitly. More... | |
| virtual | ~InstanceCount () |
| Standard Destructor - No need to call explicitly. More... | |
Static Public Member Functions | |
| static Counter * | getCounter (const std::type_info &typ) |
| Access counter object for local caching on optimizations. More... | |
| static Counter * | getCounter (const std::string &typ) |
| Access counter object for local caching on optimizations. More... | |
| template<class T > | |
| static void | increment (T *) |
| Increment count according to type information. More... | |
| template<class T > | |
| static void | decrement (T *) |
| Decrement count according to type information. More... | |
| template<class T > | |
| static counter_t | get (T *) |
| Access current counter. More... | |
| static void | increment (const std::type_info &typ) |
| Increment count according to type information. More... | |
| static void | decrement (const std::type_info &typ) |
| Decrement count according to type information. More... | |
| static counter_t | get (const std::type_info &typ) |
| Access current counter. More... | |
| static void | increment (const std::string &typ) |
| Increment count according to string information. More... | |
| static void | decrement (const std::string &typ) |
| Decrement count according to string information. More... | |
| static counter_t | get (const std::string &typ) |
| Access current counter. More... | |
| static void | dump (int which=ALL) |
| Dump list of instance counters. More... | |
| static void | clear (int which=ALL) |
| Clear list of instance counters. More... | |
| static bool | doTrace () |
| Check if tracing is enabled. More... | |
| static void | doTracing (bool value) |
| Enable/Disable tracing. More... | |
Helper to support object counting when debugging memory leaks.
Small class to enable object construction/destruction tracing
Definition at line 31 of file InstanceCount.h.
| typedef long long int dd4hep::InstanceCount::counter_t |
Definition at line 33 of file InstanceCount.h.
| anonymous enum |
Enumeration to steer the output.
| Enumerator | |
|---|---|
| NONE | |
| STRING | |
| TYPEINFO | |
| ALL | |
Definition at line 35 of file InstanceCount.h.
| InstanceCount::InstanceCount | ( | ) |
Standard Constructor - No need to call explicitly.
Standard Constructor.
Definition at line 64 of file InstanceCount.cpp.
|
virtual |
Standard Destructor - No need to call explicitly.
Standard destructor.
Definition at line 69 of file InstanceCount.cpp.
|
static |
Clear list of instance counters.
|
static |
Decrement count according to string information.
Definition at line 119 of file InstanceCount.cpp.
|
static |
Decrement count according to type information.
Definition at line 139 of file InstanceCount.cpp.
|
inlinestatic |
Decrement count according to type information.
Definition at line 102 of file InstanceCount.h.
|
static |
Check if tracing is enabled.
Definition at line 85 of file InstanceCount.cpp.
|
static |
Enable/Disable tracing.
Definition at line 90 of file InstanceCount.cpp.
|
static |
Dump list of instance counters.
Force dump of counter.
Definition at line 149 of file InstanceCount.cpp.
|
inlinestatic |
Access current counter.
Definition at line 122 of file InstanceCount.h.
|
inlinestatic |
Access current counter.
Definition at line 114 of file InstanceCount.h.
|
inlinestatic |
Access current counter.
Definition at line 106 of file InstanceCount.h.
|
static |
Access counter object for local caching on optimizations.
Definition at line 101 of file InstanceCount.cpp.
|
static |
Access counter object for local caching on optimizations.
Definition at line 95 of file InstanceCount.cpp.
|
static |
Increment count according to string information.
Definition at line 109 of file InstanceCount.cpp.
|
static |
Increment count according to type information.
Definition at line 129 of file InstanceCount.cpp.
|
inlinestatic |
Increment count according to type information.
Definition at line 98 of file InstanceCount.h.
1.8.18