Index: trunk/MagicSoft/Mars/mbase/MAGIC.h
===================================================================
--- trunk/MagicSoft/Mars/mbase/MAGIC.h	(revision 608)
+++ trunk/MagicSoft/Mars/mbase/MAGIC.h	(revision 609)
@@ -34,6 +34,10 @@
 // default pipes all output to the stdout
 //
+
+//This will be fixed soon. It doesn't work with Alphas at the moment
 class MLog;
+#ifndef __CINT__
 extern MLog gLog;
+#endif
 
 #endif
Index: trunk/MagicSoft/Mars/mbase/MLog.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MLog.cc	(revision 608)
+++ trunk/MagicSoft/Mars/mbase/MLog.cc	(revision 609)
@@ -46,5 +46,5 @@
 }
 
-void MLog::Write()
+void MLog::WriteBuffer()
 {
     const int len = fPPtr - fBase;
@@ -76,5 +76,5 @@
 {
 //    cout << "*sync*";
-    Write();
+    WriteBuffer();
 
     if (fDevice&eStdout)
@@ -100,11 +100,11 @@
     // If the buffer is not really filled i is EOF(-1).
     //
-    if (fOutputLevel < fDebugLevel)
-    {
-        *fPPtr++ = (char)i;
+    if (fOutputLevel >= fDebugLevel)
+        return 0;
 
-        if (fPPtr == fEPtr)
-            Write();
-    }
+    *fPPtr++ = (char)i;
+
+    if (fPPtr == fEPtr)
+        WriteBuffer();
 
     return 0;
Index: trunk/MagicSoft/Mars/mbase/MLog.h
===================================================================
--- trunk/MagicSoft/Mars/mbase/MLog.h	(revision 608)
+++ trunk/MagicSoft/Mars/mbase/MLog.h	(revision 609)
@@ -36,5 +36,5 @@
     void Init();
 
-    void Write();
+    void WriteBuffer();
     int sync();
     int overflow(int i); // i=EOF means not a real overflow
Index: trunk/MagicSoft/Mars/mbase/MParContainer.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MParContainer.cc	(revision 608)
+++ trunk/MagicSoft/Mars/mbase/MParContainer.cc	(revision 609)
@@ -13,9 +13,9 @@
 #include "MParContainer.h"
 
-#include <iostream.h>    // cout
-
 #include <TClass.h>      // IsA
 #include <TROOT.h>       // TROOT::Identlevel
 #include <TVirtualPad.h> // gPad
+
+#include "MLog.h"
 
 ClassImp(MParContainer)
@@ -78,5 +78,5 @@
 
    TROOT::IndentLevel();
-   cout <<"OBJ: " << IsA()->GetName() << "\t" << GetName() << "\t" << GetTitle() << " : "
+   *fLog <<"OBJ: " << IsA()->GetName() << "\t" << GetName() << "\t" << GetTitle() << " : "
         << Int_t(TestBit(kCanDelete)) << endl;
 }
@@ -87,5 +87,5 @@
    // Print MParContainer name and title.
 
-   cout <<"OBJ: " << IsA()->GetName() << "\t" << GetName() << "\t" << GetTitle() << endl;
+   *fLog <<"OBJ: " << IsA()->GetName() << "\t" << GetName() << "\t" << GetTitle() << endl;
 }
 
Index: trunk/MagicSoft/Mars/mbase/MParContainer.h
===================================================================
--- trunk/MagicSoft/Mars/mbase/MParContainer.h	(revision 608)
+++ trunk/MagicSoft/Mars/mbase/MParContainer.h	(revision 609)
@@ -20,5 +20,4 @@
 #endif
 
-class MLog;
 class ofstream;
 class ifstream;
Index: trunk/MagicSoft/Mars/mbase/MParList.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MParList.cc	(revision 608)
+++ trunk/MagicSoft/Mars/mbase/MParList.cc	(revision 609)
@@ -15,10 +15,9 @@
 //                                                                         //
 /////////////////////////////////////////////////////////////////////////////
-
 #include "MParList.h"
 
 #include <TNamed.h>
 
-#include "MParContainer.h"
+#include "MLog.h"
 
 ClassImp(MParList)
@@ -57,5 +56,5 @@
         cont->SetLogStream(log);
 
-//    SetLogStream(log);
+    MParContainer::SetLogStream(log);
 }
 
@@ -74,5 +73,5 @@
   if (!obj) return kTRUE;
 
