Ignore:
Timestamp:
05/07/13 23:24:30 (12 years ago)
Author:
Daniela Dorner
Message:
removed logging to console to avoid emails from cron
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/DataCheck/QuickLook/Step3.sh

    r15438 r15518  
    99export LD_LIBRARY_PATH=./:$LD_LIBRARY_PATH
    1010
    11 mars=/home/fact/Mars
     11mars=/home/fact/SW.automatic.processing/Mars.svn.2013.04.29
    1212cd $mars
    13 pwd
    14 # use macro from different mars version until versions are sorted out
    15 mars2=/home/fact/SW.automatic.processing/Mars.svn.2013.04.12
    1613
    1714if ! [ "$1" = "run" ] && ! [ "$1" = "night" ]
     
    5350timebins=( 5 10 20 30 40 60 90 120 180 240 300 360 )
    5451
    55 echo ${dates[@]}
     52#echo ${dates[@]}
    5653for date in ${dates[@]}
    5754do
     
    6360   query="SELECT fSourceKEY FROM RunInfo WHERE fNight="$date2" AND fSourceKey > 0 AND fRunTypeKEY=1 GROUP BY fSourceKey "
    6461   sources=( `sendquery` )
    65    echo "process "$date" -> sources: "${sources[@]}
     62   printprocesslog "INFO process "$date" -> sources: "${sources[@]}
    6663   for source in ${sources[@]}
    6764   do
    68       echo $source
     65      #echo $source
    6966      printprocesslog "INFO processing files for source "$source
    7067      outpath=$anapath/lightcurves/$date
     
    7673         logfile=$outpath"/lightcurve"$source"_"$timebin"min_"$date2".log"
    7774         outfile=$outpath"/lightcurve"$source"_"$timebin"min_"$date2".root"
    78          echo $outfile
     75         #echo $outfile
    7976         printprocesslog "INFO starting lightcurve.C+ for source "$source" timebin "$timebin" night "$date2
    8077     
    81          check1=`root -q -b $mars2/fact/analysis/lightcurve.C+\($source\,$date2\\,$date2\,$timebin\,"\"$resulttable1"\"\,"\"$outfile\""\) | tee $logfile | intgrep`
     78         check1=`root -q -b fact/analysis/lightcurve.C+\($source\,$date2\\,$date2\,$timebin\,"\"$resulttable1"\"\,"\"$outfile\""\) | tee $logfile | intgrep`
    8279     
    8380         case $check1 in
    8481            0)   printprocesslog "INFO lightcurve.C was successful for source "$source" timebin "$timebin" night "$date2" (check1=$check1)"
    85                  ./showplot -b --save-as-png $outfile
     82                 if ! ./showplot -b --save-as-png $outfile >/dev/null
     83                 then
     84                    printprocesslog "WARN showplot -b --save-as-png "$outfile" failed."
     85                 fi
    8686                 ;;
    8787            1)   printprocesslog "INFO lightcurve.C was successful for source "$source" timebin "$timebin" night "$date2", but nothing to plot (check1=$check1)"
     
    9696         logfile=$outpath"/lightcurve"$source"_"$timebin"min_week.log"
    9797         outfile=$outpath"/lightcurve"$source"_"$timebin"min_week.root"
    98          echo $outfile
     98         #echo $outfile
    9999         printprocesslog "INFO starting lightcurve.C+ for source "$source" timebin "$timebin" night "$date2" last week ("$lastweek")"
    100100     
    101          check1=`root -q -b $mars2/fact/analysis/lightcurve.C+\($source\,$lastweek\\,$date2\,$timebin\,"\"$resulttable1"\"\,"\"$outfile\""\) | tee $logfile | intgrep`
     101         check1=`root -q -b fact/analysis/lightcurve.C+\($source\,$lastweek\\,$date2\,$timebin\,"\"$resulttable1"\"\,"\"$outfile\""\) | tee $logfile | intgrep`
    102102     
    103103         case $check1 in
    104104            0)   printprocesslog "INFO lightcurve.C was successful for source "$source" timebin "$timebin" night "$date2" last week (check1=$check1)"
    105                  ./showplot -b --save-as-png $outfile
     105                 #./showplot -b --save-as-png $outfile
     106                 if ! ./showplot -b --save-as-png $outfile >/dev/null
     107                 then
     108                    printprocesslog "WARN showplot -b --save-as-png "$outfile" failed."
     109                 fi
    106110                 ;;
    107111            1)   printprocesslog "INFO lightcurve.C was successful for source "$source" timebin "$timebin" night "$date2" last week, but nothing to plot (check1=$check1)"
     
    114118         logfile=$outpath"/lightcurve"$source"_"$timebin"min_all.log"
    115119         outfile=$outpath"/lightcurve"$source"_"$timebin"min_all.root"
    116          echo $outfile
     120         #echo $outfile
    117121         printprocesslog "INFO starting lightcurve.C+ for source "$source" timebin "$timebin" night "$date2" all nights"
    118122     
    119          check1=`root -q -b $mars2/fact/analysis/lightcurve.C+\($source\,$firstnight\\,$date2\,$timebin\,"\"$resulttable1"\"\,"\"$outfile\""\) | tee $logfile | intgrep`
     123         check1=`root -q -b fact/analysis/lightcurve.C+\($source\,$firstnight\\,$date2\,$timebin\,"\"$resulttable1"\"\,"\"$outfile\""\) | tee $logfile | intgrep`
    120124     
    121125         case $check1 in
    122126            0)   printprocesslog "INFO lightcurve.C was successful for source "$source" timebin "$timebin" night "$date2" all nights (check1=$check1)"
    123                  ./showplot -b --save-as-png $outfile
     127                 #./showplot -b --save-as-png $outfile
     128                 if ! ./showplot -b --save-as-png $outfile >/dev/null
     129                 then
     130                    printprocesslog "WARN showplot -b --save-as-png "$outfile" failed."
     131                 fi
    124132                 ;;
    125133            1)   printprocesslog "INFO lightcurve.C was successful for source "$source" timebin "$timebin" night "$date2" all nights, but nothing to plot (check1=$check1)"
     
    131139   done
    132140   printprocesslog "INFO rsync output of source "$source" to gate."
    133    rsync -av $anapath/lightcurves/ gate:/home/factwww/lightcurves
     141   #rsync -av $anapath/lightcurves/ gate:/home/factwww/lightcurves
     142   rsync -a $anapath/lightcurves/ gate:/home/factwww/lightcurves
    134143done
    135144
Note: See TracChangeset for help on using the changeset viewer.