Index: trunk/MagicSoft/Mars/datacenter/scripts/fillcallisto
===================================================================
--- trunk/MagicSoft/Mars/datacenter/scripts/fillcallisto	(revision 7465)
+++ trunk/MagicSoft/Mars/datacenter/scripts/fillcallisto	(revision 7471)
@@ -104,4 +104,6 @@
    no=`printf %08d $sequence | cut -c 0-4`
    no2=`printf %08d $sequence`
+   var1=$no
+   var2=$no2
    path="$datapath/callisto/$no/$no2"
    signalfile=$path/signal$no2.root
@@ -114,27 +116,28 @@
 
    echo "run $program for sequence $sequence" >> $scriptlog 2>&1
+   setstatus "start" >> $scriptlog 2>&1
    echo "run fillcalib..." >> $scriptlog 2>&1
+
    check1=`root -q -b $macrospath/fillcalib.C+\("\"$calibfile\""\,kFALSE\) | tee $fillcaliblog | grep int | sed -e 's/(int)//'`
 
    case $check1 in
-      1)   echo "check1=$check1 -> everything ok -> run fillsignal " >> $scriptlog 2>&1;;
+      1)   echo "check1=$check1 -> everything ok -> run fillsignal " >> $scriptlog 2>&1 ;;
       *)   echo "check1=$check1 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1
-           continue;;
+           com="fillcalib for sequence $sequence failed"
+           check=$check1
+           setstatus "stop" >> $scriptlog 2>&1
+           continue ;;
    esac
 
    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
-           echo "-> inserting the status for $program for sequence $sequence into the db" >> $scriptlog 2>&1
-           statustime="Now()"
-           failed="NULL"
-           starttime="NULL"
-           failedtime="NULL"
-           var1=$no
-           var2=$sequence
-           setstatus
-   	  ;;
-      *)   echo "check2=$check2 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1;;
+      1)   echo "check2=$check2 -> everything ok " >> $scriptlog 2>&1 ;;
+      *)   echo "check2=$check2 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1
+           com="fillsignal for sequencec $sequence failed"
+           check=$check2
+           ;;
    esac
+   echo "inserting the status for $program for sequence $sequence into the db" >> $scriptlog 2>&1
+   setstatus "stop" >> $scriptlog 2>&1
 done
 
