Index: trunk/MagicSoft/Mars/mbase/MTaskList.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MTaskList.cc	(revision 8585)
+++ trunk/MagicSoft/Mars/mbase/MTaskList.cc	(revision 8618)
@@ -89,5 +89,5 @@
 // this name in the parameter list (by MEvtLoop::SetParList)
 //
-MTaskList::MTaskList(const char *name, const char *title)
+MTaskList::MTaskList(const char *name, const char *title) : fNumPasses(0), fNumPass(0)
 {
     fName  = name  ? name  : gsDefName.Data();
@@ -108,5 +108,5 @@
 //   TaskList in the new TaskList.
 //
-MTaskList::MTaskList(MTaskList &ts) : MTask()
+MTaskList::MTaskList(const MTaskList &ts) : MTask(), fNumPasses(ts.fNumPasses)
 {
     fTasks->AddAll(ts.fTasks);
@@ -612,35 +612,6 @@
 }
 
-// --------------------------------------------------------------------------
-//
-// do the event execution of all tasks in the task-list
-//
-Int_t MTaskList::Process()
-{
-    //
-    // Check whether there is something which can be processed, otherwise
-    // stop the eventloop.
-    //
-    if (fTasksProcess.GetSize()==0)
-    {
-        *fLog << warn << "Warning: No entries in " << GetDescriptor() << " for Processing." << endl;
-        return kFALSE;
-    }
-
-    //
-    // Reset the ReadyToSave flag.
-    // Reset all containers.
-    //
-    // Make sure, that the parameter list is not reset from a tasklist
-    // running as a task in another tasklist.
-    //
-    const Bool_t noreset = fParList->TestBit(MParList::kIsProcessing);
-    if (!noreset)
-    {
-        fParList->SetBit(MParList::kIsProcessing);
-        if (!HasAccelerator(kAccDontReset))
-            fParList->Reset();
-    }
-
+Int_t MTaskList::ProcessTaskList()
+{
     //
     //  create the Iterator for the TaskList
@@ -707,4 +678,56 @@
     }
 
+    return rc;
+}
+
+// --------------------------------------------------------------------------
+//
+// do the event execution of all tasks in the task-list.
+//
+// If a task returns kCONTINUE, kCONTINUE is propagated if the
+// number of passes==0, otherwise kTRUE is returned instead.
+//
+Int_t MTaskList::Process()
+{
+    //
+    // Check whether there is something which can be processed, otherwise
+    // stop the eventloop.
+    //
+    if (fTasksProcess.GetSize()==0)
+    {
+        *fLog << warn << "Warning: No entries in " << GetDescriptor() << " for Processing." << endl;
+        return kFALSE;
+    }
+
+    //
+    // Reset the ReadyToSave flag.
+    // Reset all containers.
+    //
+    // Make sure, that the parameter list is not reset from a tasklist
+    // running as a task in another tasklist.
+    //
+    const Bool_t noreset = fParList->TestBit(MParList::kIsProcessing);
+    if (!noreset)
+    {
+        fParList->SetBit(MParList::kIsProcessing);
+        if (!HasAccelerator(kAccDontReset))
+            fParList->Reset();
+    }
+
+    // Initialize storage variable for the return code
+    Int_t rc = kTRUE;
+
+    // Execute the task list at least once
+    const UInt_t cnt = fNumPasses==0 ? 1 : fNumPasses;
+    for (fNumPass=0; fNumPass<cnt; fNumPass++)
+    {
+        // Execute the tasklist once
+        rc = ProcessTaskList();
+        // In cae of error or a stop-request leave loop
+        if (rc==kERROR || rc==kFALSE)
+            break;
+    }
+
+    // Reset to the default
     if (!noreset)
     {
@@ -713,4 +736,9 @@
     }
 
+    // If the number of passes==0 <default> propagete kCONTINUE
+    if (rc==kCONTINUE)
+        return fNumPasses==0 ? kCONTINUE : kTRUE;
+
+    // Return return code
     return rc;
 }
Index: trunk/MagicSoft/Mars/mbase/MTaskList.h
===================================================================
--- trunk/MagicSoft/Mars/mbase/MTaskList.h	(revision 8585)
+++ trunk/MagicSoft/Mars/mbase/MTaskList.h	(revision 8618)
@@ -28,4 +28,7 @@
     MParList *fParList;      //! The parameter list given in PreProcess
 
+    UInt_t fNumPasses;
+    UInt_t fNumPass; //!
+
     enum { kIsOwner = BIT(14) };
 
@@ -33,8 +36,9 @@
     void   StreamPrimitive(ostream &out) const;
     Bool_t CheckAddToList(MTask *task, /*const char *tType,*/ const MTask *where=NULL) const;
+    Int_t  ProcessTaskList();
 
 public:
     MTaskList(const char *name=NULL, const char *title=NULL);
-    MTaskList(MTaskList &ts);
+    MTaskList(const MTaskList &ts);
 
     ~MTaskList();
@@ -43,4 +47,8 @@
     void SetDisplay(MStatusDisplay *d);
     void SetAccelerator(Byte_t acc=kAccStandard);
+    void SetNumPasses(UInt_t cnt=0) { fNumPasses=cnt; }
+
+    UInt_t GetNumPass() const { return fNumPass; }
+    UInt_t GetNumPasses() const { return fNumPasses; }
 
     Bool_t AddToListBefore(MTask *task, const MTask *where, const char *tType="All");
