Index: trunk/MagicSoft/Mars/mbase/MParContainer.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MParContainer.cc	(revision 1028)
+++ trunk/MagicSoft/Mars/mbase/MParContainer.cc	(revision 1030)
@@ -87,5 +87,5 @@
 {
 
-   MParContainer *named = (MParContainer*)TObject::Clone(newname);
+   MParContainer *named = (MParContainer*)TObject::Clone();
    if (newname && strlen(newname)) named->SetName(newname);
    return named;
Index: trunk/MagicSoft/Mars/mbase/MParContainer.h
===================================================================
--- trunk/MagicSoft/Mars/mbase/MParContainer.h	(revision 1028)
+++ trunk/MagicSoft/Mars/mbase/MParContainer.h	(revision 1030)
@@ -98,24 +98,25 @@
     MParContainer(const MParContainer &named);
     MParContainer& operator=(const MParContainer& rhs);
+    virtual ~MParContainer() {}
 
-    void SetLogStream(MLog *lg) { fLog = lg; }
+    virtual TObject    *Clone(const char *newname="") const;
+    virtual Int_t       Compare(const TObject *obj) const;
+    virtual void        Copy(TObject &named);
+    virtual void        FillBuffer(char *&buffer);
 
-    virtual TObject *Clone(const char *newname="") const;
-    virtual Int_t    Compare(const TObject *obj) const;
-    virtual void     Copy(TObject &named);
-    virtual void     FillBuffer(char *&buffer);
-    virtual const char  *GetName() const  { return fName.Data(); }
-    virtual const char  *GetTitle() const { return fTitle.Data(); }
-    virtual ULong_t  Hash()               { return fName.Hash(); }
-    virtual Bool_t   IsSortable() const   { return kTRUE; }
-    virtual void     SetName(const char *name); // *MENU*
-    virtual void     SetObject(const char *name, const char *title);
-    virtual void     SetTitle(const char *title=""); // *MENU*
-    virtual void     ls(Option_t *option="") const;
-    virtual void     Print(Option_t *option="") const;
-    virtual Int_t    Sizeof() const;
+    virtual const char *GetName() const    { return fName.Data(); }
+    virtual const char *GetTitle() const   { return fTitle.Data(); }
+    virtual ULong_t     Hash()             { return fName.Hash(); }
+    virtual Bool_t      IsSortable() const { return kTRUE; }
 
-    virtual void     Reset() {  }
+    virtual void        SetName(const char *name); // *MENU*
+    virtual void        SetObject(const char *name, const char *title);
+    virtual void        SetTitle(const char *title=""); // *MENU*
+    virtual void        ls(Option_t *option="") const;
+    virtual void        Print(Option_t *option="") const;
+    virtual Int_t       Sizeof() const;
 
+    virtual void   SetLogStream(MLog *lg) { fLog = lg; }
+    virtual void   Reset() { }
     virtual Bool_t IsReadyToSave()                   { return fReadyToSave; }
     virtual void   SetReadyToSave(Bool_t flag=kTRUE) { fReadyToSave=flag; }
Index: trunk/MagicSoft/Mars/mbase/MParList.h
===================================================================
--- trunk/MagicSoft/Mars/mbase/MParList.h	(revision 1028)
+++ trunk/MagicSoft/Mars/mbase/MParList.h	(revision 1030)
@@ -24,5 +24,5 @@
 {
 private:
-    TOrdCollection *fContainer;	// Collection of Parameter and Data Containers
+    TOrdCollection *fContainer;	 // Collection of Parameter and Data Containers
     TOrdCollection *fAutodelete; // All what this list contains is deleted in the destructor
 
@@ -36,5 +36,5 @@
     MParList(MParList &ts);
 
-    ~MParList();
+    virtual ~MParList();
 
     Bool_t AddToList(MParContainer *obj, MParContainer *where = NULL);
Index: trunk/MagicSoft/Mars/mbase/MReadTree.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MReadTree.cc	(revision 1028)
+++ trunk/MagicSoft/Mars/mbase/MReadTree.cc	(revision 1030)
@@ -78,5 +78,5 @@
 MReadTree::MReadTree(const char *tname, const char *fname,
                      const char *name, const char *title)
-    : fNumEntry(0), fBranchChoosing(kFALSE), fAutoEnable(kTRUE)
+    : fNumEntry(0), fBranchChoosing(kFALSE), fAutoEnable(kTRUE), fProgress(NULL)
 {
     fName  = name  ? name  : "MReadTree";
@@ -165,20 +165,56 @@
 // --------------------------------------------------------------------------
 //
-// This is the implementation of the Auto Enabling Scheme.
-// For more information see MTask::AddBranchToList.
-// This function loops over all tasks in the tasklist and enables
-// all branches which are requested by the tasks.
-//
-// To enable 'unknown' branches which are not in the Branchlist of
-// the tasks you can call EnableBranch
+// Checks whether a branch with the given name exists in the chain
+// and sets the branch status of this branch corresponding to status.
+//
+void MReadTree::SetBranchStatus(TObject *branch, Bool_t status)
+{
+    //
+    // Get branch name
+    //
+    const char *name = branch->GetName();
+
+    //
+    // Check whether this branch really exists
+    //
+    if (!fChain->GetBranch(name))
+        return;
+
+    //
+    // Set the branch status
+    //
+    fChain->SetBranchStatus(name, status);
+    *fLog << (status ? "Enabled" : "Disabled");
+    *fLog << " subbranch '" << name << "'." << endl;
+}
+
+// --------------------------------------------------------------------------
+//
+// Set the status of all branches in the list to status.
+//
+void MReadTree::SetBranchStatus(const TOrdCollection *list, Bool_t status)
+{
+    //
+    // Loop over all subbranches in this master branch
+    //
+    TIter Next(list);
+
+    TObject *obj;
+    while ((obj=Next()))
+        SetBranchStatus(obj, status);
+}
+
+// --------------------------------------------------------------------------
+//
+//  This is the implementation of the Auto Enabling Scheme.
+//  For more information see MTask::AddBranchToList.
+//  This function loops over all tasks in the tasklist and enables
+//  all branches which are requested by the tasks.
+//
+//  To enable 'unknown' branches which are not in the Branchlist of
+//  the tasks you can call EnableBranch
 //
 void MReadTree::EnableBranches(MParList *plist)
 {
-    //
-    // if auto enabling is off reject the request
-    //
-    if (!fAutoEnable)
-        return;
-
     //
     // check whether branch choosing must be switched on
@@ -198,27 +234,26 @@
 
     //
-    // Loo over all tasks in the task list.
+    // Loop over all tasks in the task list.
     //
     MTask *task;
     TIter NextTask(tlist->GetList());
     while ((task=(MTask*)NextTask()))
-    {
-        //
-        // Loop over all branches of this task
-        //
-        TNamed *branch;
-        TIter NextBranch(task->GetListOfBranches());
-        while ((branch=(TNamed*)NextBranch()))
-        {
-            //
-            // Get branch name to enable and enable the branch
-            //
-            const char *name = branch->GetName();
-
-            *fLog << "Enabeling '" << name << "'." << endl;
-
-            fChain->SetBranchStatus(name, kTRUE);
-        }
-    }
+        SetBranchStatus(task->GetListOfBranches(), kTRUE);
+}
+
+// --------------------------------------------------------------------------
+//
+//  The disables all subbranches of the given master branch.
+//
+void MReadTree::DisableSubBranches(TBranch *branch)
+{
+    //
+    // This is not necessary, it would work without. But the output
+    // may confuse the user...
+    //
+    if (fAutoEnable || fBranchChoosing)
+        return;
+
+    SetBranchStatus(branch->GetListOfBranches(), kFALSE);
 }
 
@@ -244,5 +279,5 @@
     if (!fNumEntries)
     {
-        *fLog << dbginf << "No entries found in chain (file/s)." << endl;
+        *fLog << dbginf << "No entries found in file(s)." << endl;
         return kFALSE;
     }
@@ -276,5 +311,6 @@
         if (fVetoList->FindObject(name))
         {
-            *fLog << "Branch " << name << " has veto... skipped." << endl;
+            *fLog << "Master branch " << name << " has veto... skipped." << endl;
+            DisableSubBranches(branch);
             continue;
         }
@@ -299,4 +335,5 @@
             //
             *fLog << dbginf << "Warning: Class '" << name << "' not existing in dictionary. Branch skipped." << endl;
+            DisableSubBranches(branch);
             continue;
         }
@@ -308,13 +345,20 @@
         fChain->SetBranchAddress(name, pcont);
 
-        *fLog << "Branch " << name << " setup for reading." << endl;
+        *fLog << "Master branch address " << name << " setup for reading." << endl;
 
         num++;
     }
 
-    *fLog << "MReadTree setup " << num << " branches." << endl;
-
-    EnableBranches(pList);
-
+    *fLog << "MReadTree setup " << num << " master branches addresses." << endl;
+
+    //
+    // If auto enabling scheme isn't disabled, do auto enabling
+    //
+    if (fAutoEnable)
+        EnableBranches(pList);
+
+    //
+    // If a progress bar is given set its range.
+    //
     if (fProgress)
         fProgress->SetRange(0, fNumEntries);
@@ -351,15 +395,12 @@
 Bool_t MReadTree::DecEventNum(UInt_t dec)
 {
-    //!
-    //! this function makes Process() read the event one (or more) before
-    //! the actual position (event) in the tree
-    //!
-    if (fNumEntry < dec/*+1*/)
-    {
-        *fLog << "MReadTree::SetPrevEvent: WARNING: " << fNumEntry/*-1*/ << "-" << dec << " out of Range." << endl;
+    if (fNumEntry-dec >= fNumEntries)
+    {
+        *fLog << "MReadTree::DecEventNum: WARNING - Event " << fNumEntry << "-";
+        *fLog << dec << "=" << (Int_t)fNumEntry-dec << " out of Range." << endl;
         return kFALSE;
     }
 
-    fNumEntry -= dec/*+1*/;
+    fNumEntry -= dec;
     return kTRUE;
 }
@@ -372,17 +413,12 @@
 Bool_t MReadTree::IncEventNum(UInt_t inc)
 {
-    //!
-    //! this function makes Process() read the next (or more) after
-    //! the actual position (event) in the tree
-    //! (Be careful: IncEventNum() or IncEventNum(1) does not chenge anything
-    //!  in the standard behaviour of the task)
-    //!
-    if (fNumEntry+inc/*-1*/ >= fNumEntries)
-    {
-        *fLog << "MReadTree::SkipEvents: WARNING: " << fNumEntry/*-1*/ << "+" << inc << " out of Range." << endl;
+    if (fNumEntry+inc >= fNumEntries)
+    {
+        *fLog << "MReadTree::IncEventNum: WARNING - Event " << fNumEntry << "+";
+        *fLog << inc << "=" << (Int_t)fNumEntry+inc << " out of Range." << endl;
         return kFALSE;
     }
 
-    fNumEntry += inc/*-1*/;
+    fNumEntry += inc;
     return kTRUE;
 }
@@ -390,5 +426,5 @@
 // --------------------------------------------------------------------------
 //
-// this function makes Process() read event number nr next
+// This function makes Process() read event number nr next
 //
 // Remark: You can use this function after instatiating you MReadTree-object
@@ -397,7 +433,7 @@
 Bool_t MReadTree::SetEventNum(UInt_t nr)
 {
-    if (nr>=fNumEntries)
-    {
-        *fLog << "MReadTree::SetEventNum: WARNING: " << nr << " out of Range." << endl;
+    if (nr >= fNumEntries)
+    {
+        *fLog << "MReadTree::SetEventNum: WARNING - " << nr << " out of Range." << endl;
         return kFALSE;
     }
@@ -409,7 +445,10 @@
 // --------------------------------------------------------------------------
 //
-// If you don't want that an object is created for this branch
-// and/or the branch address is set in the Preprocessing of
-// MReadTree use VetoBranch. This saves mainly memory space.
+//  For the branch with the given name:
+//   1) no object is automatically created
+//   2) the branch address for this branch is not set
+//      (because we lack the object, see 1)
+//   3) The whole branch (exactly: all its subbranches) are disabled
+//      this means are not read in memory by TTree:GetEntry
 //
 void MReadTree::VetoBranch(const char *name)
Index: trunk/MagicSoft/Mars/mbase/MReadTree.h
===================================================================
--- trunk/MagicSoft/Mars/mbase/MReadTree.h	(revision 1028)
+++ trunk/MagicSoft/Mars/mbase/MReadTree.h	(revision 1030)
@@ -7,4 +7,5 @@
 
 class TChain;
+class TBranch;
 class TGProgressBar;
 
@@ -22,22 +23,26 @@
     TOrdCollection *fVetoList; // List of Branches which are not allowed to get enabled
 
-    TGProgressBar *fProgress;  // Possible display of status
+    TGProgressBar  *fProgress; // Possible display of status
 
+    void SetBranchStatus(const TOrdCollection *list, Bool_t status);
+    void SetBranchStatus(TObject *branch, Bool_t status);
+
+    void DisableSubBranches(TBranch *b);
     void EnableBranches(MParList *plist);
     void EnableBranchChoosing();
 
+    Bool_t PreProcess(MParList *pList);
+    Bool_t Process();
+  
 public:
     MReadTree(const char *treename, const char *filename=NULL, const char *name=NULL, const char *title=NULL);
     ~MReadTree();
 
-    Bool_t PreProcess(MParList *pList);
-    Bool_t Process();
+    Int_t  AddFile(const char *fname);
+    void   DisableAutoScheme() { fAutoEnable = kFALSE; }
+    void   EnableBranch(const char *name);
+    void   VetoBranch(const char *name);
 
     void   SetProgressBar(TGProgressBar *bar) { fProgress = bar; }
-
-    Int_t  AddFile(const char *fname);
-    void   VetoBranch(const char *name);
-
-    void   EnableBranch(const char *name);
 
     Bool_t GetEvent();
@@ -50,7 +55,5 @@
     UInt_t GetEntries() const  { return fNumEntries; }
 
-    void   DisableAutoScheme() { fAutoEnable = kFALSE; }
-
-    ClassDef(MReadTree, 0)	// Reads one tree
+    ClassDef(MReadTree, 0)	// Reads a tree from file(s)
 };
 
