Changeset 17901


Ignore:
Timestamp:
05/27/14 22:09:18 (10 years ago)
Author:
Daniela Dorner
Message:
improved logging
File:
1 edited

Legend:

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

    r17154 r17901  
    55printprocesslog "INFO starting $0"
    66
    7 seqfile=$1
    8 seqnum=`basename $seqfile | sed -e 's/[.]seq//g'`
    9 #inpath=`dirname $seqfile | sed -e "s/sequences/${1}\/callisto/"`
    10 inpath=`dirname $seqfile | sed -e "s/sequences/callisto/"`
    11 #outpath=`dirname $seqfile | sed -e "s/sequences/${1}\/star/"`
    12 outpath=`dirname $seqfile | sed -e "s/sequences/star/"`
    13 makedir $outpath
    14 logfile=$outpath"/"$seqnum"-images.log"
     7logfile=$1
    158
    169cd $mars
    1710
    1811# run star
    19 printprocesslog "INFO starting star.C for sequence "$seqnum
     12printprocesslog "INFO starting star_file.C for file "$2
    2013
    21 check1=`root -q -b fact/analysis/star.C\("\"$seqfile\""\,4.0\,2.5\,"\"$inpath\""\,"\"$outpath\""\) | tee $logfile | intgrep`
     14echo "root -q -b fact/analysis/star_file.C\("\"$2\""\,5.2\,3.3\,"\"$3\""\) | tee $logfile | intgrep"
     15check1=`root -q -b fact/analysis/star_file.C\("\"$2\""\,5.2\,3.3\,"\"$3\""\) | tee $logfile | intgrep`
    2216
    2317case $check1 in
    24    0)   printprocesslog "INFO star was successful for sequence "$seqnum" (check1=$check1)"
     18   0)   printprocesslog "INFO star was successful for file "$2" (check1=$check1)"
    2519        # run merpp
    26         printprocesslog "INFO starting merpp.C for sequence "$seqnum
    27         logfile=$outpath"/"$seqnum"-merpp.log"
     20        printprocesslog "INFO starting merpp.C for file "$4
     21        logfile=`echo $logfile | sed -e 's/images/merpp/g'`
    2822       
    29         check1=`root -q -b fact/analysis/merpp.C\("\"$seqfile\""\,"\"$outpath\""\) | tee $logfile | intgrep`
     23        echo "root -q -b fact/analysis/merpp_file.C\("\"$4\""\) | tee $logfile | intgrep"
     24        check2=`root -q -b fact/analysis/merpp_file.C\("\"$4\""\) | tee $logfile | intgrep`
    3025       
    31         case $check1 in
    32            0)   printprocesslog "INFO merpp was successful for sequence "$seqnum" (check1=$check1)"
     26        case $check2 in
     27           0)   printprocesslog "INFO merpp was successful for file "$4" (check2=$check2)"
    3328                ;;
    34            *)   printprocesslog "ERROR merpp3.C failed for sequence "$seqnum" (check1=$check1)"
     29           *)   printprocesslog "ERROR merpp_file.C failed for file "$4" -> check log "$logfile"  (check2=$check2)"
    3530                # delete image file in this case to be sure that ganymed doesn't try to process it
    36                 imgfile=$outpath"/"$seqnum"_I.root"
    37                 if ls $imgfile >/dev/null 2>&1
     31                if ls $4 >/dev/null 2>&1
    3832                then
    39                    rm -v $imagefile
     33                   rm -v $4
    4034                fi
    4135                ;;
    4236        esac
    4337        ;;
    44    *)   printprocesslog "ERROR star.C failed for sequence "$seqnum" (check1=$check1)"
     38   *)   printprocesslog "ERROR star_file.C failed for file "$2" -> check log "$1" (check1=$check1)"
     39        if ls $4 >/dev/null 2>&1
     40        then
     41           rm -v $4
     42        fi
    4543        ;;
    4644esac
Note: See TracChangeset for help on using the changeset viewer.