Index: trunk/DataCheck/Processing/FillRatescans.sh
===================================================================
--- trunk/DataCheck/Processing/FillRatescans.sh	(revision 17092)
+++ trunk/DataCheck/Processing/FillRatescans.sh	(revision 17093)
@@ -9,4 +9,7 @@
 logfile=$runlogpath"/FillRatescan-"$datetime".log"
 date >> $logfile
+
+# this script doesn't need variable $doupdate
+# filling is done by macro and update is always done
 
 # get last 3, 6 or 9 nights
@@ -22,5 +25,5 @@
 echo  `date`": processing the following night(s): "${dates[@]} >> $logfile 2>&1
 
-echo ${dates[@]}
+#echo ${dates[@]}
 
 cd $mars
@@ -31,5 +34,4 @@
    auxdir=$auxdata/$date
    runnumber=`echo $date | sed -e 's/\///g'`
-   echo $auxdir
    
    # check if aux files are available from that night
@@ -43,5 +45,6 @@
    
    ratescanfile=$auxdir/$runnumber.RATE_SCAN_DATA.fits
-   ls $ratescanfile
+   printprocesslog "INFO processing "$ratescanfile
+   echo "INFO processing "$ratescanfile >> $logfile 2>&1
    if ! [ -e $ratescanfile ]
    then 
@@ -56,6 +59,16 @@
    fi
 
-   echo "run fillratescan.C for night "$runnumber
-   root -q -b -l fact/fillratescan.C\("\"$ratescanfile"\"\,kFALSE\)
+   printprocesslog "INFO run fillratescan.C for night "$runnumber
+   echo "run fillratescan.C for night "$runnumber >> $logfile 2>&1
+   check1=`root -q -b -l fact/processing/fillratescan.C\("\"$ratescanfile"\"\,kFALSE\) | tee $logfile | intgrep`
+   case $check1 in
+      1)   printprocesslog "INFO fillratescan.C was successfully for night "$runumber" (check1=$check1)."
+           ;;
+      0)   printprocesslog "WARN connection to DB failed (check1=$check1)."
+           ;;
+      *)   printprocesslog "ERROR fillratescan.C failed for night "$runumber" (check1=$check1)."
+           ;;
+   esac
+
 
 done
