Index: trunk/MagicSoft/Mars/mbase/MTask.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MTask.cc	(revision 3710)
+++ trunk/MagicSoft/Mars/mbase/MTask.cc	(revision 3788)
@@ -77,4 +77,11 @@
 //                     etc. PostProcess is only executed in case of
 //                     PreProcess was successfull (returned kTRUE)
+//
+//
+//  Remark: Using a MTask in your tasklist doesn't make much sense,
+//          because it is doing nothing. However it is a nice tool
+//          to count something (exspecially if used together with a
+//          filter)
+//
 //
 //  Version 1:
@@ -391,5 +398,5 @@
 void MTask::PrintStatistics(const Int_t lvl, Bool_t title, Double_t time) const
 {
-    if (!OverwritesProcess())
+    if (!OverwritesProcess() && IsA()!=MTask::Class())
         return;
 
@@ -447,5 +454,5 @@
     // Check whether we reached the base class MTask
     //
-    if (TString(cls->GetName())=="MTask")
+    if (cls==MTask::Class())
         return kFALSE;
 
Index: trunk/MagicSoft/Mars/mbase/MTaskList.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MTaskList.cc	(revision 3710)
+++ trunk/MagicSoft/Mars/mbase/MTaskList.cc	(revision 3788)
@@ -43,4 +43,9 @@
 // from the list.
 //
+// Remark: The Process function is only executed if the class of your task
+//         overloads Process() or if the task itself is a MTask. This
+//         means if you have a task without Process() (only PreProcess
+//         and PostProcess no time is lost during execution)
+//
 // Warning:
 //  Be carefull if you are writing your tasklist
@@ -300,4 +305,104 @@
 // --------------------------------------------------------------------------
 //
+//  removes a task from the list (used in PreProcess).
+//  if kIsOwner is set the task is deleted. (see SetOwner())
+//
+void MTaskList::Remove(MTask *task)
+{
+    TObject *obj = fTasks->Remove(task);
+
+    if (TestBit(kIsOwner))
+        delete obj;
+}
+
+// --------------------------------------------------------------------------
+//
+//  do pre processing (before eventloop) of all tasks in the task-list
+//  Only if a task overwrites the Process function the task is
+//  added to the fTaskProcess-List. This makes the execution of the
+//  tasklist a little bit (only a little bit) faster, bacause tasks
+//  doing no Processing are not Processed.
+//
+Int_t MTaskList::PreProcess(MParList *pList)
+{
+    *fLog << all << "Preprocessing... " << flush;
+    if (fDisplay)
+    {
+        // Set status lines
+        fDisplay->SetStatusLine1("PreProcessing...");
+        fDisplay->SetStatusLine2("");
+    }
+
+    fParList = pList;
+
+    //
+    // Make sure, that the ReadyToSave flag is not reset from a tasklist
+    // running as a task in another tasklist.
+    //
+    const Bool_t noreset = fParList->TestBit(MParList::kDoNotReset);
+    if (!noreset)
+        fParList->SetBit(MParList::kDoNotReset);
+
+    //
+    //  create the Iterator over the tasklist
+    //
+    TIter Next(fTasks);
+
+    MTask *task=NULL;
+
+    //
+    // loop over all tasks for preproccesing
+    //
+    while ((task=(MTask*)Next()))
+    {
+        //
+        // PreProcess the task and check for it's return value.
+        //
+        switch (task->CallPreProcess(fParList))
+        {
+        case kFALSE:
+            return kFALSE;
+
+        case kTRUE:
+            // Handle GUI events (display changes, mouse clicks)
+            if (fDisplay)
+                gSystem->ProcessEvents();
+            continue;
+
+        case kSKIP:
+            Remove(task);
+            continue;
+        }
+
+        *fLog << err << dbginf << "PreProcess of " << task->GetDescriptor();
+        *fLog << " returned an unknown value... aborting." << endl;
+        return kFALSE;
+    }
+
+    *fLog << all << endl;
+
+    //
+    // Reset the ReadyToSave flag.
+    //
+    if (!noreset)
+    {
+        fParList->SetReadyToSave(kFALSE);
+        fParList->ResetBit(MParList::kDoNotReset);
+    }
+
+    //
+    // loop over all tasks to fill fTasksProcess
+    //
+    Next.Reset();
+    fTasksProcess.Clear();
+    while ((task=(MTask*)Next()))
+        if (task->IsA()==MTask::Class() || task->OverwritesProcess())
+            fTasksProcess.Add(task);
+
+    return kTRUE;
+}
+
+// --------------------------------------------------------------------------
+//
 //  do reinit of all tasks in the task-list
 //
@@ -348,104 +453,4 @@
         pList->ResetBit(MParList::kDoNotReset);
     }
-
-    return kTRUE;
-}
-
-// --------------------------------------------------------------------------
-//
-//  removes a task from the list (used in PreProcess).
-//  if kIsOwner is set the task is deleted. (see SetOwner())
-//
-void MTaskList::Remove(MTask *task)
-{
-    TObject *obj = fTasks->Remove(task);
-
-    if (TestBit(kIsOwner))
-        delete obj;
-}
-
-// --------------------------------------------------------------------------
-//
-//  do pre processing (before eventloop) of all tasks in the task-list
-//  Only if a task overwrites the Process function the task is
-//  added to the fTaskProcess-List. This makes the execution of the
-//  tasklist a little bit (only a little bit) faster, bacause tasks
-//  doing no Processing are not Processed.
-//
-Int_t MTaskList::PreProcess(MParList *pList)
-{
-    *fLog << all << "Preprocessing... " << flush;
-    if (fDisplay)
-    {
-        // Set status lines
-        fDisplay->SetStatusLine1("PreProcessing...");
-        fDisplay->SetStatusLine2("");
-    }
-
-    fParList = pList;
-
-    //
-    // Make sure, that the ReadyToSave flag is not reset from a tasklist
-    // running as a task in another tasklist.
-    //
-    const Bool_t noreset = fParList->TestBit(MParList::kDoNotReset);
-    if (!noreset)
-        fParList->SetBit(MParList::kDoNotReset);
-
-    //
-    //  create the Iterator over the tasklist
-    //
-    TIter Next(fTasks);
-
-    MTask *task=NULL;
-
-    //
-    // loop over all tasks for preproccesing
-    //
-    while ((task=(MTask*)Next()))
-    {
-        //
-        // PreProcess the task and check for it's return value.
-        //
-        switch (task->CallPreProcess(fParList))
-        {
-        case kFALSE:
-            return kFALSE;
-
-        case kTRUE:
-            // Handle GUI events (display changes, mouse clicks)
-            if (fDisplay)
-                gSystem->ProcessEvents();
-            continue;
-
-        case kSKIP:
-            Remove(task);
-            continue;
-        }
-
-        *fLog << err << dbginf << "PreProcess of " << task->GetDescriptor();
-        *fLog << " returned an unknown value... aborting." << endl;
-        return kFALSE;
-    }
-
-    *fLog << all << endl;
-
-    //
-    // Reset the ReadyToSave flag.
-    //
-    if (!noreset)
-    {
-        fParList->SetReadyToSave(kFALSE);
-        fParList->ResetBit(MParList::kDoNotReset);
-    }
-
-    //
-    // loop over all tasks to fill fTasksProcess
-    //
-    Next.Reset();
-    fTasksProcess.Clear();
-    while ((task=(MTask*)Next()))
-        if (task->OverwritesProcess())
-            fTasksProcess.Add(task);
 
     return kTRUE;
