| The Gaudi Framework v32r1 (f65d50dc)

Public Member Functions | Private Attributes | List of all members
Tuples::Local::Counter Class Referencefinal
Collaboration diagram for Tuples::Local::Counter:
[legend]

## Public Member Functions
| Counter (std::string msg=" Misbalance ")
| ~Counter ()
long | increment (const std::string &object)
long | decrement (const std::string &object)
long | counts (const std::string &object) const
void | report () const

## Private Attributes
std::map< std::string, long > | m_map
std::string | m_message

## Detailed Description

Definition at line 176 of file TupleObj.cpp.

## Constructor & Destructor Documentation

## ◆ Counter()

Tuples::Local::Counter::Counter | ( | std::string | msg = `" Misbalance "` | ) |
| inline

Definition at line 179 of file TupleObj.cpp.

179 : m_message( std::move( msg ) ) {}
std::move
T move(T... args)
GaudiMP.FdsRegistry.msg
msg
Definition: FdsRegistry.py:8
Tuples::Local::Counter::m_message
std::string m_message
Definition: TupleObj.cpp:199

## ◆ ~Counter()

Tuples::Local::Counter::~Counter | ( |  | ) |
| inline

Definition at line 181 of file TupleObj.cpp.

181 { report(); }
Tuples::Local::Counter::report
void report() const
Definition: TupleObj.cpp:189

## Member Function Documentation

## ◆ counts()

long Tuples::Local::Counter::counts | ( | const std::string & | object | ) | const
| inline

Definition at line 187 of file TupleObj.cpp.

187 { return m_map.at( object ); }
std::map::at
T at(T... args)
Tuples::Local::Counter::m_map
std::map< std::string, long > m_map
Definition: TupleObj.cpp:195

## ◆ decrement()

long Tuples::Local::Counter::decrement | ( | const std::string & | object | ) |
| inline

Definition at line 185 of file TupleObj.cpp.

185 { return --m_map[object]; }
Tuples::Local::Counter::m_map
std::map< std::string, long > m_map
Definition: TupleObj.cpp:195

## ◆ increment()

long Tuples::Local::Counter::increment | ( | const std::string & | object | ) |
| inline

Definition at line 183 of file TupleObj.cpp.

183 { return ++m_map[object]; }
Tuples::Local::Counter::m_map
std::map< std::string, long > m_map
Definition: TupleObj.cpp:195

## ◆ report()

void Tuples::Local::Counter::report | ( |  | ) | const
| inline

Definition at line 189 of file TupleObj.cpp.

189 {
190 for ( auto& entry : m_map ) {
191 if ( entry.second != 0 )
192 std::cout << "Tuples::TupleObj WARNING " << m_message << "'" << entry.first << "' Counts = " << entry.second
193 << std::endl;
194 }
195 };
std::endl
T endl(T... args)
Tuples::Local::Counter::m_map
std::map< std::string, long > m_map
Definition: TupleObj.cpp:195
Tuples::Local::Counter::m_message
std::string m_message
Definition: TupleObj.cpp:199
std::cout

## Member Data Documentation

## ◆ m_map

std::map<std::string, long> Tuples::Local::Counter::m_map
| private

Definition at line 195 of file TupleObj.cpp.

## ◆ m_message

std::string Tuples::Local::Counter::m_message
| private

Definition at line 199 of file TupleObj.cpp.

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

- GaudiAlg/src/lib/TupleObj.cpp