Changeset 17093


Ignore:
Timestamp:
09/06/13 15:51:40 (11 years ago)
Author:
Daniela Dorner
Message:
new macro paths, usage of getdates function, prepared script to be used in RunMoreNights.sh, added error treatment for return value of macro
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/DataCheck/Processing/FillRatescans.sh

    r15329 r17093  
    99logfile=$runlogpath"/FillRatescan-"$datetime".log"
    1010date >> $logfile
     11
     12# this script doesn't need variable $doupdate
     13# filling is done by macro and update is always done
    1114
    1215# get last 3, 6 or 9 nights
     
    2225echo  `date`": processing the following night(s): "${dates[@]} >> $logfile 2>&1
    2326
    24 echo ${dates[@]}
     27#echo ${dates[@]}
    2528
    2629cd $mars
     
    3134   auxdir=$auxdata/$date
    3235   runnumber=`echo $date | sed -e 's/\///g'`
    33    echo $auxdir
    3436   
    3537   # check if aux files are available from that night
     
    4345   
    4446   ratescanfile=$auxdir/$runnumber.RATE_SCAN_DATA.fits
    45    ls $ratescanfile
     47   printprocesslog "INFO processing "$ratescanfile
     48   echo "INFO processing "$ratescanfile >> $logfile 2>&1
    4649   if ! [ -e $ratescanfile ]
    4750   then
     
    5659   fi
    5760
    58    echo "run fillratescan.C for night "$runnumber
    59    root -q -b -l fact/fillratescan.C\("\"$ratescanfile"\"\,kFALSE\)
     61   printprocesslog "INFO run fillratescan.C for night "$runnumber
     62   echo "run fillratescan.C for night "$runnumber >> $logfile 2>&1
     63   check1=`root -q -b -l fact/processing/fillratescan.C\("\"$ratescanfile"\"\,kFALSE\) | tee $logfile | intgrep`
     64   case $check1 in
     65      1)   printprocesslog "INFO fillratescan.C was successfully for night "$runumber" (check1=$check1)."
     66           ;;
     67      0)   printprocesslog "WARN connection to DB failed (check1=$check1)."
     68           ;;
     69      *)   printprocesslog "ERROR fillratescan.C failed for night "$runumber" (check1=$check1)."
     70           ;;
     71   esac
     72
    6073
    6174done
Note: See TracChangeset for help on using the changeset viewer.