Index: trunk/MagicSoft/Mars/mfileio/FileIOLinkDef.h
===================================================================
--- trunk/MagicSoft/Mars/mfileio/FileIOLinkDef.h	(revision 1599)
+++ trunk/MagicSoft/Mars/mfileio/FileIOLinkDef.h	(revision 1600)
@@ -6,4 +6,5 @@
 
 #pragma link C++ class MChain+;
+#pragma link C++ class MRead+;
 #pragma link C++ class MReadTree+;
 #pragma link C++ class MReadMarsFile+;
Index: trunk/MagicSoft/Mars/mfileio/MCT1ReadPreProc.cc
===================================================================
--- trunk/MagicSoft/Mars/mfileio/MCT1ReadPreProc.cc	(revision 1599)
+++ trunk/MagicSoft/Mars/mfileio/MCT1ReadPreProc.cc	(revision 1600)
@@ -42,5 +42,4 @@
 //
 /////////////////////////////////////////////////////////////////////////////
-
 #include "MCT1ReadPreProc.h"
 
@@ -81,7 +80,7 @@
 //
 MCT1ReadPreProc::MCT1ReadPreProc(const char *fname, const char *name,
-                                 const char *title) : fIn(NULL)
-{
-    fName  = name  ? name  : "MCT1ReadPreProc";
+                                 const char *title) : fIn(NULL), fEntries(0)
+{
+    fName  = name  ? name  : "MRead";
     fTitle = title ? title : "Task to loop over events in CT1 ascii file";
 
@@ -113,6 +112,22 @@
 void MCT1ReadPreProc::AddFile(const char *txt)
 {
-    TNamed *name = new TNamed(txt, "");
-    fFileNames->AddLast(name);
+    ifstream *store = fIn;
+
+    fIn = new ifstream(gSystem->ExpandPathName(txt));
+
+    if (!(*fIn))
+    {
+        *fLog << warn << "Cannot open file '" << txt << "'... ignored." << endl;
+        fIn = store;
+        return;
+    }
+
+    fEntries += GetNumEvents();
+
+    delete fIn;
+
+    fIn = store;
+
+    fFileNames->AddLast(new TNamed(txt, ""));
 }
 
@@ -123,10 +138,10 @@
 // data members
 //
-void MCT1ReadPreProc::ProcessHeader(const struct outputpars &outpars)
-{
-    fNumPixels = outpars.inumpixels; // number of pixels in the camera
-
-    if (fNumPixels>iMAXNUMPIX || fNumPixels==0)
-        fNumPixels=iMAXNUMPIX;
+void MCT1ReadPreProc::ProcessRunHeader(const struct outputpars &outpars)
+{
+    if (outpars.inumpixels != iMAXNUMPIX)
+        *fLog << warn << "WARNING! File doesn't contain " << iMAXNUMPIX << " Pixels... maybe corrupt." << endl;
+
+    fNumEventsInRun = 0;
 
     //
@@ -166,6 +181,4 @@
     *fLog << "Source:    RA=" << outpars.dsourcera_hours << "h  DEC=";
     *fLog << outpars.dsourcedec_deg << "deg" << endl;
-
-    *fLog << "Pixels:    " << fNumPixels << endl;
 
     //int     inummuonpixels;   // number of pixels in the muon shield
@@ -262,6 +275,7 @@
 
     // FIXME? Is x-y echanged between Mars CT1 geometry and CT1 definition?
-    fSrcPos->SetXY(outpars.fypointcorr_deg/fGeom->GetConvMm2Deg(),
-                   outpars.fxpointcorr_deg/fGeom->GetConvMm2Deg());
+    fSrcPos->SetXY(-outpars.fypointcorr_deg/fGeom->GetConvMm2Deg(),
+                   -outpars.fxpointcorr_deg/fGeom->GetConvMm2Deg());
+    fSrcPos->SetReadyToSave();
 
     /*
@@ -342,4 +356,6 @@
 
     fIsMcFile = outpars.bmontecarlo==TRUE;
+
+    fPedest->SetReadyToSave();
 }
 
@@ -348,5 +364,5 @@
 // Read CT1 PreProc File Header:
 //
-Bool_t MCT1ReadPreProc::ReadHeader()
+Bool_t MCT1ReadPreProc::ReadRunHeader()
 {
     char cheadertitle[iHEADERTITLELENGTH];
@@ -381,10 +397,10 @@
     fIn->read((Byte_t*)&outpars, sizeof(struct outputpars));
 
-    ProcessHeader(outpars);
+    ProcessRunHeader(outpars);
 
     return kTRUE;
 }
 
-Bool_t MCT1ReadPreProc::ReadFooter()
+Bool_t MCT1ReadPreProc::ReadRunFooter()
 {
     char cheadertitle[iHEADERTITLELENGTH];
@@ -400,5 +416,8 @@
 
     if (!s.BeginsWith(m(0,p)))
-        return kFALSE;
+    {
+        fIn->seekg(-iHEADERTITLELENGTH, ios::cur);
+        return kFALSE;
+    }
 
     *fLog << inf << cheadertitle << flush;
@@ -423,4 +442,15 @@
      */
 
+    fNumFilterEvts += filterres.ifilter_passed_evts;
+    fNumRuns++;
+
+    *fLog << inf << "Read " << fNumEventsInRun << " events from run." << endl;
+
+    if (fNumEventsInRun!=(UInt_t)filterres.ifilter_passed_evts)
+    {
+        *fLog << warn << "WARNING! Number of events in run doesn't match number of read events." << endl;
+        *fLog << "         File might be corrupt." << endl;
+    }
+
     return kTRUE;
 }
@@ -468,10 +498,14 @@
     *fLog << inf << "-----------------------------------------------------------------------" << endl;
 
-    //*fLog << "File contains " << GetNumEvents() << " events." << endl;
-
-    Bool_t rc = ReadHeader();
+    *fLog << "File contains " << GetNumEvents() << " events." << endl;
+
+    // WORKAROUND for not working seekg(0) in GetNumEvents
+    fIn->close();
+    fIn->open(gSystem->ExpandPathName(name));
+
+    Bool_t rc = ReadRunHeader();
 
     if (!rc)
-        *fLog << warn << "Unable to read header... skipping file." << endl;
+        *fLog << warn << "Unable to read first run header... skipping file." << endl;
 
     return rc;
@@ -480,31 +514,48 @@
 Int_t MCT1ReadPreProc::GetNumEvents()
 {
-    Int_t n = 0;
+    *fLog << inf << "Scanning file for size" << flush;
+
+    const TString m(cEND_EVENTS_TEMPLATE);
+    const Int_t p = m.First('%');
+    const TString test = m(0, p);
+
+    Int_t nevts = 0;
+    Int_t nruns = 0;
 
     while (!fIn->eof())
     {
-        if (fIn->get()!=cEND_EVENTS_TEMPLATE[0])
-            continue;
-
-        char cheadertitle[iHEADERTITLELENGTH];
-        fIn->read(cheadertitle, iHEADERTITLELENGTH-1);
-
-        TString s = cheadertitle;
-        TString m = cEND_EVENTS_TEMPLATE;
-        Int_t p = m.First('%');
-
-        if (!s.BeginsWith(m(1,p-1)))
-            continue;
-
-        int num;
-
-        sscanf(cheadertitle, &cEND_EVENTS_TEMPLATE[1], &num);
-
-        n += num;
-    }
-
-    fIn->seekg(0);
-
-    return n;
+        fIn->seekg(iHEADERTITLELENGTH, ios::cur);
+        fIn->seekg(sizeof(struct outputpars), ios::cur);
+
+        while (1)
+        {
+            if (fIn->peek()==cEND_EVENTS_TEMPLATE[0])
+            {
+                char cheadertitle[iHEADERTITLELENGTH];
+                fIn->read(cheadertitle, iHEADERTITLELENGTH);
+
+                const TString s = cheadertitle;
+                if (s.BeginsWith(test))
+                {
+                    fIn->seekg(sizeof(struct filterresults), ios::cur);
+                    nruns++;
+                    break;
+                }
+
+                fIn->seekg(-iHEADERTITLELENGTH, ios::cur);
+            }
+
+            fIn->seekg(sizeof(struct eventrecord), ios::cur);
+            if (fIn->eof())
+                break;
+            nevts++;
+        }
+        *fLog << "." << flush;
+    }
+
+    *fLog << "done." << endl;
+    *fLog << "Found " << nevts << " events in " << nruns << " runs." << endl;
+
+    return nevts;
 }
 
@@ -542,5 +593,5 @@
     //  look for the source position in the camera
     //
-    fSrcPos = (MSrcPosCam*)pList->FindCreateObj("MSrcPosCam");
+    fSrcPos = (MSrcPosCam*)pList->FindCreateObj("MSrcPosCam", "Source");
     if (!fSrcPos)
         return kFALSE;
@@ -566,4 +617,7 @@
     if (!fMcTrig)
         return kFALSE;
+
+    fNumFilterEvts = 0;
+    fNumRuns       = 0;
 
     return kTRUE;
@@ -582,6 +636,4 @@
      int   isecfrac_200ns;     // fractional part of isecs_since_midday
      short snot_ok_flags;      // the bits in these two bytes are flags for additional information on the event: Everything OK =: all Bits = 0
-     int   ipreproc_alt_arcs;  // "should be" alt according to preproc (arcseconds)
-     int   ipreproc_az_arcs;   // "should be" az according to preproc (arcseconds)
 
      // for ALT-AZ mount telescopes: rotation angle of the field of
@@ -602,11 +654,4 @@
      float fhourangle;
      */
-    /*
-     *fLog << event.isecs_since_midday << "s ";
-     *fLog << event.ipreproc_alt_arcs << "s ";
-     *fLog << event.ipreproc_az_arcs << "s ";
-     *fLog << event.ifieldrot_arcs << "s ";
-     *fLog << event.fhourangle << endl;
-     */
 
     //
@@ -614,18 +659,26 @@
     // too the list with it's id, number of photons and error
     //
-    fNphot->InitSize(fNumPixels);
+    fNphot->InitSize(iMAXNUMPIX);
 
     // number of photoelectrons measured in each pixel only the
     // actual number of pixels (outputpars.inumpixels) is written out
     // short spixsig_10thphot[iMAXNUMPIX];
-    for (Int_t i=0; i<fNumPixels; i++)
-    {
-        if (event.spixsig_10thphot[i]>0)
-            fNphot->AddPixel(i, 0.1*event.spixsig_10thphot[i],
-                             (*fPedest)[i].GetMeanRms());
-    }
+    for (Int_t i=0; i<iMAXNUMPIX; i++)
+    {
+        if (event.spixsig_10thphot[i]==0)
+            continue;
+
+        fNphot->AddPixel(i, 0.1*event.spixsig_10thphot[i],
+                         (*fPedest)[i].GetMeanRms());
+    }
+    fNphot->SetReadyToSave();
+
+    // int ipreproc_alt_arcs; // "should be" alt according to preproc (arcseconds)
+    // int ipreproc_az_arcs;  // "should be" az according to preproc (arcseconds)
 
     fMcEvt->SetTheta(TMath::Pi()*(0.5-1./180*event.ialt_arcs/3600));   // altitude (arcseconds)
     fMcEvt->SetPhi(TMath::Pi()/180*event.iaz_arcs/3600);               // azimuth (arcseconds)
+
+    fMcEvt->SetReadyToSave();
 
     if (!fIsMcFile)
@@ -636,5 +689,6 @@
     fMcEvt->SetImpact(event.imcimpact_m*100);    // simulated impact
 
-    fMcTrig->SetFirstLevel(event.imctriggerflag); // MC data from Dorota get a triggerflag: 1 means triggered, 0 not. */
+    fMcTrig->SetFirstLevel(event.imctriggerflag);    // MC data from Dorota get a triggerflag: 1 means triggered, 0 not. */
+    fMcTrig->SetReadyToSave();
 
     //float fmcsize_phel;   // Simulated SIZE
@@ -655,52 +709,47 @@
 
     //
-    // If the first character isn't the first of the footer it must be
-    // an event
-    //
-    if (fIn->peek()!=cEND_EVENTS_TEMPLATE[0])
-        return kTRUE;
-
-    //
-    // Remember the current position if the first character faked a
-    // footer
-    //
-    const Int_t pos = fIn->tellg();
-
-    //
-    // Try reading the footer. If it isn't succefull jump back...
-    // must be an event
-    //
-    if (!ReadFooter())
-    {
-        fIn->seekg(pos, ios::beg);
-        return kTRUE;
-    }
-
-    *fLog << inf << "Footer found." << endl;
-
-    //
-    // No after reading the footer check if we reached the end of the file
-    //
-    if (fIn->eof())
-    {
-        *fLog << "End of file." << endl;
-        return kFALSE;
-    }
-
-    //
-    // If the eof isn't reached a new header must follow. Check for it.
-    //
-    if (fIn->peek()!=cTITLE_TEMPLATE[0])
-    {
-        *fLog << inf << "Error finding new run header in file (possible EOF)... skipping rest of file." << endl;
-        return kFALSE;
-    }
-
-    *fLog << "-----------------------------------------------------------------------" << endl;
-    if (ReadHeader())
-        return kTRUE;
-
-    *fLog << inf << "Error reading run header in file... skipping rest of file." << endl;
-    return kFALSE;
+    // Because we can have 0-event runs in the file we loop as often
+    // as we don't find a new footer-header combination.
+    //
+    while (1)
+    {
+        //
+        // If the first character isn't the first of the footer it must be
+        // an event
+        //
+        if (fIn->peek()!=cEND_EVENTS_TEMPLATE[0])
+            return kTRUE;
+
+        //
+        // Try reading the footer. If it isn't succefull...
+        // must be an event
+        //
+        if (!ReadRunFooter())
+            return kTRUE;
+
+        *fLog << inf << "Footer found." << endl;
+
+        //
+        // No after reading the footer check if we reached the end of the file
+        //
+        if (fIn->eof())
+        {
+            *fLog << "End of file." << endl;
+            return kFALSE;
+        }
+
+        //
+        // If the eof isn't reached a new header must follow. Check for it.
+        //
+        if (fIn->peek()!=cTITLE_TEMPLATE[0])
+        {
+            *fLog << inf << "Error finding new run header in file (possible EOF)... skipping rest of file." << endl;
+            return kFALSE;
+        }
+
+        *fLog << "-----------------------------------------------------------------------" << endl;
+        if (!ReadRunHeader())
+            return kTRUE;
+    }
 }
 
