Ignore:
Timestamp:
02/19/09 21:22:19 (16 years ago)
Author:
Daniela Dorner
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/datacenter/scripts/fillcallisto

    r9054 r9355  
    4343set -C
    4444
    45 scriptlog=$runlogpath/$program-$datetime.log
    46 date >> $scriptlog 2>&1
    47 
    4845# check if the script is already running
    4946lockfile=$lockpath/lock-$program.txt
    50 checklock  >> $scriptlog 2>&1
     47checklock
    5148
    5249# get todo file
    53 gettodo  >> $scriptlog 2>&1
     50gettodo
    5451
    5552cd $mars
     
    6764   calibfile=$path/calib$no2.root
    6865   fillcallistologpath=$logpath/$program/$no
    69    makedir $fillcallistologpath >> $scriptlog 2>&1
     66   makedir $fillcallistologpath
    7067   fillcaliblog=$fillcallistologpath/fillcalib-$sequence.log
    7168   fillsignallog=$fillcallistologpath/fillsignal-$sequence.log
    7269
    73    echo "run $program for sequence $sequence" >> $scriptlog 2>&1
    74    setstatus "start" >> $scriptlog 2>&1
    75    echo "run fillcalib..." >> $scriptlog 2>&1
     70   printprocesslog "INFO run $program for sequence $sequence"
     71   setstatus "start"
    7672   printprocesslog "INFO starting fillcalib for sequence $sequence"
    7773
     
    7975
    8076   case $check1 in
    81       1)   echo " check1=$check1 -> everything ok -> run fillsignal " >> $scriptlog 2>&1
    82            printprocesslog "INFO done fillcalib successfully for sequence $sequence"
     77      1)   printprocesslog "INFO done fillcalib successfully for sequence $sequence (check1=$check1)"
    8378           ;;
    84       0)   echo " check1=$check1 -> no connection to db -> continue..." >> $scriptlog 2>&1
    85            printprocesslog "WARN connection to DB failed"
     79      0)   printprocesslog "WARN connection to DB failed (check1=$check1)"
    8680           check="no"
    87            setstatus "stop" >> $scriptlog 2>&1
     81           setstatus "stop"
    8882           continue ;;
    89       *)   echo " check1=$check1 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1
    90            printprocesslog "ERROR fillcalib failed for sequence $sequence"
     83      *)   printprocesslog "ERROR fillcalib failed for sequence $sequence (check1=$check1)"
    9184           com=$Ffillcalib
    9285           check=$check1
    93            setstatus "stop" >> $scriptlog 2>&1
     86           setstatus "stop"
    9487           continue ;;
    9588   esac
     
    9891   check2=`root -q -b $macrospath/fillsignal.C+\("\"$signalfile\""\,kFALSE\) | tee $fillsignallog | intgrep`
    9992   case $check2 in
    100       1)   echo " check2=$check2 -> everything ok " >> $scriptlog 2>&1
    101            printprocesslog "INFO done fillsignal successfully for sequence $sequence"
     93      1)   printprocesslog "INFO done fillsignal successfully for sequence $sequence (check2=$check2)"
    10294           ;;
    103       0)   echo " check2=$check2 -> no connection to db -> continue..." >> $scriptlog 2>&1
    104            printprocesslog "WARN connection to DB failed"
     95      0)   printprocesslog "WARN connection to DB failed (check2=$check2)"
    10596           check="no"
    10697           ;;
    107       *)   echo " check2=$check2 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1
    108            printprocesslog "ERROR fillsignal failed for sequence $sequence"
     98      *)   printprocesslog "ERROR fillsignal failed for sequence $sequence (check2=$check2)"
    10999           com=$Ffillsignal
    110100           check=$check2
     
    112102   esac
    113103   
    114    setstatus "stop" >> $scriptlog 2>&1
     104   setstatus "stop"
    115105done
    116106
    117 finish >> $scriptlog 2>&1
     107finish
    118108
Note: See TracChangeset for help on using the changeset viewer.