Index: trunk/MagicSoft/Mars/mbase/BaseLinkDef.h
===================================================================
--- trunk/MagicSoft/Mars/mbase/BaseLinkDef.h	(revision 1115)
+++ trunk/MagicSoft/Mars/mbase/BaseLinkDef.h	(revision 1116)
@@ -53,6 +53,3 @@
 #pragma link C++ class MTime+;
 
-#pragma link C++ class MHtml+;
-
-
 #endif
Index: trunk/MagicSoft/Mars/mbase/MGList.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MGList.cc	(revision 1115)
+++ trunk/MagicSoft/Mars/mbase/MGList.cc	(revision 1116)
@@ -50,6 +50,4 @@
 //  objects in the list.
 //
-#include <TRefCnt.h>
-
 MGList::~MGList()
 {
@@ -91,4 +89,16 @@
     //  -fno-rtti, which could be used in 'plain' C++
     //
+
+    //
+    // FIXME: This should not be necessary but it is, why??
+    //
+    // TRY: TGPicture *pic = gClient->GetPicture("pic");
+    //      cout << pic->IsA()->DynamicCast(TGWidget::Class(), pic) << endl;
+    //
+    //      Is this another bug in root?
+    //
+    if (!obj->IsA()->InheritsFrom(TGWidget::Class()))
+        return NULL;
+
     return (TGWidget*)obj->IsA()->DynamicCast(TGWidget::Class(), obj);
 }
@@ -137,5 +147,8 @@
     if (IsExisting(obj))
     {
-        cout << "Widget with id #" << GetWidget(obj)->WidgetId() << " already in list... ignored." << endl;
+        const Int_t id = GetWidget(obj)->WidgetId();
+        cout << "Widget with id #" << id << " (";
+        cout << FindWidget(id)->ClassName() << ") already in list... ";
+        cout << obj->GetName() << " ignored." << endl;
         return;
     }
@@ -155,5 +168,8 @@
     if (IsExisting(obj))
     {
-        cout << "Widget with id #" << GetWidget(obj)->WidgetId() << " already in list... ignored." << endl;
+        Int_t id = GetWidget(obj)->WidgetId();
+        cout << "Widget with id #" << id << " (";
+        cout << FindWidget(id)->ClassName() << ") already in list... ";
+        cout << obj->GetName() << " ignored." << endl;
         return;
     }
Index: trunk/MagicSoft/Mars/mbase/MReadTree.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MReadTree.cc	(revision 1115)
+++ trunk/MagicSoft/Mars/mbase/MReadTree.cc	(revision 1116)
@@ -259,5 +259,5 @@
 
     if (fChain->GetBranch(dot+1))
-        SetBranchStatus(dot+1, kTRUE);
+        SetBranchStatus(dot+1, status);
 }
 
@@ -294,5 +294,5 @@
     // check whether branch choosing must be switched on
     //
-    //EnableBranchChoosing();
+    EnableBranchChoosing();
 
     //
@@ -308,17 +308,55 @@
 
     //
-    // Loop over all tasks iand its filters n the task list.
-    //
+    // This loop is not necessary. We could do it like in the commented
+    // loop below. But this loop makes sure, that we don't try to enable
+    // one branch several times. This would not harm, but we would get
+    // an output for each attempt. To have several outputs for one subbranch
+    // may confuse the user, this we don't want.
+    // This loop creates a new list of subbranches and for each branch
+    // which is added we check before whether it already exists or not.
+    //
+    TList list;
+
     MTask *task;
     TIter NextTask(tlist->GetList());
     while ((task=(MTask*)NextTask()))
     {
+        TObject *obj;
+
+        TIter NextTBranch(task->GetListOfBranches());
+        while ((obj=NextTBranch()))
+            if (!list.FindObject(obj->GetName()))
+                list.Add(obj);
+
+        const MFilter *filter = task->GetFilter();
+
+        if (!filter)
+            continue;
+
+        TIter NextFBranch(filter->GetListOfBranches());
+        while ((obj=NextFBranch()))
+            if (!list.FindObject(obj->GetName()))
+                list.Add(obj);
+    }
+
+    SetBranchStatus(&list, kTRUE);
+/*
+    //
+    // Loop over all tasks iand its filters n the task list.
+    //
+    MTask *task;
+    TIter NextTask(tlist->GetList());
+    while ((task=(MTask*)NextTask()))
+    {
         SetBranchStatus(task->GetListOfBranches(), kTRUE);
+
         const MFilter *filter = task->GetFilter();
-
-        if (filter)
-            SetBranchStatus(filter->GetListOfBranches(), kTRUE);
-
-    }
+        if (!filter)
+           continue;
+
+        SetBranchStatus(filter->GetListOfBranches(), kTRUE);
+
+    }
+*/
 }
 
