Index: /trunk/MagicSoft/Mars/Changelog
===================================================================
--- /trunk/MagicSoft/Mars/Changelog	(revision 8223)
+++ /trunk/MagicSoft/Mars/Changelog	(revision 8224)
@@ -18,4 +18,12 @@
 
                                                  -*-*- END OF LINE -*-*-
+ 2006/12/12 Thomas Bretz
+
+   * mjobs/MSequence.cc:
+     - fixed a bug in SetupRuns introduced yesterday which made the
+       setup fail if SetupRuns were called more than once.
+
+
+
  2006/12/11 Thomas Bretz
 
Index: /trunk/MagicSoft/Mars/mjobs/MSequence.cc
===================================================================
--- /trunk/MagicSoft/Mars/mjobs/MSequence.cc	(revision 8223)
+++ /trunk/MagicSoft/Mars/mjobs/MSequence.cc	(revision 8224)
@@ -205,4 +205,8 @@
     const Bool_t def = d.IsNull();
 
+    // For this particular case we assume that the files are added one by
+    // one without wildcards.
+    const Int_t n0  = iter.GetNumEntries();
+
     // Setup path
     if (def)
@@ -291,7 +295,7 @@
     }
 
-    const Int_t n0 = iter.GetNumEntries();
-    const Int_t n1 = arr.GetSize();
-    if (n0==0)
+    const Int_t n1 = iter.GetNumEntries()-n0;
+    const Int_t n2 = arr.GetSize();
+    if (n1==0)
     {
         *fLog << err;
@@ -302,11 +306,11 @@
     }
 
-    if (n0==n1)
-        return n0;
+    if (n1==n2)
+        return n1;
 
     *fLog << err;
-    *fLog << "ERROR - " << n0 << " input files for sequence #" << GetSequence() << " found in" << endl;
+    *fLog << "ERROR - " << n1 << " input files for sequence #" << GetSequence() << " found in" << endl;
     *fLog << "        " << (def?" default-path ":" ") << d << endl;
-    *fLog << "        but " << n1 << " files were defined in sequence file" << endl;
+    *fLog << "        but " << n2 << " files were defined in sequence file" << endl;
     *fLog << "        " << GetName() << endl;
     if (fLog->GetDebugLevel()<=4)
