Changeset 18070


Ignore:
Timestamp:
01/04/15 04:58:51 (10 years ago)
Author:
Daniela Dorner
Message:
improved logging, added second try of callisto in case first fails
File:
1 edited

Legend:

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

    r17902 r18070  
    1313
    1414# check how many callistos are running
    15 callistocount=`ps aux | grep callisto.C | grep -E -o '20[12][0-9][01][0-9][0-3][0-9]_[0-9][0-9][0-9]' | sort | uniq | wc -l`
     15callistocount=`ps aux | grep callisto_ | grep -E -o '20[12][0-9][01][0-9][0-3][0-9]_[0-9][0-9][0-9]' | sort | uniq | wc -l`
    1616
    1717while [ $callistocount -ge $numcallistos ]
    1818do
    1919   source `dirname $0`/../Sourcefile.sh
    20    printprocesslog "INFO wait "$callistowait" as "$callistocound" callistos running ( "$numcallistos" allowed). "
     20   printprocesslog "INFO wait "$callistowait" as "$callistocount" callistos running ( "$numcallistos" allowed). "
    2121   sleep $callistowait
    22    callistocount=`ps aux | grep callisto.C | grep -E -o '20[12][0-9][01][0-9][0-3][0-9]_[0-9][0-9][0-9]' | sort | uniq | wc -l`
     22   callistocount=`ps aux | grep callisto_ | grep -E -o '20[12][0-9][01][0-9][0-3][0-9]_[0-9][0-9][0-9]' | sort | uniq | wc -l`
    2323done
    2424
     
    2626   drun) # process data run
    2727         # run callisto
    28          echo "fact/analysis/callisto_data.C\("\"$3\""\,"\"$4\""\,"\"$5\""\,"\"\""\,"\"$6\""\) | tee $logfile "
     28         printprocesslog "DEBUG fact/analysis/callisto_data.C\("\"$3\""\,"\"$4\""\,"\"$5\""\,"\"\""\,"\"$6\""\) | tee $logfile "
    2929         check1=`root -q -b fact/analysis/callisto_data.C\("\"$3\""\,"\"$4\""\,"\"$5\""\,"\"\""\,"\"$6\""\) | tee $logfile | intgrep`
    3030         ;;
    3131   prun) # process pedestal run
    32          echo "fact/analysis/callisto_pedestal.C\("\"$3\""\,"\"$4\"","\"$5\""\) | tee $logfile "
     32         printprocesslog "DEBUG fact/analysis/callisto_pedestal.C\("\"$3\""\,"\"$4\"","\"$5\""\) | tee $logfile "
    3333         check1=`root -q -b fact/analysis/callisto_pedestal.C\("\"$3\""\,"\"$4\"","\"$5\""\) | tee $logfile | intgrep`
    3434         ;;
    3535   crun) # process light-pulser run
    36          echo "fact/analysis/callisto_lightpulser.C\("\"$3\""\,"\"$4\""\,"\"$5\""\,"\"$6\""\) | tee $logfile "
     36         printprocesslog "DEBUG fact/analysis/callisto_lightpulser.C\("\"$3\""\,"\"$4\""\,"\"$5\""\,"\"$6\""\) | tee $logfile "
    3737         check1=`root -q -b fact/analysis/callisto_lightpulser.C\("\"$3\""\,"\"$4\""\,"\"$5\""\,"\"$6\""\) | tee $logfile | intgrep`
    3838         ;;
    3939   time) # do drs-calib
    40          echo "fact/analysis/callisto_drstime.C\("\"$3\""\,"\"$4\"","\"$5\""\) | tee $logfile "
     40         printprocesslog "DEBUG fact/analysis/callisto_drstime.C\("\"$3\""\,"\"$4\"","\"$5\""\) | tee $logfile "
    4141         check1=`root -q -b fact/analysis/callisto_drstime.C\("\"$3\""\,"\"$4\"","\"$5\""\) | tee $logfile | intgrep`
    4242         ;;
     
    5959        ;;
    6060   *)   printprocesslog "ERROR callisto failed for file "$3" (check1=$check1)"
     61        # allow for reprocessing in case callisto fails once
     62        cplogfile=$logfile.cp
     63        if ! ls $cplogfile >/dev/null
     64        then
     65           mv $logfile $cplogfile
     66        fi
    6167        ;;
    6268esac
Note: See TracChangeset for help on using the changeset viewer.