Changeset 18098 for trunk/DataCheck


Ignore:
Timestamp:
02/01/15 14:02:57 (10 years ago)
Author:
Daniela Dorner
Message:
fixed 2 bugs and improved logging
File:
1 edited

Legend:

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

    r18067 r18098  
    1717fi
    1818
    19 # getting coordinates from raw and drive
    20 date=`echo $starfile | grep -o -E '20[0-9][0-9]/[0-3][0-9]/[0-2][0-9]'`
     19# getting coordinates from raw and drive or DB
     20date=`echo $starfile | grep -o -E '20[0-9][0-9]/[0-3][0-9]/[0-3][0-9]'`
    2121drivefile=$auxdata"/"$date"/"`basename $starfile | cut -d_ -f1`".DRIVE_CONTROL_SOURCE_POSITION.fits"
    2222rawfile=$rawdata"/"$date"/"`basename $starfile | sed -e 's/_I.root/.fits.fz/'`
     
    2727   tstopf=`$factpath/fitsdump -h $rawfile  2>/dev/null | grep TSTOPF | grep -E -o '[.][0-9]+'`
    2828   tstop=${tstopi}${tstopf}
     29else
     30   printprocesslog "WARN "$rawfile" not found."
     31fi
     32if [ "$tstop" == "" ]
     33then
     34   printprocesslog "WARN tstop empty "$rawfile
     35fi
     36if ! ls $drivefile >/dev/null 2>&1
     37then
     38   printprocesslog "WARN "$drivefile" missing."
    2939fi
    3040if  ls $drivefile >/dev/null 2>&1  && ! [ "$tstop" == "" ]
     
    4555   fi
    4656else
     57   night=`echo $date | sed -e 's/\///g'`
     58   runid=`basename $starfile | cut -d_ -f2`
    4759   printprocesslog "INFO getting coordinates from DB."
    4860   query="SELECT fSourceKEY FROM RunInfo WHERE fNight="$night" AND fRunID="$runid
     
    5062   if [ "$sourcekey" == "" ]
    5163   then
    52       printprocesslog "WARN sourcekey empty - coordinates"${coordinates[@]}
    53       #echo "WARN sourcekey empty - coordinates"${coordinates[@]}" for "$rawfile
     64      printprocesslog "WARN sourcekey empty for "$night"_"$runid" - coordinates"${coordinates[@]}
    5465      finish
    5566   fi
     
    5869   if [ "${coordinates[0]}" == "" ] || [ "${coordinates[1]}" == "" ]
    5970   then
    60       printprocesslog "WARN couldn't get coordinates ("${coordinates[@]}") from DB."
    61       #echo "WARN couldn't get coordinates ("${coordinates[@]}") from "$drivefile
     71      printprocesslog "WARN couldn't get coordinates ("${coordinates[@]}") for "$night"_"$runid" from DB."
    6272      finish
    6373   fi
    6474   if [ "${coordinates[0]}" == "0" ] || [ "${coordinates[1]}" == "0" ]
    6575   then
    66       printprocesslog "WARN coordinates "${coordinates[@]}
    67       #echo "WARN coordinates "${coordinates[@]}
     76      printprocesslog "WARN coordinates "${coordinates[@]}" for "$night"_"$runid
    6877      finish
    6978   fi
     
    7685makedir $outpath
    7786
    78 output=$outpath/`basename $starfile | cut -dI -f1`
     87output=$outpath/`basename $starfile | cut -d_ -f1-2`
    7988logfile=$output"-ganymed.log"
    8089ganymedfile=$output"-analysis.root"
Note: See TracChangeset for help on using the changeset viewer.