| # Gaudi Framework, version v21r10p1 |

Home |  | Generated: 29 Jul 2010

# GaudiToolLocal::Counter Class Reference

simple local counter More...

Collaboration diagram for GaudiToolLocal::Counter:

[legend]

List of all members.

## Public Member Functions
| Counter (const std::string &msg=" Misbalance ")
| ~Counter ()
long | increment (const std::string &object)
long | decrement (const std::string &object)
long | counts (const std::string &object)
void | report () const
## Private Types
typedef std::map< std::string, long > | Map
## Private Attributes
Map | m_map
std::string | m_message

## Detailed Description

simple local counter

Definition at line 61 of file GaudiTool.cpp.

## Member Typedef Documentation

typedef std::map<std::string,long> GaudiToolLocal::Counter::Map`[private]`

Definition at line 88 of file GaudiTool.cpp.

## Constructor & Destructor Documentation

GaudiToolLocal::Counter::Counter | ( | const std::string & | msg = `" Misbalance "` | ) | `[inline]`

Definition at line 65 of file GaudiTool.cpp.

    00066       : m_map     ()
    00067       , m_message ( msg )
    00068     {};

GaudiToolLocal::Counter::~Counter | ( |  | ) | `[inline]`

Definition at line 70 of file GaudiTool.cpp.

    00070 { report() ; m_map.clear() ;}

## Member Function Documentation

long GaudiToolLocal::Counter::increment | ( | const std::string & | object | ) | `[inline]`

Definition at line 72 of file GaudiTool.cpp.

    00072 { return ++m_map[object] ; }

long GaudiToolLocal::Counter::decrement | ( | const std::string & | object | ) | `[inline]`

Definition at line 74 of file GaudiTool.cpp.

    00074 { return --m_map[object] ; }

long GaudiToolLocal::Counter::counts | ( | const std::string & | object | ) | `[inline]`

Definition at line 76 of file GaudiTool.cpp.

    00076 { return   m_map[object] ; }

void GaudiToolLocal::Counter::report | ( |  | ) | const`[inline]`

Definition at line 78 of file GaudiTool.cpp.

    00079     {
    00080       for ( Map::const_iterator entry = m_map.begin() ;
    00081             m_map.end() != entry ; ++entry )
    00082       {
    00083         if( 0 == entry->second ) { continue ; }
    00084         std::cout << "GaudiTool       WARNING  "          << m_message
    00085                   << "'" << entry->first << "' Counts = " << entry->second
    00086                   << std::endl ;
    00087       }
    00088     };

## Member Data Documentation

Map GaudiToolLocal::Counter::m_map`[private]`

Definition at line 92 of file GaudiTool.cpp.

std::string GaudiToolLocal::Counter::m_message`[private]`

Definition at line 93 of file GaudiTool.cpp.

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

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v21r10p1/GaudiAlg/src/lib/GaudiTool.cpp