Gaudi Framework, version v23r7

Home   Generated: Wed Mar 20 2013
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Private Types | Private Attributes | List of all members
GaudiToolLocal::Counter Class Reference

simple local counter More...

Collaboration diagram for GaudiToolLocal::Counter:
Collaboration graph
[legend]

Public Member Functions

 Counter (const std::string &msg=" Misbalance ")
 
 ~Counter ()
 
long increment (const std::string &object)
 make the increment
 
long decrement (const std::string &object)
 make the decrement
 
long counts (const std::string &object)
 current count
 
void report () const
 make a report
 

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

Definition at line 99 of file GaudiTool.cpp.

Constructor & Destructor Documentation

GaudiToolLocal::Counter::Counter ( const std::string msg = " Misbalance ")
inline

Definition at line 66 of file GaudiTool.cpp.

: m_map ()
, m_message ( msg )
{};
GaudiToolLocal::Counter::~Counter ( )
inline

Definition at line 71 of file GaudiTool.cpp.

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

Member Function Documentation

long GaudiToolLocal::Counter::counts ( const std::string object)
inline

current count

Definition at line 80 of file GaudiTool.cpp.

{ return m_map[object] ; }
long GaudiToolLocal::Counter::decrement ( const std::string object)
inline

make the decrement

Definition at line 78 of file GaudiTool.cpp.

{ return --m_map[object] ; }
long GaudiToolLocal::Counter::increment ( const std::string object)
inline

make the increment

Definition at line 76 of file GaudiTool.cpp.

{ return ++m_map[object] ; }
void GaudiToolLocal::Counter::report ( ) const
inline

make a report

keep the silence?

Definition at line 82 of file GaudiTool.cpp.

{
if ( !GaudiTool::summaryEnabled() ) { return ; } // RETURN
//
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 100 of file GaudiTool.cpp.

std::string GaudiToolLocal::Counter::m_message
private

Definition at line 101 of file GaudiTool.cpp.


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

Generated at Wed Mar 20 2013 17:59:51 for Gaudi Framework, version v23r7 by Doxygen version 1.8.2 written by Dimitri van Heesch, © 1997-2004