| # Gaudi Framework, version v23r0 |

Home |  | Generated: Mon Jan 30 2012

Public Member Functions | Private Types | Private Attributes

# 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.

          : m_map     ()
          , m_message ( msg )
        {};

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

Definition at line 70 of file GaudiTool.cpp.

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

## Member Function Documentation

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

Definition at line 76 of file GaudiTool.cpp.

    { return   m_map[object] ; }

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

Definition at line 74 of file GaudiTool.cpp.

    { return --m_map[object] ; }

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

Definition at line 72 of file GaudiTool.cpp.

    { return ++m_map[object] ; }

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

Definition at line 78 of file GaudiTool.cpp.

        {
          for ( Map::const_iterator entry = m_map.begin() ;
                m_map.end() != entry ; ++entry )
          {
            if( 0 == entry->second ) { continue ; }
            std::cout << "GaudiTool       WARNING  "          << m_message
                      << "'" << entry->first << "' Counts = " << entry->second
                      << std::endl ;
          }
        };

## 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_v23r0/GaudiAlg/src/lib/GaudiTool.cpp

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines