Index: trunk/MagicSoft/Mars/mfileio/FileIOLinkDef.h
===================================================================
--- trunk/MagicSoft/Mars/mfileio/FileIOLinkDef.h	(revision 1471)
+++ trunk/MagicSoft/Mars/mfileio/FileIOLinkDef.h	(revision 1472)
@@ -5,4 +5,5 @@
 #pragma link off all functions;
 
+#pragma link C++ class MChain+;
 #pragma link C++ class MReadTree+;
 #pragma link C++ class MReadMarsFile+;
Index: trunk/MagicSoft/Mars/mfileio/MChain.cc
===================================================================
--- trunk/MagicSoft/Mars/mfileio/MChain.cc	(revision 1472)
+++ trunk/MagicSoft/Mars/mfileio/MChain.cc	(revision 1472)
@@ -0,0 +1,60 @@
+/* ======================================================================== *\
+!
+! *
+! * 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@uni-sw.gwdg.de>
+!
+!   Copyright: MAGIC Software Development, 2000-2002
+!
+!
+\* ======================================================================== */
+
+/////////////////////////////////////////////////////////////////////////////
+//                                                                         //
+// MChain                                                                  //
+//                                                                         //
+// Helper class for MReadTree                                              //
+//                                                                         //
+/////////////////////////////////////////////////////////////////////////////
+#include "MChain.h"
+
+ClassImp(MChain);
+
+Int_t MChain::LoadTree(Int_t entry)
+{
+    //
+    // This is the code from TChain::LoadTree but skips the
+    // notification in LoadTree. If LoadTree raises the notification
+    // a flag is set and the notification is done by hand. This
+    // is done to be able to catch the return value from Notify. If
+    // it has not been successfull -15 is returned.
+    // This is to support return values from Notify()/Reinit()
+    //
+    TObject *notify = GetNotify();
+
+    SetNotify(this);
+
+    Int_t rc = TChain::LoadTree(entry);
+
+    if (rc >= 0 && fNotified && notify)
+        if (!notify->Notify())
+            rc = -15;
+
+    SetNotify(notify);
+
+    return rc;
+}
+
Index: trunk/MagicSoft/Mars/mfileio/MChain.h
===================================================================
--- trunk/MagicSoft/Mars/mfileio/MChain.h	(revision 1472)
+++ trunk/MagicSoft/Mars/mfileio/MChain.h	(revision 1472)
@@ -0,0 +1,27 @@
+#ifndef MARS_MChain
+#define MARS_MChain
+
+#ifndef ROOT_TChain
+#include <TChain.h>
+#endif
+
+class MChain : public TChain
+{
+private:
+    Bool_t fNotified;
+
+public:
+    MChain() : TChain(), fNotified(kFALSE) {}
+    MChain(const char *name, const char *title="") : TChain(name, title), fNotified(kFALSE) {}
+
+    void ResetTree() { fTree = 0; }
+
+    virtual Bool_t Notify() { fNotified = kTRUE; return kTRUE; }
+    virtual void   SetNotify(TObject *obj) { fNotify = obj; fNotified = kFALSE; }
+
+    Int_t LoadTree(Int_t entry);
+
+    ClassDef(MChain, 1)
+};
+
+#endif
Index: trunk/MagicSoft/Mars/mfileio/MReadMarsFile.cc
===================================================================
--- trunk/MagicSoft/Mars/mfileio/MReadMarsFile.cc	(revision 1471)
+++ trunk/MagicSoft/Mars/mfileio/MReadMarsFile.cc	(revision 1472)
@@ -50,4 +50,14 @@
 // --------------------------------------------------------------------------
 //
+//  Default constructor. Don't use it.
+//
+MReadMarsFile::MReadMarsFile() : fRun(NULL)
+{
+    fName  = "MReadMarsFile";
+    fTitle = "Task to loop over all events in a tree of a Mars file.";
+}
+
+// --------------------------------------------------------------------------
+//
 //  Default constructor. It creates a MReadTree object to read the
 //  RunHeaders and disables Auto Scheme for this tree.
Index: trunk/MagicSoft/Mars/mfileio/MReadMarsFile.h
===================================================================
--- trunk/MagicSoft/Mars/mfileio/MReadMarsFile.h	(revision 1471)
+++ trunk/MagicSoft/Mars/mfileio/MReadMarsFile.h	(revision 1472)
@@ -20,4 +20,5 @@
   
 public:
+    MReadMarsFile();
     MReadMarsFile(const char *treename, const char *filename=NULL, const char *name=NULL, const char *title=NULL);
     ~MReadMarsFile();
@@ -25,5 +26,5 @@
     Int_t AddFile(const char *fname);
 
-    ClassDef(MReadMarsFile, 0)	// Reads a tree from file(s)
+    ClassDef(MReadMarsFile, 1)	// Reads a tree from file(s)
 };
 
Index: trunk/MagicSoft/Mars/mfileio/MReadTree.cc
===================================================================
--- trunk/MagicSoft/Mars/mfileio/MReadTree.cc	(revision 1471)
+++ trunk/MagicSoft/Mars/mfileio/MReadTree.cc	(revision 1472)
@@ -54,5 +54,4 @@
 
 #include <TFile.h>           // TFile::GetName
-#include <TChain.h>
 #include <TSystem.h>         // gSystem->ExpandPath
 #include <TGProgressBar.h>
@@ -63,5 +62,5 @@
 #include "MLogManip.h"
 
-#include "MTime.h"
+#include "MChain.h"
 #include "MFilter.h"
 #include "MParList.h"
@@ -70,47 +69,23 @@
 ClassImp(MReadTree);
 
-class MChain : public TChain
-{
-private:
-    Bool_t fNotified;
-
-public:
-    MChain() : TChain(), fNotified(kFALSE) {}
-    MChain(const char *name, const char *title="") : TChain(name, title), fNotified(kFALSE) {}
-
-    void ResetTree() { fTree = 0; }
-
-    virtual Bool_t Notify() { fNotified = kTRUE; return kTRUE; }
-    virtual void   SetNotify(TObject *obj) { fNotify = obj; fNotified = kFALSE; }
-
-    Int_t LoadTree(Int_t entry)
-    {
-        //
-        // This is the code from TChain::LoadTree but skips the
-        // notification in LoadTree. If LoadTree raises the notification
-        // a flag is set and the notification is done by hand. This
-        // is done to be able to catch the return value from Notify. If
-        // it has not been successfull -15 is returned.
-        // This is to support return values from Notify()/Reinit()
-        //
-        TObject *notify = GetNotify();
-
-        SetNotify(this);
-
-        Int_t rc = TChain::LoadTree(entry);
-
-        if (rc >= 0 && fNotified && notify)
-            if (!notify->Notify())
-                rc = -15;
-
-        SetNotify(notify);
-
-        return rc;
-    }
-};
-
-// --------------------------------------------------------------------------
-//
-//  Default constructor. It creates an TChain instance which represents the
+// --------------------------------------------------------------------------
+//
+//  Default constructor. Don't use it.
+//
+MReadTree::MReadTree()
+    : fNumEntry(0), fBranchChoosing(kFALSE), fAutoEnable(kTRUE), fProgress(NULL)
+{
+    fName  = "MReadTree";
+    fTitle = "Task to loop over all events in one single tree";
+
+    fVetoList = NULL;
+    fNotify = NULL;
+
+    fChain = NULL;
+}
+
+// --------------------------------------------------------------------------
+//
+//  Constructor. It creates an TChain instance which represents the
 //  the Tree you want to read and adds the given file (if you gave one).
 //  More files can be added using MReadTree::AddFile.
@@ -806,6 +781,6 @@
     TString name = ToLower(fName);
 
-    out << "   " << ClassName() << " " << name << "(";
-    out << fChain->GetName() << ", \"" << fName << "\", \"" << fTitle << "\");" << endl;
+    out << "   " << ClassName() << " " << name << "(\"";
+    out << fChain->GetName() << "\", \"" << fName << "\", \"" << fTitle << "\");" << endl;
 
     TIter Next(fChain->GetListOfFiles());
Index: trunk/MagicSoft/Mars/mfileio/MReadTree.h
===================================================================
--- trunk/MagicSoft/Mars/mfileio/MReadTree.h	(revision 1471)
+++ trunk/MagicSoft/Mars/mfileio/MReadTree.h	(revision 1472)
@@ -40,4 +40,5 @@
 
 public:
