Index: trunk/MagicSoft/Mars/manalysis/MMatrixLoop.cc
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MMatrixLoop.cc	(revision 5729)
+++ trunk/MagicSoft/Mars/manalysis/MMatrixLoop.cc	(revision 5803)
@@ -54,4 +54,22 @@
 // --------------------------------------------------------------------------
 //
+// Return the number of events (rows) in the matrix
+//
+UInt_t MMatrixLoop::GetEntries()
+{
+    return fMatrix ? fMatrix->GetNumRows() : 0;
+}
+
+// --------------------------------------------------------------------------
+//
+// Return name of MHMatrix, <n/a> if not available
+//
+TString MMatrixLoop::GetFileName() const
+{
+    return fMatrix ? fMatrix->GetName() : "<n/a>";
+}
+
+// --------------------------------------------------------------------------
+//
 Int_t MMatrixLoop::PreProcess(MParList *plist)
 {
Index: trunk/MagicSoft/Mars/manalysis/MMatrixLoop.h
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MMatrixLoop.h	(revision 5729)
+++ trunk/MagicSoft/Mars/manalysis/MMatrixLoop.h	(revision 5803)
@@ -2,26 +2,34 @@
 #define MARS_MMatrixLoop
 
-#ifndef MARS_MTask
-#include "MTask.h"
+#ifndef MARS_MRead
+#include "MRead.h"
 #endif
-
 
 class MHMatrix;
 
-class MMatrixLoop : public MTask
+class MMatrixLoop : public MRead
 {
 private:
+    // MMatrixLoop
     static const TString gsDefName;
     static const TString gsDefTitle;
 
-protected:
     MHMatrix *fMatrix;
     Int_t     fNumRow;    //! Number of dimensions of histogram
 
+    // MRead
+    UInt_t  GetEntries();
+    TString GetFileName() const;
+    Bool_t  Rewind() { fNumRow=0; return kTRUE; }
+
+    virtual Int_t AddFile(const char *fname, Int_t entries=-1) { return 0; }
+    Int_t AddFiles(MDirIter &dir) { return 0; }
+
+    // MTask
+    Int_t PreProcess(MParList *plist);
+    Int_t Process();
+
 public:
     MMatrixLoop(MHMatrix *mat, const char *name=NULL, const char *title=NULL);
-
-    Int_t PreProcess(MParList *plist);
-    Int_t Process();
 
     ClassDef(MMatrixLoop, 0) // Task 'reading' events from a MHMatrix
