| The Gaudi Framework v28r2-patches (bc4ad17a)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Private Types | Private Attributes | List of all members
GaudiToolLocal::Counter Class Referencefinal

simple local counter More...

Collaboration diagram for GaudiToolLocal::Counter:
[legend]

## Public Member Functions
| Counter (std::string msg=" Misbalance ")
| ~Counter ()
long | increment (const std::string &object)
| make the increment More...
long | decrement (const std::string &object)
| make the decrement More...
long | counts (const std::string &object)
| current count More...
void | report () const
| make a report More...

## 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 60 of file GaudiTool.cpp.

## Member Typedef Documentation

typedef std::map<std::string,long> GaudiToolLocal::Counter::Map
| private

Definition at line 97 of file GaudiTool.cpp.

## Constructor & Destructor Documentation

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

Definition at line 65 of file GaudiTool.cpp.

66 : m_message ( std::move(msg) )
67 {};
GaudiToolLocal::Counter::m_message
std::string m_message
Definition: GaudiTool.cpp:99
std::move
T move(T...args)

GaudiToolLocal::Counter::~Counter | ( |  | ) |
| inline

Definition at line 69 of file GaudiTool.cpp.

69 { report(); }
GaudiToolLocal::Counter::report
void report() const
make a report
Definition: GaudiTool.cpp:80

## Member Function Documentation

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

current count

Definition at line 78 of file GaudiTool.cpp.

78 { return m_map[object] ; }
GaudiToolLocal::Counter::m_map
Map m_map
Definition: GaudiTool.cpp:98

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

make the decrement

Definition at line 76 of file GaudiTool.cpp.

76 { return --m_map[object] ; }
GaudiToolLocal::Counter::m_map
Map m_map
Definition: GaudiTool.cpp:98

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

make the increment

Definition at line 74 of file GaudiTool.cpp.

74 { return ++m_map[object] ; }
GaudiToolLocal::Counter::m_map
Map m_map
Definition: GaudiTool.cpp:98

void GaudiToolLocal::Counter::report | ( |  | ) | const
| inline

make a report

keep the silence?

Definition at line 80 of file GaudiTool.cpp.

81 {
83 if ( !GaudiTool::summaryEnabled() ) { return ; } // RETURN
84 //
85 for ( const auto& entry : m_map )
86 {
87 if( entry.second ) {
88 std::cout << "GaudiTool WARNING " << m_message
89 << "'" << entry.first << "' Counts = " << entry.second
90 << std::endl ;
91 }
92 }
93 }
std::endl
T endl(T...args)
GaudiToolLocal::Counter::m_map
Map m_map
Definition: GaudiTool.cpp:98
GaudiToolLocal::Counter::m_message
std::string m_message
Definition: GaudiTool.cpp:99
std::cout
GaudiTool::summaryEnabled
static bool summaryEnabled()
is summary enabled?
Definition: GaudiTool.cpp:133

## Member Data Documentation

Map GaudiToolLocal::Counter::m_map
| private

Definition at line 98 of file GaudiTool.cpp.

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

Definition at line 99 of file GaudiTool.cpp.

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

- GaudiAlg/src/lib/GaudiTool.cpp