The Gaudi Framework  master (37c0b60a)
IgHookTrace::CounterValue Class Reference

Value for a counter chained from a trace. More...

#include </builds/gaudi/Gaudi/GaudiProfiling/src/component/IgHook_IgHookTrace.h>

Collaboration diagram for IgHookTrace::CounterValue:

Public Member Functions

void * operator new (size_t n, IgHookTraceAlloc *alloc=0)
 
 CounterValue (Counter *counter, CounterValue *next=0, unsigned long long value=0)
 
Countercounter (void)
 
CounterValuenext (void)
 
unsigned long long count (void)
 
unsigned long long value (void)
 
unsigned long long tick (void)
 
unsigned long long untick (void)
 
unsigned long long add (unsigned long long value)
 
unsigned long long add (CounterValue &x)
 
unsigned long long sub (unsigned long long value)
 
unsigned long long sub (CounterValue &x)
 
unsigned long long max (unsigned long long value)
 
unsigned long long max (CounterValue &x)
 

Private Attributes

Counterm_counter
 
CounterValuem_next
 
unsigned long long m_value
 
unsigned long long m_count
 

Detailed Description

Value for a counter chained from a trace.


Definition at line 45 of file IgHook_IgHookTrace.h.

Constructor & Destructor Documentation

◆ CounterValue()

IgHookTrace::CounterValue::CounterValue ( Counter counter,
CounterValue next = 0,
unsigned long long  value = 0 
)

Definition at line 143 of file IgHook_IgHookTrace.cpp.

145  : m_counter( counter ), m_next( next ), m_value( value ), m_count( 0 ) {}

Member Function Documentation

◆ add() [1/2]

unsigned long long IgHookTrace::CounterValue::add ( CounterValue x)

Definition at line 181 of file IgHook_IgHookTrace.cpp.

181  {
182  m_count += x.m_count;
183  m_value += x.m_value;
184  return m_value;
185 }

◆ add() [2/2]

unsigned long long IgHookTrace::CounterValue::add ( unsigned long long  value)

Definition at line 165 of file IgHook_IgHookTrace.cpp.

165  {
166  ++m_count;
167  return m_value += value;
168 }

◆ count()

unsigned long long IgHookTrace::CounterValue::count ( void  )

Definition at line 153 of file IgHook_IgHookTrace.cpp.

153 { return m_count; }

◆ counter()

IgHookTrace::Counter * IgHookTrace::CounterValue::counter ( void  )

Definition at line 147 of file IgHook_IgHookTrace.cpp.

147 { return m_counter; }

◆ max() [1/2]

unsigned long long IgHookTrace::CounterValue::max ( CounterValue x)

Definition at line 193 of file IgHook_IgHookTrace.cpp.

193  {
194  m_count += x.m_count;
195  if ( m_value < x.m_value ) m_value = x.m_value;
196  return m_value;
197 }

◆ max() [2/2]

unsigned long long IgHookTrace::CounterValue::max ( unsigned long long  value)

Definition at line 175 of file IgHook_IgHookTrace.cpp.

175  {
176  ++m_count;
177  if ( m_value < value ) m_value = value;
178  return m_value;
179 }

◆ next()

IgHookTrace::CounterValue * IgHookTrace::CounterValue::next ( void  )

Definition at line 149 of file IgHook_IgHookTrace.cpp.

149 { return m_next; }

◆ operator new()

void * IgHookTrace::CounterValue::operator new ( size_t  n,
IgHookTraceAlloc alloc = 0 
)

Definition at line 139 of file IgHook_IgHookTrace.cpp.

139  {
140  return alloc ? alloc->allocate( n ) : ::operator new( n );
141 }

◆ sub() [1/2]

unsigned long long IgHookTrace::CounterValue::sub ( CounterValue x)

Definition at line 187 of file IgHook_IgHookTrace.cpp.

187  {
188  m_count -= x.m_count;
189  m_value -= x.m_value;
190  return m_value;
191 }

◆ sub() [2/2]

unsigned long long IgHookTrace::CounterValue::sub ( unsigned long long  value)

Definition at line 170 of file IgHook_IgHookTrace.cpp.

170  {
171  --m_count;
172  return m_value -= value;
173 }

◆ tick()

unsigned long long IgHookTrace::CounterValue::tick ( void  )

Definition at line 155 of file IgHook_IgHookTrace.cpp.

155  {
156  ++m_count;
157  return ++m_value;
158 }

◆ untick()

unsigned long long IgHookTrace::CounterValue::untick ( void  )

Definition at line 160 of file IgHook_IgHookTrace.cpp.

160  {
161  --m_count;
162  return --m_value;
163 }

◆ value()

unsigned long long IgHookTrace::CounterValue::value ( void  )

Definition at line 151 of file IgHook_IgHookTrace.cpp.

151 { return m_value; }

Member Data Documentation

◆ m_count

unsigned long long IgHookTrace::CounterValue::m_count
private

Definition at line 72 of file IgHook_IgHookTrace.h.

◆ m_counter

Counter* IgHookTrace::CounterValue::m_counter
private

Definition at line 69 of file IgHook_IgHookTrace.h.

◆ m_next

CounterValue* IgHookTrace::CounterValue::m_next
private

Definition at line 70 of file IgHook_IgHookTrace.h.

◆ m_value

unsigned long long IgHookTrace::CounterValue::m_value
private

Definition at line 71 of file IgHook_IgHookTrace.h.


The documentation for this class was generated from the following files:
IgHookTraceAlloc::allocate
void * allocate(size_t bytes)
Definition: IgHook_IgHookTrace.cpp:111
IgHookTrace::CounterValue::counter
Counter * counter(void)
Definition: IgHook_IgHookTrace.cpp:147
IgHookTrace::CounterValue::next
CounterValue * next(void)
Definition: IgHook_IgHookTrace.cpp:149
IgHookTrace::CounterValue::value
unsigned long long value(void)
Definition: IgHook_IgHookTrace.cpp:151
IgHookTrace::CounterValue::m_count
unsigned long long m_count
Definition: IgHook_IgHookTrace.h:72
IgHookTrace::CounterValue::m_counter
Counter * m_counter
Definition: IgHook_IgHookTrace.h:69
IgHookTrace::CounterValue::m_value
unsigned long long m_value
Definition: IgHook_IgHookTrace.h:71
cpluginsvc.n
n
Definition: cpluginsvc.py:234
IgHookTrace::CounterValue::m_next
CounterValue * m_next
Definition: IgHook_IgHookTrace.h:70