AliRoot Core  v5-06-30 (35d6c57)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliMUONLogger Class Reference

A logger that keeps track of the number of times a message appeared. More...

#include <AliMUONLogger.h>

Inheritance diagram for AliMUONLogger:

Public Member Functions

 AliMUONLogger (Int_t maxNumberOfEntries=-1, const char *name="AliMUONLogger")
 
virtual ~AliMUONLogger ()
 
Int_t Log (const char *message)
 
void Print (Option_t *opt="") const
 
void Print (TString &key, ofstream &out) const
 
void Clear (Option_t *="")
 
Bool_t Next (TString &msg, Int_t &occurance)
 
void ResetItr ()
 
Int_t NumberOfEntries () const
 
Long64_t Merge (TCollection *list)
 
const char * GetName () const
 
ULong_t Hash () const
 

Private Member Functions

 AliMUONLogger (const AliMUONLogger &rhs)
 Not implemented. More...
 
AliMUONLoggeroperator= (const AliMUONLogger &rhs)
 Not implemented. More...
 

Private Attributes

Int_t fMaxNumberOfEntries
 ! after this number, print and reset More...
 
AliMUONStringIntMapfLog
 ! map from message to number of times the message was issued More...
 
TString fName
 ! object name More...
 

Detailed Description

A logger that keeps track of the number of times a message appeared.

A logger that keeps track of the number of times a message appeared.

Typically used to print all messages to screen at once, e.g. in the dtor of a worker class.

For instance, it is used in AliMUONDigitizerV3, to note which channels are disabled, and this information is printed in a condensed form only once when DigitizerV3 is destroyed.

Author
Laurent Aphecetche

Definition at line 29 of file AliMUONLogger.h.

Constructor & Destructor Documentation

AliMUONLogger::AliMUONLogger ( Int_t  maxNumberOfEntries = -1,
const char *  name = "AliMUONLogger" 
)

ctor. After maxNumberOfEntries, the log is printed and reset

Definition at line 46 of file AliMUONLogger.cxx.

AliMUONLogger::~AliMUONLogger ( )
virtual

dtor

Definition at line 56 of file AliMUONLogger.cxx.

AliMUONLogger::AliMUONLogger ( const AliMUONLogger rhs)
private

Not implemented.

Member Function Documentation

void AliMUONLogger::Clear ( Option_t *  = "")
const char* AliMUONLogger::GetName ( ) const
inline

Definition at line 51 of file AliMUONLogger.h.

ULong_t AliMUONLogger::Hash ( ) const
inline

Definition at line 53 of file AliMUONLogger.h.

Long64_t AliMUONLogger::Merge ( TCollection *  list)

Merge method

Definition at line 144 of file AliMUONLogger.cxx.

Bool_t AliMUONLogger::Next ( TString &  msg,
Int_t &  occurance 
)
Int_t AliMUONLogger::NumberOfEntries ( ) const

Get the number of logs we have so far

Definition at line 137 of file AliMUONLogger.cxx.

Referenced by AliMUONTrackerQADataMakerRec::~AliMUONTrackerQADataMakerRec().

AliMUONLogger& AliMUONLogger::operator= ( const AliMUONLogger rhs)
private

Not implemented.

void AliMUONLogger::Print ( Option_t *  opt = "") const
void AliMUONLogger::Print ( TString &  key,
ofstream &  out 
) const

print out into a given streamer with a key word in front of the message

Definition at line 109 of file AliMUONLogger.cxx.

void AliMUONLogger::ResetItr ( )

Member Data Documentation

AliMUONStringIntMap* AliMUONLogger::fLog
private

! map from message to number of times the message was issued

Definition at line 64 of file AliMUONLogger.h.

Referenced by Clear(), Log(), Next(), NumberOfEntries(), Print(), ResetItr(), and ~AliMUONLogger().

Int_t AliMUONLogger::fMaxNumberOfEntries
private

! after this number, print and reset

Definition at line 63 of file AliMUONLogger.h.

Referenced by Log().

TString AliMUONLogger::fName
private

! object name

Definition at line 65 of file AliMUONLogger.h.

Referenced by GetName(), and Hash().


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