Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 7910)
+++ trunk/MagicSoft/Mars/Changelog	(revision 7911)
@@ -83,4 +83,14 @@
      - improved logging and comments
      - adapted find-to-do-file-algorithm 
+
+   * datacenter/scripts/buildsequenceentries, 
+     datacenter/scripts/checkfilesforsequenceavail, 
+     datacenter/scripts/checkstardone, datacenter/scripts/correcttime,
+     datacenter/scripts/doexclusions, datacenter/scripts/fillcallisto,
+     datacenter/scripts/fillganymed, datacenter/scripts/fillstar,
+     datacenter/scripts/makecallistolinks,
+     datacenter/scripts/writesequencefiles:
+     - improved logging and comments
+
 
 
Index: trunk/MagicSoft/Mars/datacenter/scripts/buildsequenceentries
===================================================================
--- trunk/MagicSoft/Mars/datacenter/scripts/buildsequenceentries	(revision 7910)
+++ trunk/MagicSoft/Mars/datacenter/scripts/buildsequenceentries	(revision 7911)
@@ -28,6 +28,5 @@
 # this step is needed. 
 #
-# After checking, if the script is already running, the todolist is 
-# written.
+# After checking if the script is already running the todolist is written.
 # Then the sequences are built for each date in the todolist using the 
 # macro buildsequenceentries.C
@@ -78,5 +77,4 @@
    buildsequenceentrieslog=$buildsequentriespath/buildsequenceentries-$date.log
 
-   echo "run $program..." >> $scriptlog 2>&1
    setstatus "start" >> $scriptlog 2>&1
 
@@ -84,9 +82,9 @@
 
    case $check1 in
-      1)   echo "check1=$check1 -> everything ok -> setting status for $date..." >> $scriptlog 2>&1;;
-      0)   echo "check1=$check1 -> no connection to db -> continue..." >> $scriptlog 2>&1 
+      1)   echo " check1=$check1 -> everything ok -> setting status for $date..." >> $scriptlog 2>&1;;
+      0)   echo " check1=$check1 -> no connection to db -> continue..." >> $scriptlog 2>&1 
            check="no"
            ;;
-      *)   echo "check1=$check1 -> ERROR - $program.C failed for $date -> step has to be repeated" >> $scriptlog 2>&1
+      *)   echo " check1=$check1 -> ERROR - $program.C failed for $date -> step has to be repeated" >> $scriptlog 2>&1
            com=$Fbuildsequ
            check=$check1
@@ -94,5 +92,4 @@
    esac
 
-   echo "inserting the status for $program for date $date into the db" >> $scriptlog 2>&1
    setstatus "stop" >> $scriptlog 2>&1
 done
Index: trunk/MagicSoft/Mars/datacenter/scripts/checkfilesforsequenceavail
===================================================================
--- trunk/MagicSoft/Mars/datacenter/scripts/checkfilesforsequenceavail	(revision 7910)
+++ trunk/MagicSoft/Mars/datacenter/scripts/checkfilesforsequenceavail	(revision 7911)
@@ -28,6 +28,5 @@
 # the sequences. 
 #
-# After checking, if the script is already running, the todolist is 
-# written 
+# After checking if the script is already running the todolist is written.
 # Then for each sequence the availability of the files (raw, cc, caco) is 
 # checked by using the macro checkfilesavail.C 
@@ -79,5 +78,4 @@
    sequencefile=$sequpath/$no/sequence$no2.txt
 
-   echo "run $program..." >> $scriptlog 2>&1
    setstatus "start" >> $scriptlog 2>&1
 
@@ -85,9 +83,9 @@
 
    case $check1 in
-      1)   echo "check1=$check1 -> everything ok -> setting status..." >> $scriptlog 2>&1 ;;
-      2)   echo "check1=$check1 -> files not yet available -> continue..." >> $scriptlog 2>&1 
+      1)   echo " check1=$check1 -> everything ok -> setting status..." >> $scriptlog 2>&1 ;;
+      2)   echo " check1=$check1 -> files not yet available -> continue..." >> $scriptlog 2>&1 
            check="no"
            ;;
