MsgStatistic Class Reference

#include <MsgStatistic.h>

List of all members.

Public Member Functions

 MsgStatistic ()
 ~MsgStatistic ()
int GetPrintCount (Msg::LogLevel_t lvl) const
void Clear ()
void LogPrint (Msg::LogLevel_t lvl)

Private Attributes

int fPrintCount [Msg::kNLogLevel]

Detailed Description

Definition at line 14 of file MsgStatistic.h.


Constructor & Destructor Documentation

MsgStatistic::MsgStatistic (  ) 

Definition at line 13 of file MsgStatistic.cxx.

References Clear().

00014 {
00015 //======================================================================
00016 // Purpose: Create and clear a set of message stream statistics
00017 //======================================================================
00018   this->Clear();
00019 }

MsgStatistic::~MsgStatistic (  ) 

Definition at line 23 of file MsgStatistic.cxx.

00024 {
00025 }


Member Function Documentation

void MsgStatistic::Clear ( void   ) 

Definition at line 46 of file MsgStatistic.cxx.

References fPrintCount, and Msg::kNLogLevel.

Referenced by MsgStatistic().

00047 {
00048 //======================================================================
00049 // Purpose: Reset the statistics to their initial state
00050 //======================================================================
00051   for (int i=0; i<Msg::kNLogLevel; ++i) {
00052     fPrintCount[i] = 0;
00053   }
00054 }

int MsgStatistic::GetPrintCount ( Msg::LogLevel_t  lvl  )  const

Definition at line 29 of file MsgStatistic.cxx.

References fPrintCount, Msg::kMinLogLevel, and Msg::kNLogLevel.

00030 {
00031 //======================================================================
00032 // Purpose: Return the number of times this message stream has been
00033 //          used to print messages of a certain priority
00034 //
00035 // Inputs: lvl - the priority level of messages you want the count for
00036 //
00037 // Returns: The number of times this message stream was used to print a
00038 //          message of priority "lvl"
00039 //======================================================================
00040   assert(lvl >= Msg::kMinLogLevel && lvl <= Msg::kNLogLevel);
00041   return fPrintCount[lvl];
00042 }

void MsgStatistic::LogPrint ( Msg::LogLevel_t  lvl  ) 

Definition at line 58 of file MsgStatistic.cxx.

References fPrintCount, Msg::kMinLogLevel, and Msg::kNLogLevel.

00059 {
00060 //======================================================================
00061 // Purpose: Log that a message of a certain priority has been printed
00062 //
00063 // Inputs: lvl - the priority level of the message printed
00064 //======================================================================
00065   assert(lvl >= Msg::kMinLogLevel && lvl <= Msg::kNLogLevel);
00066   ++fPrintCount[lvl];
00067 }


Member Data Documentation

Definition at line 26 of file MsgStatistic.h.

Referenced by Clear(), GetPrintCount(), and LogPrint().


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

Generated on 22 Nov 2017 for loon by  doxygen 1.6.1