Index: trunk/MagicSoft/Mars/mbase/MArray.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MArray.cc	(revision 1077)
+++ trunk/MagicSoft/Mars/mbase/MArray.cc	(revision 1080)
@@ -16,5 +16,5 @@
 !
 !
-!   Author(s): Thomas Bretz  12/2000 (tbretz@uni-sw.gwdg.de)
+!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
 !
 !   Copyright: MAGIC Software Development, 2000-2001
Index: trunk/MagicSoft/Mars/mbase/MArrayB.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MArrayB.cc	(revision 1077)
+++ trunk/MagicSoft/Mars/mbase/MArrayB.cc	(revision 1080)
@@ -1,3 +1,17 @@
 /* ======================================================================== *\
+!
+! *
+! * 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 (tbretz@uni-sw.gwdg.de)
Index: trunk/MagicSoft/Mars/mbase/MArrayS.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MArrayS.cc	(revision 1077)
+++ trunk/MagicSoft/Mars/mbase/MArrayS.cc	(revision 1080)
@@ -16,5 +16,5 @@
 !
 !
-!   Author(s): Thomas Bretz  12/2000 (tbretz@uni-sw.gwdg.de)
+!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
 !
 !   Copyright: MAGIC Software Development, 2000-2001
Index: trunk/MagicSoft/Mars/mbase/MClone.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MClone.cc	(revision 1077)
+++ trunk/MagicSoft/Mars/mbase/MClone.cc	(revision 1080)
@@ -16,5 +16,5 @@
 !
 !
-!   Author(s): Thomas Bretz  07/2001 (tbretz@uni-sw.gwdg.de)
+!   Author(s): Thomas Bretz  07/2001 <mailto:tbretz@uni-sw.gwdg.de>
 !
 !   Copyright: MAGIC Software Development, 2000-2001
@@ -92,5 +92,6 @@
     Init(name, title);
 
-    fObject = obj;
+    fObject  = obj;
+    fObjName = obj->GetName();
 }
 
@@ -127,5 +128,5 @@
     // If it couldn't get found stop Eventloop
     //
-    *fLog << dbginf << fObjName << " not found... aborting." << endl;
+    *fLog << err << dbginf << fObjName << " not found... aborting." << endl;
     return kFALSE;
 }
Index: trunk/MagicSoft/Mars/mbase/MEvtLoop.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MEvtLoop.cc	(revision 1077)
+++ trunk/MagicSoft/Mars/mbase/MEvtLoop.cc	(revision 1080)
@@ -16,5 +16,5 @@
 !
 !
-!   Author(s): Thomas Bretz  12/2000 (tbretz@uni-sw.gwdg.de)
+!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
 !
 !   Copyright: MAGIC Software Development, 2000-2001
@@ -114,5 +114,5 @@
     if (!fParList)
     {
-        *fLog << dbginf << "Parlist not initialized." << endl;
+        *fLog << err << dbginf << "Parlist not initialized." << endl;
         return kFALSE;
     }
@@ -125,5 +125,5 @@
     if (!fTaskList)
     {
-        *fLog << dbginf << "Cannot find tasklist '" << tlist << "' in parameter list." << endl;
+        *fLog << err << dbginf << "Cannot find tasklist '" << tlist << "' in parameter list." << endl;
         return kFALSE;
     }
@@ -139,5 +139,5 @@
     if (!fTaskList->PreProcess(fParList))
     {
-        *fLog << "Error detected while PreProcessing" << endl;
+        *fLog << err << "Error detected while PreProcessing" << endl;
         return kFALSE;
     }
@@ -159,5 +159,5 @@
     //   each event
     //
-    *fLog << "Eventloop running (";
+    *fLog << all <<"Eventloop running (";
 
     if (maxcnt<0)
@@ -201,4 +201,13 @@
                 fProgress->SetPosition(maxcnt - dummy);
                 gSystem->ProcessEvents();
+
+                // gClient->ProcessEventsFor(fProgress);
+                //
+                // root 3.02:
+                //  * gui/: inc/TGClient.h, src/TGClient.cxx:
+                //        new method ProcessEventsFor(TGWindow *w). Use this method to instead
+                //        of TSystem::ProcessEvents() in case you want to allow on events for
+                //        the specified TGWindow to be processed (like when this is a progress
+                //        meter dialog).
             }
         else
@@ -210,5 +219,5 @@
     clock.Stop();
 
-    *fLog << "Ready!" << endl << endl;
+    *fLog << all << "Ready!" << endl << endl;
 
     clock.Print();
Index: trunk/MagicSoft/Mars/mbase/MFilter.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MFilter.cc	(revision 1077)
+++ trunk/MagicSoft/Mars/mbase/MFilter.cc	(revision 1080)
@@ -16,5 +16,5 @@
 !
 !
-!   Author(s): Thomas Bretz  07/2001 (tbretz@uni-sw.gwdg.de)
+!   Author(s): Thomas Bretz  07/2001 <mailto:tbretz@uni-sw.gwdg.de>
 !
 !   Copyright: MAGIC Software Development, 2000-2001
Index: trunk/MagicSoft/Mars/mbase/MFilterList.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MFilterList.cc	(revision 1077)
+++ trunk/MagicSoft/Mars/mbase/MFilterList.cc	(revision 1080)
@@ -16,5 +16,5 @@
 !
 !
-!   Author(s): Thomas Bretz  07/2001 (tbretz@uni-sw.gwdg.de)
+!   Author(s): Thomas Bretz  07/2001 <mailto:tbretz@uni-sw.gwdg.de>
 !
 !   Copyright: MAGIC Software Development, 2000-2001
@@ -147,5 +147,5 @@
     if (fFilters.FindObject(filter))
     {
-        *fLog << dbginf << "Filter already existing." << endl;
+        *fLog << warn << dbginf << "Filter already existing... skipped." << endl;
         return kTRUE;
     }
@@ -153,9 +153,9 @@
     if (fFilters.FindObject(name))
     {
-        *fLog << dbginf << "'" << name << "' exists in List already." << endl;
-        return kTRUE;
-    }
-
-    *fLog << "Adding " << name << " to " << GetName() << "... " << flush;
+        *fLog << warn << dbginf << "'" << name << "' exists in List already... skipped." << endl;
+        return kTRUE;
+    }
+
+    *fLog << inf << "Adding " << name << " to " << GetName() << "... " << flush;
 
     fFilters.Add(filter);
@@ -237,5 +237,5 @@
     const Bool_t verbose = str.Contains("V", TString::kIgnoreCase);
 
-    *fLog << "(";
+    *fLog << all << "(";
 
     TIter Next(&fFilters);
Index: trunk/MagicSoft/Mars/mbase/MGGroupFrame.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MGGroupFrame.cc	(revision 1077)
+++ trunk/MagicSoft/Mars/mbase/MGGroupFrame.cc	(revision 1080)
@@ -16,5 +16,5 @@
 !
 !
-!   Author(s): Thomas Bretz  11/2001 (tbretz@uni-sw.gwdg.de)
+!   Author(s): Thomas Bretz  11/2001 <mailto:tbretz@uni-sw.gwdg.de>
 !
 !   Copyright: MAGIC Software Development, 2000-2001
Index: trunk/MagicSoft/Mars/mbase/MGList.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MGList.cc	(revision 1077)
+++ trunk/MagicSoft/Mars/mbase/MGList.cc	(revision 1080)
@@ -16,5 +16,5 @@
 !
 !
-!   Author(s): Thomas Bretz  11/2001 (tbretz@uni-sw.gwdg.de)
+!   Author(s): Thomas Bretz  11/2001 <mailto:tbretz@uni-sw.gwdg.de>
 !
 !   Copyright: MAGIC Software Development, 2000-2001
Index: trunk/MagicSoft/Mars/mbase/MGTask.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MGTask.cc	(revision 1077)
+++ trunk/MagicSoft/Mars/mbase/MGTask.cc	(revision 1080)
@@ -16,5 +16,5 @@
 !
 !
-!   Author(s): Thomas Bretz  11/2001 (tbretz@uni-sw.gwdg.de)
+!   Author(s): Thomas Bretz  11/2001 <mailto:tbretz@uni-sw.gwdg.de>
 !
 !   Copyright: MAGIC Software Development, 2000-2001
@@ -36,4 +36,6 @@
 
 #include "MLog.h"
+#include "MLogManip.h"
+
 #include "MGGroupFrame.h"
 
@@ -104,5 +106,5 @@
 {
     fLog->setf(ios::showbase);
-    *fLog << "Task " << GetDescriptor() << " received gui msg " << hex;
+    *fLog << all << "Task " << GetDescriptor() << " received gui msg " << hex;
     *fLog << msg << " " << submsg << " " << param1 << " " << param2 << endl;
     return kTRUE;
@@ -144,5 +146,5 @@
     if (fFrame)
     {
-        *fLog << GetDescriptor() << ": Gui already created... skipped." << endl;
+        *fLog << warn << GetDescriptor() << " Gui already created... skipped." << endl;
         return;
     }
@@ -162,5 +164,5 @@
     if (method->GetClass() == MGTask::Class())
     {
-        *fLog << "Sorry, " << GetDescriptor();
+        *fLog << warn << "Sorry, " << GetDescriptor();
         *fLog << " doesn't override CreateGuiElements." << endl;
         return;
Index: trunk/MagicSoft/Mars/mbase/MGTask.h
===================================================================
--- trunk/MagicSoft/Mars/mbase/MGTask.h	(revision 1077)
+++ trunk/MagicSoft/Mars/mbase/MGTask.h	(revision 1080)
@@ -43,5 +43,5 @@
     virtual Bool_t ProcessMessage(Int_t msg, Int_t submsg, Long_t param1, Long_t param2);
 
-    void CreateGui(TGCompositeFrame *f, TGLayoutHints *layout);
+    void CreateGui(TGCompositeFrame *f, TGLayoutHints *layout=NULL);
 
     ClassDef(MGTask, 0)		//Abstract base class for a task
Index: trunk/MagicSoft/Mars/mbase/MInputStreamID.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MInputStreamID.cc	(revision 1077)
+++ trunk/MagicSoft/Mars/mbase/MInputStreamID.cc	(revision 1080)
@@ -16,5 +16,5 @@
 !
 !
-!   Author(s): Thomas Bretz  12/2000 (tbretz@uni-sw.gwdg.de)
+!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
 !
 !   Copyright: MAGIC Software Development, 2000-2001
Index: trunk/MagicSoft/Mars/mbase/MLog.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MLog.cc	(revision 1077)
+++ trunk/MagicSoft/Mars/mbase/MLog.cc	(revision 1080)
@@ -16,5 +16,5 @@
 !
 !
-!   Author(s): Thomas Bretz  12/2000 (tbretz@uni-sw.gwdg.de)
+!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
 !
 !   Copyright: MAGIC Software Development, 2000-2001
@@ -188,5 +188,8 @@
 int MLog::overflow(int i) // i=EOF means not a real overflow
 {
-    if (fOutputLevel >= fDebugLevel)
+    //
+    // no output if
+    //
+    if (fOutputLevel > fDebugLevel)
         return 0;
 
Index: trunk/MagicSoft/Mars/mbase/MLogManip.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MLogManip.cc	(revision 1077)
+++ trunk/MagicSoft/Mars/mbase/MLogManip.cc	(revision 1080)
@@ -16,5 +16,5 @@
 !
 !
-!   Author(s): Thomas Bretz  12/2000 (tbretz@uni-sw.gwdg.de)
+!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
 !
 !   Copyright: MAGIC Software Development, 2000-2001
Index: trunk/MagicSoft/Mars/mbase/MLogManip.h
===================================================================
--- trunk/MagicSoft/Mars/mbase/MLogManip.h	(revision 1077)
+++ trunk/MagicSoft/Mars/mbase/MLogManip.h	(revision 1080)
@@ -54,4 +54,8 @@
 #ifndef __CINT__
 #define dbginf      __FILE__ << " l." << dec << __LINE__ << ": "
+#define all    debug(0)
+#define err    debug(1)
+#define warn   debug(2)
+#define inf    debug(3)
 #endif
 //
Index: trunk/MagicSoft/Mars/mbase/MParContainer.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MParContainer.cc	(revision 1077)
+++ trunk/MagicSoft/Mars/mbase/MParContainer.cc	(revision 1080)
@@ -16,5 +16,5 @@
 !
 !
-!   Author(s): Thomas Bretz  12/2000 (tbretz@uni-sw.gwdg.de)
+!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
 !
 !   Copyright: MAGIC Software Development, 2000-2001
@@ -42,4 +42,5 @@
 
 #include "MLog.h"
+#include "MLogManip.h"
 
 ClassImp(MParContainer);
@@ -137,6 +138,6 @@
 {
     TROOT::IndentLevel();
-    *fLog <<"OBJ: " << GetDescriptor() << ": " << GetTitle() << ", "
-        << Int_t(TestBit(kCanDelete)) << endl;
+    *fLog << all << GetDescriptor() << " " << GetTitle() << ": kCanDelete=";
+    *fLog << Int_t(TestBit(kCanDelete)) << endl;
 }
 
@@ -147,5 +148,5 @@
 void MParContainer::Print(Option_t *) const
 {
-    *fLog <<"OBJ: " << GetDescriptor() << ": " << GetTitle() << endl;
+    *fLog << all << GetDescriptor() << " " << GetTitle() << endl;
 }
 
@@ -196,13 +197,23 @@
 }
 
+// --------------------------------------------------------------------------
+//
+//  If you want to use Ascii-Input/-Output (eg. MWriteAsciiFile) of a
+//  container, overload this function.
+//
 void MParContainer::AsciiRead(ifstream &fin)
 {
-    *fLog << "To use the the ascii input of " << GetName();
+    *fLog << warn << "To use the the ascii input of " << GetName();
     *fLog << " you have to overload " << ClassName() << "::AsciiRead." << endl;
 }
 
+// --------------------------------------------------------------------------
+//
+//  If you want to use Ascii-Input/-Output (eg. MWriteAsciiFile) of a
+//  container, overload this function.
+//
 void MParContainer::AsciiWrite(ofstream &fout) const
 {
-    *fLog << "To use the the ascii output of " << GetName();
+    *fLog << warn << "To use the the ascii output of " << GetName();
     *fLog << " you have to overload " << ClassName() << "::AsciiWrite." << endl;
 }
Index: trunk/MagicSoft/Mars/mbase/MParList.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MParList.cc	(revision 1077)
+++ trunk/MagicSoft/Mars/mbase/MParList.cc	(revision 1080)
@@ -16,5 +16,5 @@
 !
 !
-!   Author(s): Thomas Bretz  12/2000 (tbretz@uni-sw.gwdg.de)
+!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
 !
 !   Copyright: MAGIC Software Development, 2000-2001
@@ -160,5 +160,5 @@
         if (objt || objn==cont)
         {
-            *fLog << dbginf << "Warning: Container '" << cont->GetName() << ", 0x" << (void*)cont;
+            *fLog << warn << dbginf << "Warning: Container '" << cont->GetName() << ", 0x" << (void*)cont;
             *fLog << "' already existing in '" << GetName() << "'... ignoring." << endl;
             return kTRUE;
@@ -168,5 +168,5 @@
         // Otherwise add it to the list, but print a warning message
         //
-        *fLog << dbginf << "Warning: Container with the same name '" << cont->GetName();
+        *fLog << warn << dbginf << "Warning: Container with the same name '" << cont->GetName();
         *fLog << "' already existing in '" << GetName() << "'." << endl;
         *fLog << "You may not be able to get a pointer to container task by name." << endl;
@@ -186,5 +186,5 @@
     }
 
-    *fLog << "Adding " << name << " to " << GetName() << "... " << flush;
+    *fLog << inf << "Adding " << name << " to " << GetName() << "... " << flush;
 
     fContainer->Add(cont);
@@ -328,5 +328,5 @@
     // if object is not existing in the list try to create one
     //
-    *fLog << "Object '" << oname << "' [" << cname << "] not yet in " << GetName() << "... creating." << endl;
+    *fLog << inf << "Object '" << oname << "' [" << cname << "] not yet in " << GetName() << "... creating." << endl;
 
     //
@@ -340,5 +340,5 @@
         // if class is not existing in the root environment
         //
-        *fLog << dbginf << "Class '" << cname << "' not existing in dictionary." << endl;
+        *fLog << err << dbginf << "Class '" << cname << "' not existing in dictionary." << endl;
         return NULL;
     }
@@ -378,5 +378,10 @@
 void MParList::Print(Option_t *t) const
 {
-    *fLog << dbginf << "ParList: " << GetName() << " <" << GetTitle() << ">" << endl;
+    *fLog << all << GetDescriptor() << endl;
+    *fLog << setfill('-') << setw(strlen(GetDescriptor())+2) << "" << endl;
+    MParContainer *obj = NULL;
+    TIter Next(fContainer);
+    while ((obj=(MParContainer*)Next()))
+        *fLog << " " << obj->GetDescriptor() << endl;
     *fLog << endl;
 }
@@ -416,5 +421,5 @@
     if (first>0 && last<first)
     {
-        *fLog << dbginf << "Cannot create entries backwards (last<first)...skipped." << endl;
+        *fLog << err << dbginf << "Cannot create entries backwards (last<first)...skipped." << endl;
         return list;
     }
@@ -462,5 +467,5 @@
     if (first>0 && last<first)
     {
-        *fLog << dbginf << "Cannot create entries backwards (last<first)...skipped." << endl;
+        *fLog << err << dbginf << "Cannot create entries backwards (last<first)...skipped." << endl;
         return list;
     }
@@ -513,5 +518,5 @@
     if (first>0 && last<first)
     {
-        gLog << dbginf << "Cannot create entries backwards (last<first)...skipped." << endl;
+        gLog << err << dbginf << "Cannot create entries backwards (last<first)...skipped." << endl;
         return list;
     }
Index: trunk/MagicSoft/Mars/mbase/MPrint.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MPrint.cc	(revision 1077)
+++ trunk/MagicSoft/Mars/mbase/MPrint.cc	(revision 1080)
@@ -16,5 +16,5 @@
 !
 !
-!   Author(s): Thomas Bretz  10/2001 (tbretz@uni-sw.gwdg.de)
+!   Author(s): Thomas Bretz  10/2001 <mailto:tbretz@uni-sw.gwdg.de>
 !
 !   Copyright: MAGIC Software Development, 2000-2001
@@ -91,5 +91,6 @@
     SetOption(option);
 
-    fObject = obj;
+    fObject  = obj;
+    fObjName = obj->GetName();
 }
 
@@ -117,5 +118,5 @@
     // If it couldn't get found stop Eventloop
     //
-    *fLog << dbginf << fObjName << " not found... aborting." << endl;
+    *fLog << err << dbginf << fObjName << " not found... aborting." << endl;
     return kFALSE;
 }
Index: trunk/MagicSoft/Mars/mbase/MReadMarsFile.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MReadMarsFile.cc	(revision 1077)
+++ trunk/MagicSoft/Mars/mbase/MReadMarsFile.cc	(revision 1080)
@@ -16,5 +16,5 @@
 !
 !
-!   Author(s): Thomas Bretz  12/2000 (tbretz@uni-sw.gwdg.de)
+!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
 !
 !   Copyright: MAGIC Software Development, 2000-2001
@@ -37,4 +37,5 @@
 
 #include "MLog.h"
+#include "MLogManip.h"
 
 ClassImp(MReadMarsFile);
@@ -101,5 +102,5 @@
         return kTRUE;
 
-    *fLog << "MReadMarsFile: Switching to next file '" << GetFileName() << "' ";
+    *fLog << inf << "MReadMarsFile: Switching to next file '" << GetFileName() << "' ";
     *fLog << "(before Event #" << GetEventNum()-1 << ")" << endl;
     fRun->Process();
Index: trunk/MagicSoft/Mars/mbase/MReadTree.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MReadTree.cc	(revision 1077)
+++ trunk/MagicSoft/Mars/mbase/MReadTree.cc	(revision 1080)
@@ -16,5 +16,5 @@
 !
 !
-!   Author(s): Thomas Bretz  12/2000 (tbretz@uni-sw.gwdg.de)
+!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
 !
 !   Copyright: MAGIC Software Development, 2000-2001
@@ -63,4 +63,5 @@
 
 #include "MTime.h"
+#include "MFilter.h"
 #include "MParList.h"
 #include "MTaskList.h"
@@ -86,8 +87,8 @@
     fTitle = title ? title : "Task to loop over all events in one single tree";
 
-    fVetoList = new TOrdCollection;
+    fVetoList = new TList;
     fVetoList->SetOwner();
 
-    fNotify = new TOrdCollection;
+    fNotify = new TList;
 
     //
@@ -96,4 +97,9 @@
     fChain = new TChain(tname);
     fChain->SetNotify(this);
+
+    // root 3.02:
+    // In TChain::Addfile remove the limitation that the file name must contain
+    // the string ".root". ".root" is necessary only in case one wants to specify
+    // a Tree in a subdirectory of a Root file with eg, the format:
 
     if (fname)
@@ -183,5 +189,5 @@
         return;
 
-    *fLog << "Branch choosing method enabled (only enabled branches are read)." << endl;
+    *fLog << inf << "Branch choosing method enabled (only enabled branches are read)." << endl;
     fChain->SetBranchStatus("*", kFALSE);
     fBranchChoosing = kTRUE;
@@ -223,5 +229,5 @@
     //
     fChain->SetBranchStatus(name, status);
-    *fLog << (status ? "Enabled" : "Disabled");
+    *fLog << inf << (status ? "Enabled" : "Disabled");
     *fLog << " subbranch '" << name << "'." << endl;
 }
@@ -231,5 +237,5 @@
 // Set the status of all branches in the list to status.
 //
-void MReadTree::SetBranchStatus(const TOrdCollection *list, Bool_t status)
+void MReadTree::SetBranchStatus(const TList *list, Bool_t status)
 {
     //
@@ -247,8 +253,9 @@
 //  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
+//  This function loops over all tasks and its filters in the tasklist
+//  and enables all branches which are requested by the tasks and its
+//  filters.
+//
+//  To enable 'unknown' branches which are not in the branchlist of
 //  the tasks you can call EnableBranch
 //
@@ -267,15 +274,22 @@
     if (!tlist)
     {
-        *fLog << "Cannot use auto enabeling scheme for branches. 'MTaskList' not found." << endl;
+        *fLog << warn << "Cannot use auto enabeling scheme for branches. 'MTaskList' not found." << endl;
         return;
     }
 
     //
-    // Loop over all tasks in the task list.
+    // 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);
+
+    }
 }
 
@@ -317,5 +331,5 @@
     if (!fNumEntries)
     {
-        *fLog << dbginf << "No entries found in file(s)." << endl;
+        *fLog << warn << dbginf << "No entries found in file(s)." << endl;
         return kFALSE;
     }
@@ -324,5 +338,5 @@
     // output logging information
     //
-    *fLog << fNumEntries << " entries found in file(s)." << endl;
+    *fLog << inf << fNumEntries << " entries found in file(s)." << endl;
 
     //
@@ -354,5 +368,5 @@
         if (fVetoList->FindObject(oname))
         {
-            *fLog << "Master branch " << bname << " has veto... skipped." << endl;
+            *fLog << inf << "Master branch " << bname << " has veto... skipped." << endl;
             DisableSubBranches(branch);
             continue;
@@ -377,5 +391,5 @@
             // we cannot proceed reading this branch
             //
-            *fLog << dbginf << "Warning: Class '" << oname << "' not existing in dictionary. Branch skipped." << endl;
+            *fLog << warn << dbginf << "Warning: Class '" << oname << "' not existing in dictionary. Branch skipped." << endl;
             DisableSubBranches(branch);
             continue;
@@ -387,5 +401,5 @@
         //
         fChain->SetBranchAddress(bname, pcont);
-        *fLog << "Master branch address " << bname << " setup for reading." << endl;
+        *fLog << inf << "Master branch address " << bname << " setup for reading." << endl;
 
         //*fLog << "Branch " << bname << " autodel: " << (int)branch->IsAutoDelete() << endl;
@@ -395,5 +409,5 @@
     }
 
-    *fLog << "MReadTree setup " << num << " master branches addresses." << endl;
+    *fLog << inf << "MReadTree setup " << num << " master branches addresses." << endl;
 
     //
@@ -410,4 +424,45 @@
 
     return kTRUE;
+}
+
+// --------------------------------------------------------------------------
+//
+//  Set the ready to save flag of all containers which branchaddresses are
+//  set for. This is necessary to copy data.
+//
+void MReadTree::SetReadyToSave(Bool_t flag)
+{
+    TIter Next(fChain->GetStatus());
+
+    TChainElement *element = NULL;
+    while ((element=(TChainElement*)Next()))
+    {
+        //
+        // Check whether the branch is enabled
+        //
+        if (!element->GetStatus())
+            continue;
+
+        //
+        // Get the pointer to the pointer of the corresponding container
+        //
+        MParContainer **pcont = (MParContainer**)element->GetBaddress();
+
+        //
+        // Check whether the pointer is not NULL
+        //
+        if (!pcont || !*pcont)
+            continue;
+
+        //
+        // Set the ready to save status of the container.
+        //
+        (*pcont)->SetReadyToSave(flag);
+    }
+
+    //
+    // Set the ready to save status of this task (used?), too
+    //
+    MTask::SetReadyToSave(flag);
 }
 
@@ -421,4 +476,5 @@
 Bool_t MReadTree::Process()
 {
+    SetReadyToSave();
     return fChain->GetEntry(fNumEntry++) != 0;
 }
@@ -430,4 +486,5 @@
 Bool_t MReadTree::GetEvent()
 {
+    SetReadyToSave();
     return fChain->GetEntry(fNumEntry) != 0;
 }
@@ -442,5 +499,5 @@
     if (fNumEntry-dec >= fNumEntries)
     {
-        *fLog << "MReadTree::DecEventNum: WARNING - Event " << fNumEntry << "-";
+        *fLog << warn << "MReadTree::DecEventNum: WARNING - Event " << fNumEntry << "-";
         *fLog << dec << "=" << (Int_t)fNumEntry-dec << " out of Range." << endl;
         return kFALSE;
@@ -460,5 +517,5 @@
     if (fNumEntry+inc >= fNumEntries)
     {
-        *fLog << "MReadTree::IncEventNum: WARNING - Event " << fNumEntry << "+";
+        *fLog << warn << "MReadTree::IncEventNum: WARNING - Event " << fNumEntry << "+";
         *fLog << inc << "=" << (Int_t)fNumEntry+inc << " out of Range." << endl;
         return kFALSE;
@@ -480,5 +537,5 @@
     if (nr >= fNumEntries)
     {
-        *fLog << "MReadTree::SetEventNum: WARNING - " << nr << " out of Range." << endl;
+        *fLog << warn << "MReadTree::SetEventNum: WARNING - " << nr << " out of Range." << endl;
         return kFALSE;
     }
@@ -522,2 +579,18 @@
     fNotify->Add(obj);
 }
+
+void MReadTree::Print(Option_t *o) const
+{
+    *fLog << all << GetDescriptor() << dec << endl;
+    *fLog << setfill('-') << setw(strlen(GetDescriptor())) << "" << endl;
+    *fLog << " Files:" << endl;
+
+    int i = 0;
+    TIter Next(fChain->GetListOfFiles());
+    TObject *obj = NULL;
+    while ((obj=Next()))
+        *fLog << " " << i++ << ") " << obj->GetName() << endl;
+
+    *fLog << " Entries: " << fNumEntries << endl;
+    *fLog << " Next Entry: " << fNumEntry << endl;
+}
Index: trunk/MagicSoft/Mars/mbase/MTaskList.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MTaskList.cc	(revision 1077)
+++ trunk/MagicSoft/Mars/mbase/MTaskList.cc	(revision 1080)
@@ -16,5 +16,5 @@
 !
 !
-!   Author(s): Thomas Bretz  12/2000 (tbretz@uni-sw.gwdg.de)
+!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
 !
 !   Copyright: MAGIC Software Development, 2000-2001
@@ -43,4 +43,14 @@
 // from the list.                                                          //
 //                                                                         //
+// Warning:                                                                //
+//  Be carefull if you are writing your tasklist                           //
+//  (eg. MWriteRootFile("file.root", "MTaskList")) to a file. You may      //
+//  not be able to initialize a new working tasklist from a file if        //
+//   a) Two Paramerer containers with the same names are existing in the   //
+//      MParList.                                                          //
+//   b) You used a container somewhere which is not part of MParList.      //
+//      (eg. You specified a pointer to a MH container in MFillH which is  //
+//      not added to the parameter list.                                   //
+//                                                                         //
 /////////////////////////////////////////////////////////////////////////////
 
@@ -68,5 +78,5 @@
     fTitle = title ? title : "A list for tasks to be executed";
 
-    fTasks = new TOrdCollection;
+    fTasks = new TList; //OrdCollection;
 }
 
@@ -151,5 +161,5 @@
         if (objt || objn==task)
         {
-            *fLog << dbginf << "Warning: Task '" << task->GetName() << ", 0x" << (void*)task;
+            *fLog << warn << dbginf << "Warning: Task '" << task->GetName() << ", 0x" << (void*)task;
             *fLog << "' already existing in '" << GetName() << "'... ignoring." << endl;
             return kTRUE;
@@ -159,5 +169,5 @@
         // Otherwise add it to the list, but print a warning message
         //
-        *fLog << dbginf << "Warning: Task '" << task->GetName();
+        *fLog << warn << dbginf << "Warning: Task '" << task->GetName();
         *fLog << "' already existing in '" << GetName() << "'." << endl;
         *fLog << "You may not be able to get a pointer to this task by name." << endl;
@@ -168,10 +178,10 @@
         if (!fTasks->FindObject(where))
         {
-            *fLog << dbginf << "Error: Cannot find task after which the new task should be scheduled!" << endl;
+            *fLog << err << dbginf << "Error: Cannot find task after which the new task should be scheduled!" << endl;
             return kFALSE;
         }
     }
 
-    *fLog << "Adding " << name << " to " << GetName() << " for " << type << "... " << flush;
+    *fLog << inf << "Adding " << name << " to " << GetName() << " for " << type << "... " << flush;
 
     task->SetStreamId(type);
@@ -208,5 +218,5 @@
 Bool_t MTaskList::PreProcess(MParList *pList)
 { 
-    *fLog << "Preprocessing... " << flush;
+    *fLog << all << "Preprocessing... " << flush;
 
     fParList = pList;
@@ -224,5 +234,5 @@
     while ((task=(MTask*)Next()))
     {
-        *fLog << task->GetName() << "... " << flush;
+        *fLog << all << task->GetName() << "... " << flush;
 
         if (!task->CallPreProcess(fParList))
@@ -297,5 +307,5 @@
 
         default:
-            *fLog << "MTaskList::Process: Unknown return value from MTask::Process()... ignored." << endl;
+            *fLog << warn << "MTaskList::Process: Unknown return value from MTask::Process()... ignored." << endl;
         }
     }
@@ -310,5 +320,5 @@
 Bool_t MTaskList::PostProcess()
 {
-    *fLog << "Postprocessing... " << flush;
+    *fLog << all << "Postprocessing... " << flush;
 
     //
@@ -338,8 +348,8 @@
             return kFALSE;
 
-        *fLog << task->GetName() << "... " << flush;
-    }
-
-    *fLog << endl;
+        *fLog << all << task->GetName() << "... " << flush;
+    }
+
+    *fLog << all << endl;
 
     return kTRUE;
@@ -357,5 +367,5 @@
     if (lvl==0)
     {
-        *fLog << endl;
+        *fLog << all << endl;
         *fLog << "Execution Statistics: " << endl;
         *fLog << "---------------------" << endl;
@@ -379,5 +389,7 @@
 void MTaskList::Print(Option_t *t) const
 {
-    *fLog << GetDescriptor() << " <" << GetTitle() << ">" << endl;
+    *fLog << all << endl;
+    *fLog << GetDescriptor() << endl;
+    *fLog << setfill('-') << setw(strlen(GetDescriptor())) << "" << endl;
 
     fTasks->Print();
Index: trunk/MagicSoft/Mars/mbase/MTime.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MTime.cc	(revision 1077)
+++ trunk/MagicSoft/Mars/mbase/MTime.cc	(revision 1080)
@@ -16,5 +16,5 @@
 !
 !
-!   Author(s): Thomas Bretz  12/2000 (tbretz@uni-sw.gwdg.de)
+!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@uni-sw.gwdg.de>
 !
 !   Copyright: MAGIC Software Development, 2000-2001
Index: trunk/MagicSoft/Mars/mbase/MWriteAsciiFile.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MWriteAsciiFile.cc	(revision 1077)
+++ trunk/MagicSoft/Mars/mbase/MWriteAsciiFile.cc	(revision 1080)
@@ -16,5 +16,5 @@
 !
 !
-!   Author(s): Thomas Bretz  06/2001 (tbretz@uni-sw.gwdg.de)
+!   Author(s): Thomas Bretz  06/2001 <mailto:tbretz@uni-sw.gwdg.de>
 !
 !   Copyright: MAGIC Software Development, 2000-2001
@@ -142,5 +142,5 @@
         return kTRUE;
 
-    *fLog << dbginf << "Cannot find parameter container '" << fContainer << "'." << endl;
+    *fLog << err << dbginf << "Cannot find parameter container '" << fContainer << "'." << endl;
     return kFALSE;
 }
Index: trunk/MagicSoft/Mars/mbase/MWriteFile.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MWriteFile.cc	(revision 1077)
+++ trunk/MagicSoft/Mars/mbase/MWriteFile.cc	(revision 1080)
@@ -16,5 +16,5 @@
 !
 !
-!   Author(s): Thomas Bretz  06/2001 (tbretz@uni-sw.gwdg.de)
+!   Author(s): Thomas Bretz  06/2001 <mailto:tbretz@uni-sw.gwdg.de>
 !
 !   Copyright: MAGIC Software Development, 2000-2001
@@ -62,9 +62,9 @@
     if (!IsFileOpen())
     {
-        *fLog << dbginf << "Cannot open file '" << GetFileName() << "'" << endl;
+        *fLog << err << dbginf << "Cannot open file '" << GetFileName() << "'" << endl;
         return kFALSE;
     }
 
-    *fLog << "File '" << GetFileName() << "' open for writing." << endl;
+    *fLog << inf << "File '" << GetFileName() << "' open for writing." << endl;
 
     //
Index: trunk/MagicSoft/Mars/mbase/MWriteRootFile.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MWriteRootFile.cc	(revision 1077)
+++ trunk/MagicSoft/Mars/mbase/MWriteRootFile.cc	(revision 1080)
@@ -16,5 +16,5 @@
 !
 !
-!   Author(s): Thomas Bretz  06/2001 (tbretz@uni-sw.gwdg.de)
+!   Author(s): Thomas Bretz  06/2001 <mailto:tbretz@uni-sw.gwdg.de>
 !
 !   Copyright: MAGIC Software Development, 2000-2001
@@ -31,4 +31,6 @@
 // To understand how it works, see base class MWriteFile                   //
 //                                                                         //
+// Warning: Checkout the Warning in MTaskList.                             //
+//                                                                         //
 /////////////////////////////////////////////////////////////////////////////
 
@@ -116,6 +118,6 @@
 void MWriteRootFile::Print(Option_t *) const
 {
-    cout << "File: " << GetFileName() << dec << endl;
-    cout << "--------------------------------------------------" << endl;
+    cout << all << " File: " << GetFileName() << endl;
+    cout << setfill('-') << setw(strlen(GetFileName())+8) << "" << endl;
 
     TTree *t;