-      0)   echo "check1=$check1 -> no connection to db -> continue..." >> $scriptlog 2>&1 
+      0)   echo " check1=$check1 -> no connection to db -> continue..." >> $scriptlog 2>&1 
            check="no"
            ;;
@@ -98,5 +96,4 @@
    esac
 
-   echo "inserting the status for $program for sequence $sequence into the db" >> $scriptlog 2>&1
    setstatus "stop" >> $scriptlog 2>&1
 done
Index: trunk/MagicSoft/Mars/datacenter/scripts/checkstardone
===================================================================
--- trunk/MagicSoft/Mars/datacenter/scripts/checkstardone	(revision 7910)
+++ trunk/MagicSoft/Mars/datacenter/scripts/checkstardone	(revision 7911)
@@ -28,6 +28,5 @@
 # the datasets. 
 #
-# After checking, if the script is already running, the todolist is 
-# written
+# After checking if the script is already running the todolist is written.
 # Then for each dataset the sequences are extracted from the datasetfile 
 # and for each sequence the availability of the star files checked by using 
@@ -85,27 +84,25 @@
 
    outpath=$logpath/$program/$no
-   echo "outpath: "$outpath  >> $scriptlog 2>&1 
    makedir $outpath  >> $scriptlog 2>&1 
    
-   echo "run $program..." >> $scriptlog 2>&1
    setstatus "start" >> $scriptlog 2>&1
 
    for sequence in ${sequences[@]}
    do 
+      echo "run $program for sequence $sequence..." >> $scriptlog 2>&1
 
       check1=`root -q -b $macrospath/checkstardone.C+\(\""$sequence\""\) | tee $outpath/checkstardone-$sequence.log | grep int | sed -e 's/(int)//'`
 
       case $check1 in
-         1)   echo "check1=$check1 -> everything ok -> continue with next sequence..." >> $scriptlog 2>&1 ;;
-         2)   echo "check1=$check1 -> files for sequence $sequence not yet available -> continue..." >> $scriptlog 2>&1 
+         1)   echo " check1=$check1 -> everything ok -> continue with next sequence..." >> $scriptlog 2>&1 ;;
+         2)   echo " check1=$check1 -> files for sequence $sequence not yet available -> continue..." >> $scriptlog 2>&1 
               check="no"
               break
               ;;
-         0)   echo "check1=$check1 -> no connection to db -> continue..." >> $scriptlog 2>&1 
+         0)   echo " check1=$check1 -> no connection to db -> continue..." >> $scriptlog 2>&1 
               check="no"
               break
               ;;
-         *)   echo "check1=$check1 -> ERROR " >> $scriptlog 2>&1 
-              echo "starfiles not available for sequence -> continue" >> $scriptlog 2>&1 
+         *)   echo " check1=$check1 -> ERROR " >> $scriptlog 2>&1 
               com=$Fstardone
               comadd=$sequence
@@ -116,5 +113,4 @@
    done
    
-   echo "inserting the status for $program for dataset $dataset into the db" >> $scriptlog 2>&1
    setstatus "stop" >> $scriptlog 2>&1
 done
Index: trunk/MagicSoft/Mars/datacenter/scripts/correcttime
===================================================================
--- trunk/MagicSoft/Mars/datacenter/scripts/correcttime	(revision 7910)
+++ trunk/MagicSoft/Mars/datacenter/scripts/correcttime	(revision 7911)
@@ -28,6 +28,5 @@
 # correction
 #
-# After checking, if the script is already running, the todolist is 
-# written
+# After checking if the script is already running the todolist is written.
 # Then for each run the timing correction is done 
 # If this was successful, the status is inserted into the database using 