@@ -726,18 +775,28 @@
     struct eventrecord event;
 
-    const int size1 = sizeof(event)-sizeof(event.spixsig_10thphot);
-    const int size2 = sizeof(event.spixsig_10thphot[0])*fNumPixels;
-
-    // read the eventrecord with the recorded number of stored pixels
-    fIn->read((Byte_t*)&event, size1+size2);
-
-    if (fIn->eof())
-        return kFALSE;
+    // read the eventrecord from the file
+    fIn->read((Byte_t*)&event, sizeof(struct eventrecord));
 
     ProcessEvent(event);
 
-    fNumEvent++;
+    fNumEvents++;
+    fNumEventsInRun++;
 
     return kTRUE;
 }
 
+Bool_t MCT1ReadPreProc::PostProcess()
+{
+    *fLog << all;
+    *fLog << "Number events passed the filter: " << fNumFilterEvts << endl;
+    *fLog << "Number of Events read from file: " << fNumEvents << endl;
+    *fLog << "Number of Runs read from file:   " << fNumRuns << endl;
+
+    if (fNumEvents!=fNumFilterEvts)
+    {
+        *fLog << warn << "WARNING! Number of events in file doesn't match number of read events..." << endl;
+        *fLog << "         File might be corrupt." << endl;
+    }
+
+    return kTRUE;
+}
Index: trunk/MagicSoft/Mars/mfileio/MCT1ReadPreProc.h
===================================================================
--- trunk/MagicSoft/Mars/mfileio/MCT1ReadPreProc.h	(revision 1599)
+++ trunk/MagicSoft/Mars/mfileio/MCT1ReadPreProc.h	(revision 1600)
@@ -2,6 +2,6 @@
 #define MARS_MCT1ReadPreProc
 
