Index: trunk/DataCheck/QuickLook/Step3.sh
===================================================================
--- trunk/DataCheck/QuickLook/Step3.sh	(revision 15438)
+++ trunk/DataCheck/QuickLook/Step3.sh	(revision 15518)
@@ -9,9 +9,6 @@
 export LD_LIBRARY_PATH=./:$LD_LIBRARY_PATH
 
-mars=/home/fact/Mars
+mars=/home/fact/SW.automatic.processing/Mars.svn.2013.04.29
 cd $mars
-pwd
-# use macro from different mars version until versions are sorted out
-mars2=/home/fact/SW.automatic.processing/Mars.svn.2013.04.12
 
 if ! [ "$1" = "run" ] && ! [ "$1" = "night" ]
@@ -53,5 +50,5 @@
 timebins=( 5 10 20 30 40 60 90 120 180 240 300 360 )
 
-echo ${dates[@]}
+#echo ${dates[@]}
 for date in ${dates[@]}
 do 
@@ -63,8 +60,8 @@
    query="SELECT fSourceKEY FROM RunInfo WHERE fNight="$date2" AND fSourceKey > 0 AND fRunTypeKEY=1 GROUP BY fSourceKey "
    sources=( `sendquery` )
-   echo "process "$date" -> sources: "${sources[@]}
+   printprocesslog "INFO process "$date" -> sources: "${sources[@]}
    for source in ${sources[@]}
    do 
-      echo $source
+      #echo $source
       printprocesslog "INFO processing files for source "$source
       outpath=$anapath/lightcurves/$date
@@ -76,12 +73,15 @@
          logfile=$outpath"/lightcurve"$source"_"$timebin"min_"$date2".log"
          outfile=$outpath"/lightcurve"$source"_"$timebin"min_"$date2".root"
-         echo $outfile
+         #echo $outfile
          printprocesslog "INFO starting lightcurve.C+ for source "$source" timebin "$timebin" night "$date2
       
-	 check1=`root -q -b $mars2/fact/analysis/lightcurve.C+\($source\,$date2\\,$date2\,$timebin\,"\"$resulttable1"\"\,"\"$outfile\""\) | tee $logfile | intgrep`
+	 check1=`root -q -b fact/analysis/lightcurve.C+\($source\,$date2\\,$date2\,$timebin\,"\"$resulttable1"\"\,"\"$outfile\""\) | tee $logfile | intgrep`
       
          case $check1 in
             0)   printprocesslog "INFO lightcurve.C was successful for source "$source" timebin "$timebin" night "$date2" (check1=$check1)"
-                 ./showplot -b --save-as-png $outfile
+                 if ! ./showplot -b --save-as-png $outfile >/dev/null
+                 then
+                    printprocesslog "WARN showplot -b --save-as-png "$outfile" failed."
+                 fi
                  ;;
             1)   printprocesslog "INFO lightcurve.C was successful for source "$source" timebin "$timebin" night "$date2", but nothing to plot (check1=$check1)"
@@ -96,12 +96,16 @@
          logfile=$outpath"/lightcurve"$source"_"$timebin"min_week.log"
          outfile=$outpath"/lightcurve"$source"_"$timebin"min_week.root"
-         echo $outfile
+         #echo $outfile
          printprocesslog "INFO starting lightcurve.C+ for source "$source" timebin "$timebin" night "$date2" last week ("$lastweek")"
       
-	 check1=`root -q -b $mars2/fact/analysis/lightcurve.C+\($source\,$lastweek\\,$date2\,$timebin\,"\"$resulttable1"\"\,"\"$outfile\""\) | tee $logfile | intgrep`
+	 check1=`root -q -b fact/analysis/lightcurve.C+\($source\,$lastweek\\,$date2\,$timebin\,"\"$resulttable1"\"\,"\"$outfile\""\) | tee $logfile | intgrep`
       
          case $check1 in
             0)   printprocesslog "INFO lightcurve.C was successful for source "$source" timebin "$timebin" night "$date2" last week (check1=$check1)"
-                 ./showplot -b --save-as-png $outfile
+                 #./showplot -b --save-as-png $outfile
+                 if ! ./showplot -b --save-as-png $outfile >/dev/null
+                 then
+                    printprocesslog "WARN showplot -b --save-as-png "$outfile" failed."
+                 fi
                  ;;
             1)   printprocesslog "INFO lightcurve.C was successful for source "$source" timebin "$timebin" night "$date2" last week, but nothing to plot (check1=$check1)"
@@ -114,12 +118,16 @@
          logfile=$outpath"/lightcurve"$source"_"$timebin"min_all.log"
          outfile=$outpath"/lightcurve"$source"_"$timebin"min_all.root"
-         echo $outfile
+         #echo $outfile
          printprocesslog "INFO starting lightcurve.C+ for source "$source" timebin "$timebin" night "$date2" all nights"
       
-	 check1=`root -q -b $mars2/fact/analysis/lightcurve.C+\($source\,$firstnight\\,$date2\,$timebin\,"\"$resulttable1"\"\,"\"$outfile\""\) | tee $logfile | intgrep`
+	 check1=`root -q -b fact/analysis/lightcurve.C+\($source\,$firstnight\\,$date2\,$timebin\,"\"$resulttable1"\"\,"\"$outfile\""\) | tee $logfile | intgrep`
       
          case $check1 in
             0)   printprocesslog "INFO lightcurve.C was successful for source "$source" timebin "$timebin" night "$date2" all nights (check1=$check1)"
-                 ./showplot -b --save-as-png $outfile
+                 #./showplot -b --save-as-png $outfile
+                 if ! ./showplot -b --save-as-png $outfile >/dev/null
+                 then
+                    printprocesslog "WARN showplot -b --save-as-png "$outfile" failed."
+                 fi
                  ;;
             1)   printprocesslog "INFO lightcurve.C was successful for source "$source" timebin "$timebin" night "$date2" all nights, but nothing to plot (check1=$check1)"
@@ -131,5 +139,6 @@
    done
    printprocesslog "INFO rsync output of source "$source" to gate."
-   rsync -av $anapath/lightcurves/ gate:/home/factwww/lightcurves
+   #rsync -av $anapath/lightcurves/ gate:/home/factwww/lightcurves
+   rsync -a $anapath/lightcurves/ gate:/home/factwww/lightcurves
 done
 
