Index: /trunk/MagicSoft/Mars/mreport/MReport.cc
===================================================================
--- /trunk/MagicSoft/Mars/mreport/MReport.cc	(revision 2522)
+++ /trunk/MagicSoft/Mars/mreport/MReport.cc	(revision 2523)
@@ -38,18 +38,4 @@
 using namespace std;
 
-Bool_t MReport::Interprete(TString &str)
-{
-    if (!InterpreteHeader(str))
-        return kFALSE;
-
-    return InterpreteBody(str);
-}
-
-Bool_t MReport::InterpreteBody(TString &str)
-{
-    *fLog << warn << "No interpreter existing for: " << fIdentifier << endl;
-    return kTRUE;
-}
-
 Bool_t MReport::InterpreteHeader(TString &str)
 {
@@ -75,2 +61,23 @@
     return kTRUE;
 }
+
+Bool_t MReport::InterpreteBody(TString &str)
+{
+    *fLog << warn << "No interpreter existing for: " << fIdentifier << endl;
+    return kTRUE;
+}
+
+Bool_t MReport::Interprete(TString &str)
+{
+    if (!InterpreteHeader(str))
+        return kFALSE;
+
+    if (!InterpreteBody(str))
+        return kFALSE;
+
+    SetReadyToSave();
+    if (fTime)
+        fTime->SetReadyToSave();
+
+    return kTRUE;
+}
Index: /trunk/MagicSoft/Mars/mreport/MReportFileRead.cc
===================================================================
--- /trunk/MagicSoft/Mars/mreport/MReportFileRead.cc	(revision 2522)
+++ /trunk/MagicSoft/Mars/mreport/MReportFileRead.cc	(revision 2523)
@@ -41,13 +41,4 @@
 #include "MParList.h"
 
-/*
-#include "MTime.h"
-#include "MParList.h"
-#include "MRawRunHeader.h"
-#include "MRawEvtHeader.h"
-#include "MRawEvtData.h"
-#include "MRawCrateData.h"
-#include "MRawCrateArray.h"
-*/
 ClassImp(MReportFileRead);
 
@@ -61,11 +52,21 @@
 private:
     MReport *fReport;
+    ULong_t  fNumReports;
 
 public:
-    MReportHelp(MReport *rep) : fReport(rep) { }
+    MReportHelp(MReport *rep) : fReport(rep), fNumReports(0) { }
     const char *GetName() const { return fReport->GetIdentifier(); }
+    ULong_t GetNumReports() const { return fNumReports; }
     ULong_t Hash() const { return fReport->GetIdentifier().Hash(); }
     MReport *GetReport() { return fReport; }
     void SetTime(MTime *t) { fReport->SetTime(t); }
+    Bool_t Interprete(TString &str)
+    {
+        if (!fReport->Interprete(str))
+            return kFALSE;
+
+        fNumReports++;
+        return kTRUE;
+    }
 };
 
@@ -95,8 +96,17 @@
 }
 
+MReportHelp *MReportFileRead::GetReportHelp(const TString &str) const
+{
+    return (MReportHelp*)fList->FindObject(str);
+}
+
+MReport *MReportFileRead::GetReport(MReportHelp *help) const
+{
+    return help ? help->GetReport() : 0;
+}
+
 MReport *MReportFileRead::GetReport(const TString &str) const
 {
-    MReportHelp *rep = (MReportHelp*)fList->FindObject(str);
-    return rep ? rep->GetReport() : 0;
+    return GetReport(GetReportHelp(str));
 }
 
@@ -201,6 +211,6 @@
     TString str;
 
-    MReport *rep=NULL;
-    while (!rep)
+    MReportHelp *rep=NULL;
+    while (!GetReport(rep))
     {
         str.ReadLine(*fIn);
@@ -215,6 +225,6 @@
             continue;
 
-        rep = GetReport(str(0,pos));
-        if (rep)
+        rep = GetReportHelp(str(0,pos));
+        if (GetReport(rep))
             str.Remove(0, pos);
     }
@@ -222,5 +232,5 @@
     if (!rep->Interprete(str))
     {
-        *fLog << err << "ERROR - Interpretation of '" << rep->GetIdentifier() << "' failed." << endl;
+        *fLog << err << "ERROR - Interpretation of '" << rep->GetName() << "' failed." << endl;
         return kFALSE;
     }
@@ -237,16 +247,20 @@
 Int_t MReportFileRead::PostProcess()
 {
-    /*
-    //
-    // Sanity check for the number of events
-    //
-    if (fRawRunHeader->GetNumEvents() == GetNumExecutions()-1)
-        return kTRUE;
-
-    *fLog << warn << "Warning - number of read events (" << GetNumExecutions()-1;
-    *fLog << ") doesn't match number in run header (";
-    *fLog << fRawRunHeader->GetNumEvents() << ")." << endl;
-    */
     fIn->close();
-    return kTRUE;
-}
+
+    *fLog << inf << endl;
+    *fLog << GetDescriptor() << " statistics:" << endl;
+    *fLog << dec << setfill(' ');
+
+    TIter Next(fList);
+    MReportHelp *rep=0;
+
+    while ((rep=(MReportHelp*)Next()))
+    {
+        *fLog << " " << setw(7) << rep->GetNumReports() << " (";
+        *fLog << setw(3) << (int)(100.*rep->GetNumReports()/GetNumExecutions());
+        *fLog << "%): " << rep->GetName() << endl;
+    }
+
+    return kTRUE;
+}
Index: /trunk/MagicSoft/Mars/mreport/MReportFileRead.h
===================================================================
--- /trunk/MagicSoft/Mars/mreport/MReportFileRead.h	(revision 2522)
+++ /trunk/MagicSoft/Mars/mreport/MReportFileRead.h	(revision 2523)
@@ -14,4 +14,5 @@
 class MTime;
 class MReport;
+class MReportHelp;
 
 class MReportFileRead : public MTask
@@ -21,6 +22,6 @@
     static const TString gsVersionPrefix;
 
-    TString         fFileName;
-    ifstream       *fIn;            //! buffered input stream (file to read from)
+    TString     fFileName;
+    ifstream   *fIn;         //! buffered input stream (file to read from)
 
     THashTable *fList;
@@ -32,4 +33,6 @@
     Bool_t CheckFileHeader() const;
     MReport *GetReport(const TString &str) const;
+    MReport *GetReport(MReportHelp *help) const;
+    MReportHelp *GetReportHelp(const TString &str) const;
 
 public:
