Gaudi Framework, version v21r4

Home   Generated: 7 Sep 2009

GaudiToolLocal::Counter Class Reference

Collaboration diagram for GaudiToolLocal::Counter:

Collaboration graph
[legend]

List of all members.


Detailed Description

simple local counter

Definition at line 61 of file GaudiTool.cpp.


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

Member Typedef Documentation

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

Definition at line 92 of file GaudiTool.cpp.

Definition at line 93 of file GaudiTool.cpp.


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

Generated at Mon Sep 7 18:26:48 2009 for Gaudi Framework, version v21r4 by Doxygen version 1.5.6 written by Dimitri van Heesch, © 1997-2004