]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONLogger.cxx
Updated AddTask for pPb
[u/mrichter/AliRoot.git] / MUON / AliMUONLogger.cxx
index cb7fa69167dc82f620b5621675861dd8b7573372..7a1a7ad59fb4a95f14e82438906307303e5400e8 100644 (file)
@@ -36,6 +36,8 @@
 /// \author Laurent Aphecetche
 //-----------------------------------------------------------------------------
 
+using std::cout;
+using std::endl;
 /// \cond CLASSIMP
 ClassImp(AliMUONLogger)
 /// \endcond
@@ -61,9 +63,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();
   }
@@ -127,5 +131,11 @@ AliMUONLogger::Next(TString& msg, Int_t& occurance)
      
 }
     
-    
+//_____________________________________________________________________________
+Int_t
+AliMUONLogger::NumberOfEntries() const
+{
+  /// Get the number of logs we have so far
+  return fLog->GetNofItems();
+}