AliRoot Core  a565103 (a565103)
 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 
16 #include "TObject.h"
17 #include "TString.h"
18 #include <iosfwd>
19 
21 
22 using std::ofstream;
23 
24 class AliMUONLogger : public TObject
25 {
26 public:
27  AliMUONLogger(Int_t maxNumberOfEntries=-1, const char* name="AliMUONLogger");
28  virtual ~AliMUONLogger();
29 
30  Int_t Log(const char* message);
31 
32  void Print(Option_t* opt="") const;
33 
34  void Print(TString& key, ofstream& out) const;
35 
36  void Clear(Option_t* /*option*/ ="");
37 
38  Bool_t Next(TString& msg, Int_t& occurance);
39 
40  void ResetItr();
41 
42  Int_t NumberOfEntries() const;
43 
44  Long64_t Merge(TCollection* list);
45 
46  const char* GetName() const { return fName.Data(); }
47 
48  ULong_t Hash() const { return fName.Hash(); }
49 
50 private:
52  AliMUONLogger(const AliMUONLogger& rhs); // not implemented
54  AliMUONLogger& operator=(const AliMUONLogger& rhs); // not implemented
55 
56 private:
57 
60  TString fName;
61 
62  ClassDef(AliMUONLogger,2) // A logger that keeps track of the number of times a message appeared
63 };
64 
65 #endif
Long64_t Merge(TCollection *list)
void Print(Option_t *opt="") const
ULong_t Hash() const
Definition: AliMUONLogger.h:48
AliMUONLogger & operator=(const AliMUONLogger &rhs)
Not implemented.
TString fName
! object name
Definition: AliMUONLogger.h:60
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:58
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:24
AliMUONStringIntMap * fLog
! map from message to number of times the message was issued
Definition: AliMUONLogger.h:59
const char * GetName() const
Definition: AliMUONLogger.h:46
void Clear(Option_t *="")
virtual ~AliMUONLogger()