-  cout << "Adding " << obj->GetName() << " to " << GetName() << "... " << flush;
+  *fLog << "Adding " << obj->GetName() << " to " << GetName() << "... " << flush;
   //
   //  check if it is in the list yet
@@ -80,5 +79,5 @@
   if (fContainer.FindObject(obj))
   {
-      cout << "WARNING: MParList::add: Container already added" << endl;
+      *fLog << "WARNING: MParList::add: Container already added" << endl;
       return kTRUE;
   }
@@ -92,5 +91,5 @@
       if (!fContainer.FindObject(where))
       {
-          cout << "ERROR: MParList::add: Cannot find parameter container after which the new one should be added!" << endl;
+          *fLog << "ERROR: MParList::add: Cannot find parameter container after which the new one should be added!" << endl;
           return kFALSE;
       }
@@ -98,5 +97,5 @@
 
   fContainer.Add(obj);
-  cout << "Done." << endl;
+  *fLog << "Done." << endl;
 
   return kTRUE;
@@ -118,6 +117,6 @@
   //   print some information about the current status of MParList
   //
-  cout << "ParList: " << this->GetName() << " <" << this->GetTitle() << ">" << endl;
-  cout << endl;
+  *fLog << "ParList: " << this->GetName() << " <" << this->GetTitle() << ">" << endl;
+  *fLog << endl;
   
 }
Index: trunk/MagicSoft/Mars/mbase/MParList.h
===================================================================
--- trunk/MagicSoft/Mars/mbase/MParList.h	(revision 608)
+++ trunk/MagicSoft/Mars/mbase/MParList.h	(revision 609)
@@ -14,14 +14,14 @@
 #endif
 
-#include <iostream.h>
-
 #ifndef ROOT_TOrdCollection
 #include "TOrdCollection.h"
 #endif
+#ifndef MPARCONTAINER_H
+#include "MParContainer.h"
+#endif
 
 class MLog;
-class MParContainer;
 
-class MParList : public TObject
+class MParList : public MParContainer
 {
 private:
Index: trunk/MagicSoft/Mars/mbase/MReadTree.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MReadTree.cc	(revision 608)
+++ trunk/MagicSoft/Mars/mbase/MReadTree.cc	(revision 609)
@@ -15,5 +15,4 @@
 #include "MReadTree.h"
 
-#include <iostream.h>
 #include <fstream.h>
 
@@ -22,4 +21,5 @@
 #include <TObjArray.h>
 
+#include "MLog.h"
 #include "MTime.h"
 #include "MParList.h"
@@ -49,6 +49,6 @@
     if (!fFile->IsOpen())
     {
-        cout << "MReadTree::PreProcess: ERROR: Cannot open file '";
-        cout << fFileName << "'" << endl;
+        *fLog << "MReadTree::PreProcess: ERROR: Cannot open file '";
+        *fLog << fFileName << "'" << endl;
         return kFALSE;
     }
@@ -58,6 +58,6 @@
     if (!fTree)
     {
-        cout << "MReadTree::PreProcess: ERROR: Cannot open tree '";
-        cout << fTreeName << "'" << endl;
+        *fLog << "MReadTree::PreProcess: ERROR: Cannot open tree '";
+        *fLog << fTreeName << "'" << endl;
         return kFALSE;
     }
@@ -66,6 +66,6 @@
     fNumEntry   = 0;
 
-    cout << "File: '" << fFileName << "'  Tree: '" << fTreeName;
-    cout << "' with " << fNumEntries << " Entries opened." << endl;
+    *fLog << "File: '" << fFileName << "'  Tree: '" << fTreeName;
+    *fLog << "' with " << fNumEntries << " Entries opened." << endl;
 
     //
@@ -96,5 +96,5 @@
             // if object is not existing in the list try to create one
             //
-            cout << "MReadTree::PreProcess - WARNING: '" << name << "' not found... creating." << endl;
+            *fLog << "MReadTree::PreProcess - WARNING: '" << name << "' not found... creating." << endl;
 
             //
@@ -109,5 +109,5 @@
                 // we cannot proceed reading this branch
                 //
-                cout << "MReadTree::PreProcess - Warning: Class '" << name << "' not existing in dictionary. Branch skipped." << endl;
+                *fLog << "MReadTree::PreProcess - Warning: Class '" << name << "' not existing in dictionary. Branch skipped." << endl;
                 continue;
             }
@@ -117,5 +117,5 @@
             //
             pcont = (MParContainer*)cls->New();
-            cout << pcont << endl;
+            *fLog << pcont << endl;
             pList->AddToList(pcont);
         }
