DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
Public Member Functions | Private Attributes | List of all members
dd4hep::InstanceCount::Counter Class Reference

Internal class to could object constructions and destructions. More...

#include <InstanceCount.h>

Public Member Functions

 Counter ()=default
 Default constructor. More...
 
 Counter (const Counter &c)=default
 Copy constructor. More...
 
 ~Counter ()=default
 Destructor. More...
 
void increment ()
 Increment counter. More...
 
void decrement ()
 Decrement counter. More...
 
counter_t value () const
 Access counter value. More...
 
counter_t total () const
 Access counter value. More...
 
counter_t maximum () const
 Access maximum counter value. More...
 

Private Attributes

counter_t m_count = 0
 Reference counter value. More...
 
counter_t m_tot = 0
 Increment counter value. More...
 
counter_t m_max = 0
 Maximum number of simultaneous instances. More...
 

Detailed Description

Internal class to could object constructions and destructions.

Small class to enable object construction/destruction tracing.

Author
M.Frank
Version
1.0

Definition at line 50 of file InstanceCount.h.

Constructor & Destructor Documentation

◆ Counter() [1/2]

dd4hep::InstanceCount::Counter::Counter ( )
default

Default constructor.

◆ Counter() [2/2]

dd4hep::InstanceCount::Counter::Counter ( const Counter c)
default

Copy constructor.

◆ ~Counter()

dd4hep::InstanceCount::Counter::~Counter ( )
default

Destructor.

Member Function Documentation

◆ decrement()

void dd4hep::InstanceCount::Counter::decrement ( )
inline

Decrement counter.

Definition at line 72 of file InstanceCount.h.

◆ increment()

void dd4hep::InstanceCount::Counter::increment ( )
inline

Increment counter.

Definition at line 66 of file InstanceCount.h.

◆ maximum()

counter_t dd4hep::InstanceCount::Counter::maximum ( ) const
inline

Access maximum counter value.

Definition at line 84 of file InstanceCount.h.

◆ total()

counter_t dd4hep::InstanceCount::Counter::total ( ) const
inline

Access counter value.

Definition at line 80 of file InstanceCount.h.

◆ value()

counter_t dd4hep::InstanceCount::Counter::value ( ) const
inline

Access counter value.

Definition at line 76 of file InstanceCount.h.

Member Data Documentation

◆ m_count

counter_t dd4hep::InstanceCount::Counter::m_count = 0
private

Reference counter value.

Definition at line 53 of file InstanceCount.h.

◆ m_max

counter_t dd4hep::InstanceCount::Counter::m_max = 0
private

Maximum number of simultaneous instances.

Definition at line 57 of file InstanceCount.h.

◆ m_tot

counter_t dd4hep::InstanceCount::Counter::m_tot = 0
private

Increment counter value.

Definition at line 55 of file InstanceCount.h.


The documentation for this class was generated from the following file: