]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONLogger.h
In AliMUONTriggerQADataMakerRec:
[u/mrichter/AliRoot.git] / MUON / AliMUONLogger.h
CommitLineData
48beade4 1#ifndef ALIMUONLOGGER_H
2#define ALIMUONLOGGER_H
3
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5* See cxx source for full Copyright notice */
6
7// $Id$
8
cdf15cc5 9/// \ingroup core
48beade4 10/// \class AliMUONLogger
11/// \brief A logger that keeps track of the number of times a message appeared
12///
78649106 13// Author Laurent Aphecetche
48beade4 14
38b84fe8 15#include <Riostream.h>
16
48beade4 17#ifndef ROOT_TObject
18# include "TObject.h"
19#endif
20
38b84fe8 21#ifndef ROOT_TString
22# include "TString.h"
23#endif
24
48beade4 25class AliMUONStringIntMap;
26
27class AliMUONLogger : public TObject
28{
29public:
30 AliMUONLogger(Int_t maxNumberOfEntries=-1);
31 virtual ~AliMUONLogger();
32
38b84fe8 33 Int_t Log(const char* message);
34
35 void Print(Option_t* opt="") const;
36
37 void Print(TString& key, ofstream& out) const;
48beade4 38
cdf15cc5 39 void Clear(Option_t* /*option*/ ="");
40
38b84fe8 41 Bool_t Next(TString& msg, Int_t& occurance);
64c2397e 42
38b84fe8 43 void ResetItr();
48beade4 44
64c2397e 45 Int_t NumberOfEntries() const;
46
48beade4 47private:
71a2d3aa 48 /// Not implemented
48beade4 49 AliMUONLogger(const AliMUONLogger& rhs); // not implemented
71a2d3aa 50 /// Not implemented
48beade4 51 AliMUONLogger& operator=(const AliMUONLogger& rhs); // not implemented
52
53private:
54
55 Int_t fMaxNumberOfEntries; //!< after this number, print and reset
56 AliMUONStringIntMap* fLog; //!< map from message to number of times the message was issued
57
69d7ac2e 58 ClassDef(AliMUONLogger,1) // A logger that keeps track of the number of times a message appeared
48beade4 59};
60
61#endif