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

Legend:

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

    r17155 r17902  
    55printprocesslog "INFO starting $0"
    66
    7 seqfile=$1
    8 seqnum=`basename $seqfile | sed -e 's/[.]seq//g'`
    9 #outpath=`dirname $seqfile | sed -e "s/sequences/${1}\/callisto/"`
    10 outpath=`dirname $seqfile | sed -e "s/sequences/callisto/"`
    11 makedir $outpath
    12 logfile=$outpath"/"$seqnum"-calibration.log"
     7logfile=$2
    138
    14 # make sure that no other RunCallisto.sh is started for this seq
     9# make sure that no other RunCallisto.sh is started for this run
    1510touch $logfile
    1611
     
    2823done
    2924
    30 # run callisto
    31 printprocesslog "INFO starting callisto.C for sequence "$seqnum
    32 
    33 check1=`root -q -b fact/analysis/callisto.C\("\"$seqfile\""\,"\"$outpath\""\) | tee $logfile | intgrep`
     25case $1 in
     26   drun) # process data run
     27         # run callisto
     28         echo "fact/analysis/callisto_data.C\("\"$3\""\,"\"$4\""\,"\"$5\""\,"\"\""\,"\"$6\""\) | tee $logfile "
     29         check1=`root -q -b fact/analysis/callisto_data.C\("\"$3\""\,"\"$4\""\,"\"$5\""\,"\"\""\,"\"$6\""\) | tee $logfile | intgrep`
     30         ;;
     31   prun) # process pedestal run
     32         echo "fact/analysis/callisto_pedestal.C\("\"$3\""\,"\"$4\"","\"$5\""\) | tee $logfile "
     33         check1=`root -q -b fact/analysis/callisto_pedestal.C\("\"$3\""\,"\"$4\"","\"$5\""\) | tee $logfile | intgrep`
     34         ;;
     35   crun) # process light-pulser run
     36         echo "fact/analysis/callisto_lightpulser.C\("\"$3\""\,"\"$4\""\,"\"$5\""\,"\"$6\""\) | tee $logfile "
     37         check1=`root -q -b fact/analysis/callisto_lightpulser.C\("\"$3\""\,"\"$4\""\,"\"$5\""\,"\"$6\""\) | tee $logfile | intgrep`
     38         ;;
     39   time) # do drs-calib
     40         echo "fact/analysis/callisto_drstime.C\("\"$3\""\,"\"$4\"","\"$5\""\) | tee $logfile "
     41         check1=`root -q -b fact/analysis/callisto_drstime.C\("\"$3\""\,"\"$4\"","\"$5\""\) | tee $logfile | intgrep`
     42         ;;
     43   *) # default
     44         printprocesslog "WARN wrong parameter given to script RunCallisto.sh :"$1
     45         ;;
     46esac
    3447
    3548case $check1 in
    36    0)   printprocesslog "INFO callisto was successful for sequence "$seqnum" (check1=$check1)"
    37         `dirname $0`/RunStar.sh $seqfile &
     49   0)   printprocesslog "INFO callisto was successful for file "$3" (check1=$check1)"
     50        if [ "$1" == "drun" ]
     51        then
     52           printprocesslog "INFO start RunStar.sh for file "$7
     53           starfile=`echo $7 | sed -e 's/callisto/star/g' -e 's/_C/_I/'`
     54           starlog=`echo $starfile | sed -e 's/_I.root/-images.log/'`
     55           outpath=`dirname $starfile`
     56           makedir $outpath
     57           `dirname $0`/RunStar.sh $starlog $7 $outpath $starfile
     58        fi
    3859        ;;
    39    *)   printprocesslog "ERROR callisto.C failed for sequence "$seqnum" (check1=$check1)"
     60   *)   printprocesslog "ERROR callisto failed for file "$3" (check1=$check1)"
    4061        ;;
    4162esac
Note: See TracChangeset for help on using the changeset viewer.