-#ifndef MARS_MTask
-#include "MTask.h"
+#ifndef MARS_MRead
+#include "MRead.h"
 #endif
 
@@ -18,22 +18,25 @@
 struct eventrecord;
 
-class MCT1ReadPreProc : public MTask
+class MCT1ReadPreProc : public MRead
 {
 private:
-    ifstream     *fIn;          // the inputfile
-    MGeomCam     *fGeom;        // camera geometry
-    MCerPhotEvt  *fNphot;       // the data container for all data.
-    MPedestalCam *fPedest;      // ct1 pedestals
-    MMcEvt       *fMcEvt;       // monte carlo data container for MC files
-    MMcTrig      *fMcTrig;      // mc data container for trigger information
-    MSrcPosCam   *fSrcPos;      // source position in the camera
-    TList        *fFileNames;   // Array which stores the \0-terminated filenames
-    MBlindPixels *fBlinds;      // Array holding blind pixels
+    ifstream *fIn;          // the inputfile
+    TList    *fFileNames;   // Array which stores the \0-terminated filenames
 
-    Int_t fNumPixels;
-    Bool_t fIsMcFile;
+    MGeomCam     *fGeom;    // camera geometry
+    MCerPhotEvt  *fNphot;   // the data container for all data.
+    MPedestalCam *fPedest;  // ct1 pedestals
+    MMcEvt       *fMcEvt;   // monte carlo data container for MC files
+    MMcTrig      *fMcTrig;  // mc data container for trigger information
+    MSrcPosCam   *fSrcPos;  // source position in the camera
+    MBlindPixels *fBlinds;  // Array holding blind pixels
 
-    UInt_t fNumEvents;
-    UInt_t fNumEvent;
+    Bool_t fIsMcFile;       // Flag whether current run is a MC run
+
+    UInt_t fNumEvents;      // number of events counted in all runs in all files
+    UInt_t fNumEventsInRun; // number of events in the counted in th ecurrent run
+    UInt_t fNumRuns;        // number of processed runs of all files
+    UInt_t fEntries;        // entries of all files succesfully added
+    UInt_t fNumFilterEvts;  // number of events mentioned in the runs footers
 
     Bool_t OpenNextFile();
@@ -42,14 +45,14 @@
 
     void   ReadPedestals();
-    Bool_t ReadHeader();
-    Bool_t ReadFooter();
+    Bool_t ReadRunHeader();
+    Bool_t ReadRunFooter();
     Bool_t CheckFilePosition();
-    void   ProcessHeader(const struct outputpars &outpars);
+    void   ProcessRunHeader(const struct outputpars &outpars);
     void   ProcessEvent(const struct eventrecord &event);
 
 public:
     MCT1ReadPreProc(const char *filename=NULL,
-                  const char *name=NULL,
-                  const char *title=NULL);
+                    const char *name=NULL,
+                    const char *title=NULL);
 
     ~MCT1ReadPreProc();
