Index: trunk/MagicSoft/Mars/datacenter/scripts/runcallisto
===================================================================
--- trunk/MagicSoft/Mars/datacenter/scripts/runcallisto	(revision 7938)
+++ trunk/MagicSoft/Mars/datacenter/scripts/runcallisto	(revision 7944)
@@ -37,20 +37,12 @@
 #
 
+source `dirname $0`/sourcefile
+printprocesslog "INFO starting $0"
 program=callisto
-source `dirname $0`/sourcefile
+column=fCallisto
 
 set -C
 
-# define callisto.rc files
-callistorcnew=$setuppath/$program/callisto.rc
-callistorcmarapr05=$setuppath/$program/callisto_MarApr05.rc
-
-column=fCallisto
-#pno=500 # number of processes, i.e. number of todo-files
-
-scriptlogpath=$runlogpath/$program
-makedir $scriptlogpath
-scriptlog=$scriptlogpath/run$program-$datetime.log
-
+scriptlog=$runlogpath/run$program-$datetime.log
 date >> $scriptlog 2>&1
 
@@ -67,4 +59,5 @@
 # run calibration for sequence
 echo "run $program for sequence $sequence..." >> $scriptlog 2>&1
+printprocesslog "INFO starting $program for sequence $sequence"
 no=`printf %08d $sequence | cut -c 0-4`
 no2=`printf %08d $sequence`
@@ -73,7 +66,9 @@
 outpath="$datapath/$program/$no/$no2"
 makedir $outpath >> $scriptlog 2>&1
-
 sequfile="$sequpath/$no/sequence$no2.txt"
 
+# define callisto.rc files
+callistorcnew=$setuppath/$program/callisto.rc
+callistorcmarapr05=$setuppath/$program/callisto_MarApr05.rc
 # find callisto.rc file
 if [ -e $outpath/callisto.rc ]
@@ -99,4 +94,5 @@
 case $check1 in
    0)   echo " check1=$check1 -> everything ok -> doing update..." >> $scriptlog 2>&1
+        printprocesslog "INFO $program finished successfully for sequence $sequence"
         # running merpp update if calibration worked
         # finding files, which have to be updated
@@ -113,4 +109,5 @@
         makedir $merpplogpath >> $scriptlog 2>&1
         
+        printprocesslog "INFO doing merppupdate for sequence $sequence"
         # updated calibrated data files with the information from the cc and caco files
         for calfile in ${calfiles[@]}
@@ -127,4 +124,5 @@
            then
               echo "no ccfile found for run "$runno >> $scriptlog 2>&1
+              printprocesslog "ERROR  no ccfile found for $calfile"
               com=$Fnoccfile
               comadd=$runno
@@ -163,6 +161,9 @@
            check2=$?
            case $check2 in
-                   0)   echo " check2=$check2 -> everything ok, merppccupdate worked -> continue" >> $scriptlog 2>&1;;
-       	     *)   echo " check2=$check2 -> ERROR -> merppccupdate failed" >> $scriptlog 2>&1
+                   0)   echo " check2=$check2 -> everything ok, merppccupdate worked -> continue" >> $scriptlog 2>&1
+                        printprocesslog "INFO merppupdated $calfile sucessfully with $ccfile"
+                        ;;
+        	   *)   echo " check2=$check2 -> ERROR -> merppccupdate failed" >> $scriptlog 2>&1
+                        printprocesslog "ERROR merppccupdate failed for $calfile"
                         com=$Fmerppcc
                         comadd=$runno
@@ -173,6 +174,9 @@
            check3=$?
            case $check3 in
-                   0)   echo " check3=$check3 -> everything ok, merppcacoupdate worked -> continue" >> $scriptlog 2>&1;;
-       	     *)   echo " check3=$check3 -> ERROR -> merppcacoupdate failed" >> $scriptlog 2>&1
+                   0)   echo " check3=$check3 -> everything ok, merppcacoupdate worked -> continue" >> $scriptlog 2>&1
+                        printprocesslog "INFO merppupdated $calfile sucessfully with $cacofile"
+                        ;;
+        	   *)   echo " check3=$check3 -> ERROR -> merppcacoupdate failed" >> $scriptlog 2>&1
+                        printprocesslog "ERROR merppcacoupdate failed for $calfile"
                         com=$Fmerppcaco
                         comadd=$runno
@@ -183,4 +187,5 @@
 	  ;;
    *)   echo " check1=$check1 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1
+        printprocesslog "ERROR $program failed for sequence $sequence"
         com=$Fcallisto
         check=$check1