Index: trunk/MagicSoft/Mars/datacenter/scripts/doexclusions
===================================================================
--- trunk/MagicSoft/Mars/datacenter/scripts/doexclusions	(revision 7910)
+++ trunk/MagicSoft/Mars/datacenter/scripts/doexclusions	(revision 7911)
@@ -28,6 +28,5 @@
 # this step is needed. 
 #
-# After checking, if the script is already running, the todolist is 
-# written 
+# After checking if the script is already running the todolist is written.
 # Then the run are excluded for each date in the todolist using the 
 # macro doexclusions.C
@@ -75,9 +74,7 @@
    var2=$date
    doexclusionspath=$logpath/$program/$year2
-   echo "excl path: $doexclusionspath"
    makedir $doexclusionspath >> $scriptlog 2>&1
    doexclusionslog=$doexclusionspath/doexclusions-$date.log
 
-   echo "run $program..." >> $scriptlog 2>&1
    setstatus "start" >> $scriptlog 2>&1
 
@@ -85,11 +82,11 @@
 
    case $check1 in
-      1)   echo "check1=$check1 -> everything ok -> setting status..." >> $scriptlog 2>&1 ;;
-      *)   echo "check1=$check1 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1 
+      1)   echo " check1=$check1 -> everything ok -> setting status..." >> $scriptlog 2>&1 ;;
+      *)   echo " check1=$check1 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1 
            com=$Fdoexcl
            check=$check1
            ;;
    esac
-   echo "inserting the status for $program for date $date into the db" >> $scriptlog 2>&1
+   
    setstatus "stop" >> $scriptlog 2>&1
 done
Index: trunk/MagicSoft/Mars/datacenter/scripts/fillcallisto
===================================================================
--- trunk/MagicSoft/Mars/datacenter/scripts/fillcallisto	(revision 7910)
+++ trunk/MagicSoft/Mars/datacenter/scripts/fillcallisto	(revision 7911)
@@ -28,6 +28,5 @@
 # all sequences of which the results are not yet in the database.
 #
-# After checking, if the script is already running, the todolist is 
-# written 
+# After checking if the script is already running the todolist is written.
 # Then for each sequence in the todo list the calibration results are 
 # filled into the table Calibration in the database using the macros 
@@ -56,5 +55,5 @@
 
 # get todo file
-gettodolist  >> $scriptlog 2>&1
+gettodo  >> $scriptlog 2>&1
 
 sequences=(`cat $todofile`)
@@ -79,5 +78,4 @@
    calibfile=$path/calib$no2.root
    fillcallistologpath=$logpath/$program/$no
-   echo "$programlogpath: "$fillcallistologpath >> $scriptlog 2>&1
    makedir $fillcallistologpath >> $scriptlog 2>&1
    fillcaliblog=$fillcallistologpath/fillcalib-$sequence.log
@@ -91,10 +89,10 @@
 
    case $check1 in
-      1)   echo "check1=$check1 -> everything ok -> run fillsignal " >> $scriptlog 2>&1 ;;
-      0)   echo "check1=$check1 -> no connection to db -> continue..." >> $scriptlog 2>&1 
+      1)   echo " check1=$check1 -> everything ok -> run fillsignal " >> $scriptlog 2>&1 ;;
+      0)   echo " check1=$check1 -> no connection to db -> continue..." >> $scriptlog 2>&1 
            check="no"
            setstatus "stop" >> $scriptlog 2>&1
            continue ;;
-      *)   echo "check1=$check1 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1
+      *)   echo " check1=$check1 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1
            com=$Ffillcalib
            check=$check1
@@ -105,14 +103,14 @@
    check2=`root -q -b $macrospath/fillsignal.C+\("\"$signalfile\""\,kFALSE\) | tee $fillsignallog | grep int | sed -e 's/(int)//'`
    case $check2 in
