]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONLogger.cxx
update resolution task for full monitoring of residuals at TRD entrance
[u/mrichter/AliRoot.git] / MUON / AliMUONLogger.cxx
index 0decb715c9ac8785ad21f929aa72b77541b9c144..caa03a3885ec4a3135f9da5b4dfa12e990dc4f4b 100644 (file)
@@ -21,6 +21,7 @@
 #include "AliLog.h"
 #include "Riostream.h"
 
+//-----------------------------------------------------------------------------
 /// \class AliMUONLogger
 ///
 /// A logger that keeps track of the number of times a message appeared.
@@ -33,6 +34,7 @@
 /// only once when DigitizerV3 is destroyed.
 ///
 /// \author Laurent Aphecetche
+//-----------------------------------------------------------------------------
 
 /// \cond CLASSIMP
 ClassImp(AliMUONLogger)
@@ -59,9 +61,11 @@ Int_t
 AliMUONLogger::Log(const char* message)
 {
   /// Log a message
-  if ( fLog->GetNofItems() >= fMaxNumberOfEntries ) 
+
+  if ( fMaxNumberOfEntries >0 && fLog->GetNofItems() >= fMaxNumberOfEntries ) 
   {
-    AliWarning("Reached max number of entries. Printing and resetting.");
+    AliWarning(Form("Reached max number of entries (%d over %d). Printing and resetting.",
+                    fLog->GetNofItems(),fMaxNumberOfEntries));
     Print();
     fLog->Clear();
   }
@@ -73,6 +77,15 @@ AliMUONLogger::Log(const char* message)
   return i+1;
 }
 
+//_____________________________________________________________________________
+void   
+AliMUONLogger::Clear(Option_t* /*option*/) 
+{  
+  /// reset logger spool
+
+  fLog->Clear();
+}
+
 //_____________________________________________________________________________
 void 
 AliMUONLogger::Print(Option_t* opt) const
@@ -87,4 +100,40 @@ AliMUONLogger::Print(Option_t* opt) const
     cout << "No message" << endl;
   }
 }
+  
+//_____________________________________________________________________________
+void
+AliMUONLogger::Print(TString& key, ofstream& out) const
+{
+  /// print out into a given streamer with a key word in front of the message
+  fLog->Print(key, out); 
+
+      
+}
+   
+//_____________________________________________________________________________
+void 
+AliMUONLogger::ResetItr()
+{
+  /// call reset iterator method
+  fLog->ResetItr();
+     
+}
+//_____________________________________________________________________________
+Bool_t 
+AliMUONLogger::Next(TString& msg, Int_t& occurance)
+{
+  /// call next iterator method
+  return fLog->Next(msg, occurance);
+     
+}
+    
+//_____________________________________________________________________________
+Int_t
+AliMUONLogger::NumberOfEntries() const
+{
+  /// Get the number of logs we have so far
+  return fLog->GetNofItems();
+}