Index: /trunk/MagicSoft/Mars/Changelog
===================================================================
--- /trunk/MagicSoft/Mars/Changelog	(revision 7023)
+++ /trunk/MagicSoft/Mars/Changelog	(revision 7024)
@@ -21,5 +21,15 @@
 
                                                  -*-*- END OF LINE -*-*-
- 2005/05/10 Daniela Dorner
+ 2005/05/13 Daniela Dorner
+
+   * datacenter/scripts/runstar
+     - fixed bug in the calculation of the number of to-do-files
+
+   * datacenter/scripts/runcallisto
+     - fixed bug in the calculation of the number of to-do-files
+
+
+
+ 2005/05/12 Daniela Dorner
 
    * datacenter/macros/fillcalib.C:
Index: /trunk/MagicSoft/Mars/datacenter/macros/buildsequenceentries.C
===================================================================
--- /trunk/MagicSoft/Mars/datacenter/macros/buildsequenceentries.C	(revision 7023)
+++ /trunk/MagicSoft/Mars/datacenter/macros/buildsequenceentries.C	(revision 7024)
@@ -75,4 +75,11 @@
     {
         query = Form("DELETE FROM MyMagic.Calibration WHERE fSequenceFirst=%s", (*row)[0]);
+
+        TSQLResult *res = serv.Query(query);
+        if (!res)
+            return kFALSE;
+        delete res;
+
+        query = Form("DELETE FROM MyMagic.Star WHERE fSequenceFirst=%s", (*row)[0]);
 
         TSQLResult *res = serv.Query(query);
Index: /trunk/MagicSoft/Mars/datacenter/macros/setupdb.C
===================================================================
--- /trunk/MagicSoft/Mars/datacenter/macros/setupdb.C	(revision 7023)
+++ /trunk/MagicSoft/Mars/datacenter/macros/setupdb.C	(revision 7024)
@@ -526,4 +526,12 @@
 
     list.Add(new TObjString(
+         "CREATE TABLE MyMagic.Star ("
+         "  fSequenceFirst      INT        UNSIGNED   PRIMARY KEY, "
+         "  fMeanNumberIslands  FLOAT(5,1)            NOT NULL,"
+         "  fPSF                FLOAT(5,1)            NOT NULL,"
+         "  fLastUpdate         TIMESTAMP"
+         ")"));
+
+    list.Add(new TObjString(
          "CREATE TABLE MyMagic.SequenceBuildStatus ("
          "  fDate                  DATE                 PRIMARY KEY, "
Index: /trunk/MagicSoft/Mars/datacenter/scripts/runcallisto
===================================================================
--- /trunk/MagicSoft/Mars/datacenter/scripts/runcallisto	(revision 7023)
+++ /trunk/MagicSoft/Mars/datacenter/scripts/runcallisto	(revision 7024)
@@ -111,4 +111,10 @@
    lines=`cat $todofile.txt | wc -l`
    echo "number of lines: "$lines >> $scriptlog 2>&1
+   while (( "$lines" < "$pno" ))
+   do
+      echo "# of lines ($lines) < # of processes ($pno) "
+      pno=`expr $pno / 2` 
+   done
+   echo "pno: "$pno
    nofiles=`expr $lines / \( $pno - 1 \)`
    echo "number of files: "$nofiles >> $scriptlog 2>&1
Index: /trunk/MagicSoft/Mars/datacenter/scripts/runstar
===================================================================
--- /trunk/MagicSoft/Mars/datacenter/scripts/runstar	(revision 7023)
+++ /trunk/MagicSoft/Mars/datacenter/scripts/runstar	(revision 7024)
@@ -107,4 +107,10 @@
    lines=`cat $todofile.txt | wc -l`
    echo "number of lines: "$lines >> $scriptlog 2>&1
+   while (( "$lines" < "$pno" ))
+   do
+      echo "# of lines ($lines) < # of processes ($pno) "
+      pno=`expr $pno / 2` 
+   done
+   echo "pno: "$pno
    nofiles=`expr $lines / \( $pno - 1 \)`
    echo "number of files: "$nofiles >> $scriptlog 2>&1