@@ -59,4 +62,7 @@
     Bool_t PreProcess(MParList *pList);
     Bool_t Process();
+    Bool_t PostProcess();
+
+    UInt_t GetEntries() { return fEntries; }
 
     ClassDef(MCT1ReadPreProc, 0)	// Reads the CT1 data file
Index: trunk/MagicSoft/Mars/mfileio/MRead.cc
===================================================================
--- trunk/MagicSoft/Mars/mfileio/MRead.cc	(revision 1600)
+++ trunk/MagicSoft/Mars/mfileio/MRead.cc	(revision 1600)
@@ -0,0 +1,35 @@
+/* ======================================================================== *\
+!
+! *
+! * This file is part of MARS, the MAGIC Analysis and Reconstruction
+! * Software. It is distributed to you in the hope that it can be a useful
+! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
+! * It is distributed WITHOUT ANY WARRANTY.
+! *
+! * Permission to use, copy, modify and distribute this software and its
+! * documentation for any purpose is hereby granted without fee,
+! * provided that the above copyright notice appear in all copies and
+! * that both that copyright notice and this permission notice appear
+! * in supporting documentation. It is provided "as is" without express
+! * or implied warranty.
+! *
+!
+!
+!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@astro.uni-wuerzburg.de>
+!
+!   Copyright: MAGIC Software Development, 2000-2002
+!
+!
+\* ======================================================================== */
+
+/////////////////////////////////////////////////////////////////////////////
+//                                                                         //
+// MRead                                                                   //
+//                                                                         //
+// Base class for all reading tasks                                        //
+//                                                                         //
+/////////////////////////////////////////////////////////////////////////////
+#include "MRead.h"
+
+ClassImp(MRead);
+
Index: trunk/MagicSoft/Mars/mfileio/MRead.h
===================================================================
--- trunk/MagicSoft/Mars/mfileio/MRead.h	(revision 1600)
+++ trunk/MagicSoft/Mars/mfileio/MRead.h	(revision 1600)
@@ -0,0 +1,17 @@
+#ifndef MARS_MRead
+#define MARS_MRead
+
+#ifndef MARS_MTask
+#include "MTask.h"
+#endif
+
+class MRead : public MTask
+{
+public:
+
+    virtual UInt_t GetEntries() = 0;
+
+    ClassDef(MRead, 0)	// Base class for a reading task
+};
+
+#endif
Index: trunk/MagicSoft/Mars/mfileio/MReadMarsFile.cc
===================================================================
--- trunk/MagicSoft/Mars/mfileio/MReadMarsFile.cc	(revision 1599)
+++ trunk/MagicSoft/Mars/mfileio/MReadMarsFile.cc	(revision 1600)
@@ -54,5 +54,5 @@
 MReadMarsFile::MReadMarsFile() : fRun(NULL)
 {
-    fName  = "MReadMarsFile";
+    fName  = "MRead";
     fTitle = "Task to loop over all events in a tree of a Mars file.";
 }
