Index: trunk/MagicSoft/Mars/mfileio/MCT1ReadPreProc.cc
===================================================================
--- trunk/MagicSoft/Mars/mfileio/MCT1ReadPreProc.cc	(revision 2247)
+++ trunk/MagicSoft/Mars/mfileio/MCT1ReadPreProc.cc	(revision 2296)
@@ -125,5 +125,5 @@
 // Add this file as the last entry in the chain
 //
-void MCT1ReadPreProc::AddFile(const char *txt)
+Int_t MCT1ReadPreProc::AddFile(const char *txt, int)
 {
     const char *name = gSystem->ExpandPathName(txt);
@@ -135,5 +135,5 @@
     {
         *fLog << warn << "WARNING - Problem reading header... ignored." << endl;
-        return;
+        return 0;
     }
 
@@ -142,5 +142,5 @@
     {
         *fLog << warn << "WARNING - File contains no data... ignored." << endl;
-        return;
+        return 0;
     }
 
@@ -150,4 +150,5 @@
 
     fFileNames->AddLast(new TNamed(txt, ""));
+    return 1;
 }
 
Index: trunk/MagicSoft/Mars/mfileio/MCT1ReadPreProc.h
===================================================================
--- trunk/MagicSoft/Mars/mfileio/MCT1ReadPreProc.h	(revision 2247)
+++ trunk/MagicSoft/Mars/mfileio/MCT1ReadPreProc.h	(revision 2296)
@@ -92,5 +92,5 @@
     ~MCT1ReadPreProc();
 
-    void AddFile(const char *fname);
+    Int_t AddFile(const char *fname, int i=0);
 
     UInt_t GetEntries() { return fEntries; }
Index: trunk/MagicSoft/Mars/mfileio/MRead.cc
===================================================================
--- trunk/MagicSoft/Mars/mfileio/MRead.cc	(revision 2247)
+++ trunk/MagicSoft/Mars/mfileio/MRead.cc	(revision 2296)
@@ -39,4 +39,6 @@
 #include "MLog.h"
 #include "MLogManip.h"
+
+#include "MDirIter.h"
 
 ClassImp(MRead);
@@ -98,2 +100,16 @@
     return i!=0;
 }
+
+Int_t MRead::AddFiles(MDirIter &next)
+{
+    Int_t rc=0;
+    TString n;
+    while (!(n=next()).IsNull())
+    {
+        const Int_t num = AddFile(n);
+        if (num>0)
+            rc += num;
+    }
+    return rc;
+}
+
Index: trunk/MagicSoft/Mars/mfileio/MRead.h
===================================================================
--- trunk/MagicSoft/Mars/mfileio/MRead.h	(revision 2247)
+++ trunk/MagicSoft/Mars/mfileio/MRead.h	(revision 2296)
@@ -7,4 +7,5 @@
 
 class MFilter;
+class MDirIter;
 
 class MRead : public MTask
@@ -22,5 +23,6 @@
     MFilter *GetSelector() { return fSelector; }
 
-    Int_t AddFile(const char *fname, Int_t entries=-1) { return -1; }
+    virtual Int_t AddFile(const char *fname, Int_t entries=-1) { return -1; }
+    Int_t AddFiles(MDirIter &next);
 
     Bool_t ReadEnv(const TEnv &env, TString prefix, Bool_t print);
Index: trunk/MagicSoft/Mars/mfileio/MReadRflFile.cc
===================================================================
--- trunk/MagicSoft/Mars/mfileio/MReadRflFile.cc	(revision 2247)
+++ trunk/MagicSoft/Mars/mfileio/MReadRflFile.cc	(revision 2296)
@@ -399,5 +399,5 @@
 // Add this file as the last entry in the chain
 //
-void MReadRflFile::AddFile(const char *txt)
+Int_t MReadRflFile::AddFile(const char *txt, int)
 {
     const char *name = gSystem->ExpandPathName(txt);
@@ -424,4 +424,5 @@
 */
     fFileNames->AddLast(new TNamed(txt, ""));
+    return 1;
 }
 
Index: trunk/MagicSoft/Mars/mfileio/MReadRflFile.h
===================================================================
--- trunk/MagicSoft/Mars/mfileio/MReadRflFile.h	(revision 2247)
+++ trunk/MagicSoft/Mars/mfileio/MReadRflFile.h	(revision 2296)
@@ -48,5 +48,5 @@
     ~MReadRflFile();
 
-    void AddFile(const char *fname);
+    Int_t AddFile(const char *fname, int i=0);
 
     Bool_t Rewind() { fNumFile=0; return kTRUE; }
Index: trunk/MagicSoft/Mars/mfileio/MReadTree.cc
===================================================================
--- trunk/MagicSoft/Mars/mfileio/MReadTree.cc	(revision 2247)
+++ trunk/MagicSoft/Mars/mfileio/MReadTree.cc	(revision 2296)
@@ -121,6 +121,7 @@
 
     if (fname)
-        if (fChain->Add(fname)>0)
-            SetBit(kChainWasChanged);
+        AddFile(fname);
+//        if (fChain->Add(fname)>0)
+//            SetBit(kChainWasChanged);
 }
 
@@ -586,5 +587,5 @@
     if (!GetEntries())
     {
-        *fLog << warn << dbginf << "No entries found in file(s)" << endl;
+        *fLog << warn << GetDescriptor() << ": No entries found in file(s)" << endl;
         return kFALSE;
     }
