AliRoot Core  v5-06-15 (45dab64)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliMUONLogger.h
Go to the documentation of this file.
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 
13 // Author Laurent Aphecetche
14 
15 #include <Riostream.h>
16 
17 #ifndef ROOT_TObject
18 # include "TObject.h"
19 #endif
20 
21 #ifndef ROOT_TString
22 # include "TString.h"
23 #endif
24 
26 
27 using std::ofstream;
28 
29 class AliMUONLogger : public TObject
30 {
31 public:
32  AliMUONLogger(Int_t maxNumberOfEntries=-1, const char* name="AliMUONLogger");
33  virtual ~AliMUONLogger();
34 
35  Int_t Log(const char* message);
36 
37  void Print(Option_t* opt="") const;
38 
39  void Print(TString& key, ofstream& out) const;
40 
41  void Clear(Option_t* /*option*/ ="");
42 
43  Bool_t Next(TString& msg, Int_t& occurance);
44 
45  void ResetItr();
46 
47  Int_t NumberOfEntries() const;
48 
49  Long64_t Merge(TCollection* list);
50 
51  const char* GetName() const { return fName.Data(); }
52 
53  ULong_t Hash() const { return fName.Hash(); }
54 
55 private:
57  AliMUONLogger(const AliMUONLogger& rhs); // not implemented
59  AliMUONLogger& operator=(const AliMUONLogger& rhs); // not implemented
60 
61 private:
62 
65  TString fName;
66 
67  ClassDef(AliMUONLogger,2) // A logger that keeps track of the number of times a message appeared
68 };
69 
70 #endif
Long64_t Merge(TCollection *list)
void Print(Option_t *opt="") const
ULong_t Hash() const
Definition: AliMUONLogger.h:53
AliMUONLogger & operator=(const AliMUONLogger &rhs)
Not implemented.
TString fName
! object name
Definition: AliMUONLogger.h:65
Int_t Log(const char *message)
Int_t NumberOfEntries() const
Bool_t Next(TString &msg, Int_t &occurance)
Int_t fMaxNumberOfEntries
! after this number, print and reset
Definition: AliMUONLogger.h:63
Substitutes map <string, int> which ALICE does not allow to use.
AliMUONLogger(Int_t maxNumberOfEntries=-1, const char *name="AliMUONLogger")
A logger that keeps track of the number of times a message appeared.
Definition: AliMUONLogger.h:29
AliMUONStringIntMap * fLog
! map from message to number of times the message was issued
Definition: AliMUONLogger.h:64
const char * GetName() const
Definition: AliMUONLogger.h:51
void Clear(Option_t *="")
virtual ~AliMUONLogger()