@@ -67,5 +67,5 @@
     : MReadTree(tname, fname)
 {
-    fName  = name  ? name  : "MReadMarsFile";
+    fName  = name  ? name  : "MRead";
     fTitle = title ? title : "Task to loop over all events in a tree of a Mars file.";
 
Index: trunk/MagicSoft/Mars/mfileio/MReadTree.cc
===================================================================
--- trunk/MagicSoft/Mars/mfileio/MReadTree.cc	(revision 1599)
+++ trunk/MagicSoft/Mars/mfileio/MReadTree.cc	(revision 1600)
@@ -55,5 +55,5 @@
 #include <TFile.h>           // TFile::GetName
 #include <TSystem.h>         // gSystem->ExpandPath
-#include <TGProgressBar.h>
+//#include <TGProgressBar.h>
 #include <TChainElement.h>
 #include <TOrdCollection.h>
@@ -75,7 +75,7 @@
 //
 MReadTree::MReadTree()
-    : fNumEntry(0), fNumEntries(0), fBranchChoosing(kFALSE), fAutoEnable(kTRUE), fProgress(NULL)
-{
-    fName  = "MReadTree";
+    : fNumEntry(0), fNumEntries(0), fBranchChoosing(kFALSE), fAutoEnable(kTRUE)
+{
+    fName  = "MRead";
     fTitle = "Task to loop over all events in one single tree";
 
@@ -99,7 +99,7 @@
 MReadTree::MReadTree(const char *tname, const char *fname,
                      const char *name, const char *title)
-    : fNumEntry(0), fNumEntries(0), fBranchChoosing(kFALSE), fAutoEnable(kTRUE), fProgress(NULL)
-{
-    fName  = name  ? name  : "MReadTree";
+    : fNumEntry(0), fNumEntries(0), fBranchChoosing(kFALSE), fAutoEnable(kTRUE)
+{
+    fName  = name  ? name  : "MRead";
     fTitle = title ? title : "Task to loop over all events in one single tree";
 
@@ -415,5 +415,7 @@
     if (TestBit(kChainWasChanged))
     {
+        *fLog << inf << "Scanning chain... " << flush;
         fNumEntries = (UInt_t)fChain->GetEntries();
+        *fLog << fNumEntries << " events found." << endl;
         ResetBit(kChainWasChanged);
     }
@@ -566,10 +568,4 @@
 
     //
-    // If a progress bar is given set its range.
-    //
-    if (fProgress)
-        fProgress->SetRange(0, fNumEntries);
-
-    //
     // Now we can start notifying. Reset tree makes sure, that TChain thinks
     // that the correct file is not yet initialized and reinitilizes it
Index: trunk/MagicSoft/Mars/mfileio/MReadTree.h
===================================================================
--- trunk/MagicSoft/Mars/mfileio/MReadTree.h	(revision 1599)
+++ trunk/MagicSoft/Mars/mfileio/MReadTree.h	(revision 1600)
@@ -2,13 +2,12 @@
 #define MARS_MReadTree
 
-#ifndef MARS_MTask
-#include "MTask.h"
+#ifndef MARS_MRead
+#include "MRead.h"
 #endif
 
 class MChain;
 class TBranch;
-class TGProgressBar;
 
-class MReadTree : public MTask
+class MReadTree : public MRead
 {
 private:
@@ -27,6 +26,4 @@
 
 private:
-    TGProgressBar  *fProgress; //! Possible display of status
-
     void SetBranchStatus(const TList *list, Bool_t status);
     void SetBranchStatus(TObject *branch, Bool_t status);
@@ -50,6 +47,4 @@
     void   EnableBranch(const char *name);
     void   VetoBranch(const char *name);
-
-    void   SetProgressBar(TGProgressBar *bar) { fProgress = bar; }
 
     Bool_t GetEvent();
Index: trunk/MagicSoft/Mars/mfileio/MWriteRootFile.cc
===================================================================
--- trunk/MagicSoft/Mars/mfileio/MWriteRootFile.cc	(revision 1599)
+++ trunk/MagicSoft/Mars/mfileio/MWriteRootFile.cc	(revision 1600)
@@ -130,4 +130,6 @@
     // - Branches are automatically deleted by the tree destructor
     //
+
+    *fLog << inf << "Output File closed and deleted." << endl;
 }
 
Index: trunk/MagicSoft/Mars/mfileio/Makefile
===================================================================
--- trunk/MagicSoft/Mars/mfileio/Makefile	(revision 1599)
+++ trunk/MagicSoft/Mars/mfileio/Makefile	(revision 1600)
@@ -32,4 +32,5 @@
 
 SRCFILES = MChain.cc \
+	   MRead.cc \
            MReadTree.cc \
            MReadMarsFile.cc \