@@ -376,6 +414,4 @@
     *fLog << inf << fNumEntries << " entries found in file(s)." << endl;
 
-    *fLog << all << fChain->GetListOfBranches() << endl;
-
     //
     // Get all branches of this tree and
@@ -386,7 +422,4 @@
 
     Int_t num=0;
-
-
-    *fLog << "Start..." << endl;
     //
     // loop over all tasks for processing
@@ -399,8 +432,5 @@
         const char *bname = branch->GetName();
 
-        *fLog << all << bname << endl;
-
         TString oname(bname);
-
         if (oname.EndsWith("."))
             oname.Remove(oname.Length()-1);
@@ -412,17 +442,4 @@
         {
             *fLog << inf << "Master branch " << bname << " has veto... skipped." << endl;
-            DisableSubBranches(branch);
-            continue;
-        }
-
-        MParContainer *obj = pList->FindCreateObj(oname);
-
-        if (!obj)
-        {
-            //
-            // if class is not existing in the (root) environment
-            // we cannot proceed reading this branch
-            //
-            *fLog << warn << dbginf << "Warning: Class '" << oname << "' not existing in dictionary. Branch skipped." << endl;
             DisableSubBranches(branch);
             continue;
@@ -551,5 +568,6 @@
 {
     //
-    // This is necessary due to a bug in TCHain::LoadTree in root.
+    // This is necessary due to a bug in TChain::LoadTree in root.
+    // will be fixed in 3.03
     //
     if (fNumEntry >= fNumEntries)
@@ -644,6 +662,5 @@
 void MReadTree::VetoBranch(const char *name)
 {
-    TNamed *branch = new TNamed(name, "");
-    fVetoList->Add(branch);
+    fVetoList->Add(new TNamed(name, ""));
 }
 
Index: trunk/MagicSoft/Mars/mbase/MTask.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MTask.cc	(revision 1115)
+++ trunk/MagicSoft/Mars/mbase/MTask.cc	(revision 1116)
@@ -16,5 +16,5 @@
 !
 !
-!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
+!   Author(s): Thomas Bretz <mailto:tbretz@uni-sw.gwdg.de>, 12/2000
 !
 !   Copyright: MAGIC Software Development, 2000-2001
@@ -113,6 +113,8 @@
 void MTask::AddToBranchList(const char *b)
 {
-    TNamed *name = new TNamed(b, "");
-    fListOfBranches->Add(name);
+    if (fListOfBranches->FindObject(b))
+        return;
+
+    fListOfBranches->Add(new TNamed(b, ""));
 }
 
Index: trunk/MagicSoft/Mars/mbase/MWriteRootFile.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MWriteRootFile.cc	(revision 1115)
+++ trunk/MagicSoft/Mars/mbase/MWriteRootFile.cc	(revision 1116)
@@ -48,6 +48,4 @@
 ClassImp(MWriteRootFile);
 
-#define kFillTree BIT(14)
-
 // --------------------------------------------------------------------------
 //
@@ -315,4 +313,6 @@
 void MWriteRootFile::CheckAndWrite() const
 {
+    const Int_t kFillTree = BIT(14);
+
     TObject *obj;
 
Index: trunk/MagicSoft/Mars/mbase/Makefile
===================================================================
--- trunk/MagicSoft/Mars/mbase/Makefile	(revision 1115)
+++ trunk/MagicSoft/Mars/mbase/Makefile	(revision 1116)
@@ -51,5 +51,4 @@
 	   MArrayS.cc \
            MTime.cc \
-           MHtml.cc \
            MClone.cc \
            MPrint.cc \