@@ -180,5 +180,5 @@
     if (fNumEntry < dec/*+1*/)
     {
-        cout << "MReadTree::SetPrevEvent: WARNING: " << fNumEntry/*-1*/ << "-" << dec << " out of Range." << endl;
+        *fLog << "MReadTree::SetPrevEvent: WARNING: " << fNumEntry/*-1*/ << "-" << dec << " out of Range." << endl;
         return kFALSE;
     }
@@ -203,5 +203,5 @@
     if (fNumEntry+inc/*-1*/ >= fNumEntries)
     {
-        cout << "MReadTree::SkipEvents: WARNING: " << fNumEntry/*-1*/ << "+" << inc << " out of Range." << endl;
+        *fLog << "MReadTree::SkipEvents: WARNING: " << fNumEntry/*-1*/ << "+" << inc << " out of Range." << endl;
         return kFALSE;
     }
@@ -218,5 +218,5 @@
     if (nr>=fNumEntries)
     {
-        cout << "MReadTree::SetEventNum: WARNING: " << nr << " out of Range." << endl;
+        *fLog << "MReadTree::SetEventNum: WARNING: " << nr << " out of Range." << endl;
         return kFALSE;
     }
Index: trunk/MagicSoft/Mars/mbase/MTask.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MTask.cc	(revision 608)
+++ trunk/MagicSoft/Mars/mbase/MTask.cc	(revision 609)
@@ -37,41 +37,37 @@
 #include "MTask.h"
 
-#include <string.h>
-#include <iostream.h>
-
 ClassImp(MTask)
 
 Bool_t MTask::PreProcess( MParList *pList )
 {
-  //
-  // This is processed before the eventloop starts
-  // 
-  // It is the job of the PreProcess to connect the tasks
-  // with the right container in the parameter list. 
-  //
-  // the virtual implementation returns kTRUE
-  //
-  return kTRUE; 
+    //
+    // This is processed before the eventloop starts
+    //
+    // It is the job of the PreProcess to connect the tasks
+    // with the right container in the parameter list.
+    //
+    // the virtual implementation returns kTRUE
+    //
+    return kTRUE;
 }
-
 
 Bool_t MTask::Process()
 {
-  //
-  // This is processed for every event in the eventloop 
-  //
-  // the virtual implementation returns kTRUE
-  //
-  return kTRUE;
+    //
+    // This is processed for every event in the eventloop
+    //
+    // the virtual implementation returns kTRUE
+    //
+    return kTRUE;
 }
 
 Bool_t MTask::PostProcess()
 {
-  //
-  // This is processed after the eventloop starts
-  //
-  // the virtual implementation returns kTRUE
-  //
-  return kTRUE;
+    //
+    // This is processed after the eventloop starts
+    //
+    // the virtual implementation returns kTRUE
+    //
+    return kTRUE;
 }
 
Index: trunk/MagicSoft/Mars/mbase/MTask.h
===================================================================
--- trunk/MagicSoft/Mars/mbase/MTask.h	(revision 608)
+++ trunk/MagicSoft/Mars/mbase/MTask.h	(revision 609)
@@ -18,6 +18,4 @@
 class MTask : public MInputStreamID
 {
-    MLog *fLog; //!
-
 public:
     ~MTask()
Index: trunk/MagicSoft/Mars/mbase/MTaskList.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MTaskList.cc	(revision 608)
+++ trunk/MagicSoft/Mars/mbase/MTaskList.cc	(revision 609)
@@ -9,6 +9,5 @@
 #include "MTaskList.h"
 
-#include <iostream.h>
-
+#include "MLog.h"
 #include "MParList.h"
 #include "MInputStreamID.h"
@@ -56,5 +55,5 @@
         task->SetLogStream(log);
 
-//    SetLogStream(log);
+    MParContainer::SetLogStream(log);
 }
 
@@ -73,5 +72,5 @@
     if (fTasks.FindObject(task))
     {
-        cout << "WARNING: MTaskList::AddToList: Task already existing." << endl;
+        *fLog << "WARNING: MTaskList::AddToList: Task already existing." << endl;
         return kTRUE;
     }
@@ -79,5 +78,5 @@
     if (fTasks.FindObject(name))
     {
-        cout << "WARNING: MTaskList::AddToList: '" << name << "' exists in List already." << endl;
+        *fLog << "WARNING: MTaskList::AddToList: '" << name << "' exists in List already." << endl;
         return kTRUE;
     }
@@ -92,10 +91,10 @@
     }
 