-      1)   echo "check2=$check2 -> everything ok " >> $scriptlog 2>&1 ;;
-      0)   echo "check2=$check2 -> no connection to db -> continue..." >> $scriptlog 2>&1 
+      1)   echo " check2=$check2 -> everything ok " >> $scriptlog 2>&1 ;;
+      0)   echo " check2=$check2 -> no connection to db -> continue..." >> $scriptlog 2>&1 
            check="no"
            ;;
-      *)   echo "check2=$check2 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1
+      *)   echo " check2=$check2 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1
            com=$Ffillsignal
            check=$check2
            ;;
    esac
-   echo "inserting the status for $program for sequence $sequence into the db" >> $scriptlog 2>&1
+   
    setstatus "stop" >> $scriptlog 2>&1
 done
Index: trunk/MagicSoft/Mars/datacenter/scripts/fillganymed
===================================================================
--- trunk/MagicSoft/Mars/datacenter/scripts/fillganymed	(revision 7910)
+++ trunk/MagicSoft/Mars/datacenter/scripts/fillganymed	(revision 7911)
@@ -28,6 +28,5 @@
 # for all datasets of which the results are not yet in the database.
 #
-# After checking, if the script is already running, the todolist is 
-# written 
+# After checking if the script is already running the todolist is written. 
 # Then for each dataset in the todo list the ganymed results are filled 
 # into the table Ganymed in the database using the macro fillganymed.C
@@ -78,5 +77,4 @@
    ganymedfile=$path/ganymed$no2.root
    fillganymedlogpath=$logpath/$program/$no
-   echo "$programlogpath: "$fillganymedlogpath >> $scriptlog 2>&1
    makedir $fillganymedlogpath >> $scriptlog 2>&1
    fillganymedlog=$fillganymedlogpath/$program-$dataset.log
@@ -87,14 +85,14 @@
    check2=`root -q -b $macrospath/fillganymed.C+\("\"$ganymedfile\""\,kFALSE\) | tee $fillganymedlog | grep int | sed -e 's/(int)//'`
    case $check2 in
-      1)   echo "check2=$check2 -> everything ok " >> $scriptlog 2>&1 ;;
-      0)   echo "check2=$check2 -> no connection to db -> continue..." >> $scriptlog 2>&1 
+      1)   echo " check2=$check2 -> everything ok " >> $scriptlog 2>&1 ;;
+      0)   echo " check2=$check2 -> no connection to db -> continue..." >> $scriptlog 2>&1 
            check="no"
            ;;
-      *)  echo "check2=$check2 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1
+      *)  echo " check2=$check2 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1
           com=$Ffillganymed
           check=$check2
           ;;
    esac
-   echo "inserting the status for $program for dataset $dataset into the db" >> $scriptlog 2>&1
+
    setstatus "stop" >> scriptlog 2>&1
 done
Index: trunk/MagicSoft/Mars/datacenter/scripts/fillstar
===================================================================
--- trunk/MagicSoft/Mars/datacenter/scripts/fillstar	(revision 7910)
+++ trunk/MagicSoft/Mars/datacenter/scripts/fillstar	(revision 7911)
@@ -28,6 +28,5 @@
 # for all sequences of which the results are not yet in the database.
 #
-# After checking, if the script is already running, the todolist is 
-# written 
+# After checking if the script is already running the todolist is written. 
 # Then for each sequence in the todo list the star results are filled 
 # into the table Star in the database using the macro fillstar.C
@@ -79,5 +78,4 @@
    starfile=$path/star$no2.root
    fillstarlogpath=$logpath/$program/$no
-   echo "fillstarlogpath: "$fillstarlogpath >> $scriptlog 2>&1
    makedir $fillstarlogpath >> $scriptlog 2>&1
    fillstarlog=$fillstarlogpath/$program-$sequence.log
@@ -88,14 +86,14 @@
    check2=`root -q -b $macrospath/fillstar.C+\("\"$starfile\""\,kFALSE\) | tee $fillstarlog | grep \(int\) | sed -e 's/.*(int)//'`
    case $check2 in