+    MReadTree();
     MReadTree(const char *treename, const char *filename=NULL, const char *name=NULL, const char *title=NULL);
     ~MReadTree();
@@ -73,5 +74,5 @@
     virtual void   SavePrimitive(ofstream &out, Option_t *o="");
 
-    ClassDef(MReadTree, 0)	// Reads a tree from file(s)
+    ClassDef(MReadTree, 1)	// Reads a tree from file(s)
 };
 
Index: trunk/MagicSoft/Mars/mfileio/MWriteRootFile.cc
===================================================================
--- trunk/MagicSoft/Mars/mfileio/MWriteRootFile.cc	(revision 1471)
+++ trunk/MagicSoft/Mars/mfileio/MWriteRootFile.cc	(revision 1472)
@@ -51,4 +51,17 @@
 // --------------------------------------------------------------------------
 //
+// Default constructor. It is there to support some root stuff.
+// Don't use it.
+//
+MWriteRootFile::MWriteRootFile() : fOut(NULL)
+{
+    fName  = "MWriteRootFile";
+    fTitle = "Task which writes a root-output file";
+
+    fBranches.SetOwner();
+}
+
+// --------------------------------------------------------------------------
+//
 // Specify the name of the root file. You can also give an option ("UPDATE"
 // and "RECREATE" would make sense only) as well as the file title and
@@ -391,5 +404,5 @@
     out << fOut->GetTitle() << "\", ";
     out << fOut->GetCompressionLevel() << ", \"";
-    out << fName << "\", " << fTitle << "\");" << endl;;
+    out << fName << "\", \"" << fTitle << "\");" << endl;;
 
     MRootFileBranch *entry;
Index: trunk/MagicSoft/Mars/mfileio/MWriteRootFile.h
===================================================================
--- trunk/MagicSoft/Mars/mfileio/MWriteRootFile.h	(revision 1471)
+++ trunk/MagicSoft/Mars/mfileio/MWriteRootFile.h	(revision 1472)
@@ -16,8 +16,8 @@
 {
 private:
-    TTree         *fTree;
-    TBranch       *fBranch;
+    TTree         *fTree;       //!
+    TBranch       *fBranch;     //!
 
-    MParContainer *fContainer;
+    MParContainer *fContainer;  //!
     TString        fContName;
 
@@ -29,4 +29,10 @@
 
 public:
+    MRootFileBranch() : fTree(NULL), fBranch(NULL), fContainer(NULL)
+    {
+        Init(NULL, NULL);
+        fContName = "";
+    }
+
     MRootFileBranch(const char *cname, const char *tname=NULL, const char *ttitle=NULL)
         : fTree(NULL), fBranch(NULL), fContainer(NULL)
@@ -52,5 +58,5 @@
     void SetTree(TTree *tree)              { fTree = tree; }
 
-    ClassDef(MRootFileBranch, 0) // Storage container for MWriteRootFile to store TBranch informations
+    ClassDef(MRootFileBranch, 1) // Storage container for MWriteRootFile to store TBranch informations
 };
 
@@ -61,5 +67,5 @@
 
     TObjArray fBranches;
-    TObjArray fTrees;
+    TObjArray fTrees;     //!
 
     void        CheckAndWrite() const;
@@ -69,4 +75,5 @@
 
 public:
+    MWriteRootFile();
     MWriteRootFile(const char *fname,
                    const Option_t *opt="RECREATE",
@@ -87,5 +94,5 @@
     void SavePrimitive(ofstream &out, Option_t *o="");
 
-    ClassDef(MWriteRootFile, 0)	// Class to write one container to a root file
+    ClassDef(MWriteRootFile, 1)	// Class to write one container to a root file
 };
 
Index: trunk/MagicSoft/Mars/mfileio/Makefile
===================================================================
--- trunk/MagicSoft/Mars/mfileio/Makefile	(revision 1471)
+++ trunk/MagicSoft/Mars/mfileio/Makefile	(revision 1472)
@@ -31,5 +31,6 @@
 .SUFFIXES: .c .cc .cxx .h .hxx .o 
 
-SRCFILES = MReadTree.cc \
+SRCFILES = MChain.cc \
+           MReadTree.cc \
            MReadMarsFile.cc \
            MWriteFile.cc \