-    cout << "Adding " << name << " to " << GetName() << " for " << type << "... " << flush;
+    *fLog << "Adding " << name << " to " << GetName() << " for " << type << "... " << flush;
 
     task->SetStreamId(type);
     fTasks.Add(task);
 
-    cout << "Done." << endl;
+    *fLog << "Done." << endl;
 
     return kTRUE;
@@ -108,5 +107,5 @@
     // do pre processing (before eventloop) of all tasks in the task-list
     //
-    cout << "Preprocessing... " << flush;
+    *fLog << "Preprocessing... " << flush;
 
     //
@@ -122,5 +121,5 @@
     while ( (task=(MTask*)Next()) )
     {
-        cout << task->GetName() << "... " << flush;
+        *fLog << task->GetName() << "... " << flush;
 
         if (!task->PreProcess( pList ))
@@ -128,5 +127,5 @@
     }
 
-    cout << endl;
+    *fLog << endl;
 
     return kTRUE;
@@ -184,5 +183,5 @@
   //
 
-    cout << "Postprocessing... " << flush;
+    *fLog << "Postprocessing... " << flush;
 
   //
@@ -198,5 +197,5 @@
   while ( (task=(MTask*)Next()) )
   {
-      cout << task->GetName() << "... " << flush;
+      *fLog << task->GetName() << "... " << flush;
 
       if (!task->PostProcess())
@@ -204,5 +203,5 @@
   }
 
-  cout << endl;
+  *fLog << endl;
 
   return kTRUE;
@@ -213,9 +212,9 @@
 void MTaskList::Print(Option_t *t)
 {
-  cout << "TaskList: " << this->GetName() << " <" <<  this->GetTitle() << ">" << endl;
+  *fLog << "TaskList: " << this->GetName() << " <" <<  this->GetTitle() << ">" << endl;
   
   fTasks.Print();
 
-  cout << endl;
-}
-
+  *fLog << endl;
+}
+
Index: trunk/MagicSoft/Mars/mbase/MTaskList.h
===================================================================
--- trunk/MagicSoft/Mars/mbase/MTaskList.h	(revision 608)
+++ trunk/MagicSoft/Mars/mbase/MTaskList.h	(revision 609)
@@ -26,5 +26,4 @@
     TOrdCollection fTasks;	// Container for the ordered list of different tasks
 
-
 public:
     MTaskList(const char *title=NULL);
Index: trunk/MagicSoft/Mars/mbase/MTime.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MTime.cc	(revision 608)
+++ trunk/MagicSoft/Mars/mbase/MTime.cc	(revision 609)
@@ -9,39 +9,16 @@
 #include "MTime.h"
 
-#include <iostream.h>
 #include <iomanip.h>
+
+#include "MLog.h"
 
 ClassImp(MTime)
 
 void MTime::Print(Option_t *)
-{ 
-    cout << "MTime Information:  " << hex
-        << " 0x" <<setfill('0') << setw(2) << fTimeStamp[0]
-        << " 0x" <<setfill('0') << setw(2) << fTimeStamp[1] << endl << endl;
+{
+    fLog->setf(ios::showbase);
+    *fLog << "MTime Information:  " << hex 
+        << " " <<setfill('0') << setw(2) << fTimeStamp[0]
+        << " " <<setfill('0') << setw(2) << fTimeStamp[1] << endl << endl;
 } 
-    /*
-inline Bool_t operator<(MTime &t1, MTime &t2)
-{
-    return (t1.GetTimeHi()<=t2.GetTimeHi()) && (t1.GetTimeLo()<t2.GetTimeLo());
-}
 
-inline Bool_t operator>(MTime &t1, MTime &t2)
-{
-    return (t1.GetTimeHi()>=t2.GetTimeHi()) && (t1.GetTimeLo()>t2.GetTimeLo());
-}
-
-inline Bool_t operator<=(MTime &t1, MTime &t2)
-{
-    return (t1.GetTimeHi()<=t2.GetTimeHi()) && (t1.GetTimeLo()<=t2.GetTimeLo());
-}
-
-inline Bool_t operator>=(MTime &t1, MTime &t2)
-{
-    return (t1.GetTimeHi()>=t2.GetTimeHi()) && (t1.GetTimeLo()>=t2.GetTimeLo());
-}
-
-inline Bool_t operator==(MTime &t1, MTime &t2)
-{
-    return (t1.GetTimeLo()==t2.GetTimeLo()) && (t1.GetTimeHi()==t2.GetTimeHi());
-}
-*/