-      1)   echo "check2=$check2 -> everything ok " >> $scriptlog 2>&1 ;;
-      0)   echo "check2=$check2 -> no connection to db -> continue..." >> $scriptlog 2>&1 
+      1)   echo " check2=$check2 -> everything ok " >> $scriptlog 2>&1 ;;
+      0)   echo " check2=$check2 -> no connection to db -> continue..." >> $scriptlog 2>&1 
            check="no"
            ;;
-      *)   echo "check2=$check2 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1
+      *)   echo " check2=$check2 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1
            com=$Ffillstar
            check=$check2
            ;;
    esac
-   echo "inserting the status for $program for sequence $sequence into the db" >> $scriptlog 2>&1
+   
    setstatus "stop" >> $scriptlog 2>&1
 done
Index: trunk/MagicSoft/Mars/datacenter/scripts/makecallistolinks
===================================================================
--- trunk/MagicSoft/Mars/datacenter/scripts/makecallistolinks	(revision 7910)
+++ trunk/MagicSoft/Mars/datacenter/scripts/makecallistolinks	(revision 7911)
@@ -84,5 +84,4 @@
          echo "  reason: $pulse" >> $scriptlog 2>&1
          resetlogpath=$logpath/resetcallisto
-         echo "resetlogpath: $resetlogpath" >> $scriptlog 2>&1
          makedir $resetlogpath >> $scriptlog 2>&1
          resetlog=$resetlogpath/reset-callisto-$sequ.log
@@ -90,7 +89,7 @@
          check1=`root -q -b $macrospath/resetcolumn.C+\("\"$column\""\,"\"$table\""\,"\"$sequ\""\,"\"$sequ\""\,kFALSE\) | tee $resetlog | grep int | sed -e 's/(int)//'`
          case $check1 in
-            1)   echo "check1=$check1 -> everything ok, callisto has been reset " >> $scriptlog 2>&1
+            1)   echo " check1=$check1 -> everything ok, callisto has been reset " >> $scriptlog 2>&1
                  ;;
-            *)   echo "check1=$check1 -> ERROR -> step could not be resetted -> continue " >> $scriptlog 2>&1
+            *)   echo " check1=$check1 -> ERROR -> step could not be resetted -> continue " >> $scriptlog 2>&1
                  continue ;;
          esac
Index: trunk/MagicSoft/Mars/datacenter/scripts/writesequencefiles
===================================================================
--- trunk/MagicSoft/Mars/datacenter/scripts/writesequencefiles	(revision 7910)
+++ trunk/MagicSoft/Mars/datacenter/scripts/writesequencefiles	(revision 7911)
@@ -28,6 +28,5 @@
 # for which this step is needed. 
 #
-# After checking, if the script is already running, the todolist is 
-# written 
+# After checking if the script is already running the todolist is written.
 # Then the sequence file is written for each sequence in the todolist using
 # the macro writesequencefile.C
@@ -87,14 +86,14 @@
    check2=`root -q -b $macrospath/writesequencefile.C+\($sequence\,"\"$sequpath\""\) | tee $writesequencefilelog | grep int | sed -e 's/(int)//'`
    case $check2 in
-      1)   echo "check2=$check2 -> everything ok " >> $scriptlog 2>&1 ;;
-      0)   echo "check2=$check2 -> no connection to db -> continue..." >> $scriptlog 2>&1 
+      1)   echo " check2=$check2 -> everything ok " >> $scriptlog 2>&1 ;;
+      0)   echo " check2=$check2 -> no connection to db -> continue..." >> $scriptlog 2>&1 
            check="no"
            ;;
-      *)   echo "check2=$check2 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1
+      *)   echo " check2=$check2 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1
            com=$Fwritesequfile
            check=$check2
            ;;
    esac
-   echo "inserting the status for $program for sequence $sequence into the db" >> $scriptlog 2>&1
+   
    setstatus "stop" >> $scriptlog 2>&1
 done
