Changeset 20093 for trunk/Mars


Ignore:
Timestamp:
04/28/21 18:27:29 (4 years ago)
Author:
maslowski
Message:
Fixed error handeling regarding fitsdump, star and callisto. Also Fixed some typos.
Location:
trunk/Mars/hawc/processing/DiskToDB
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/hawc/processing/DiskToDB/extract-raw-header2.sh

    r20091 r20093  
    3232# define variables
    3333OUTPUT=insert-raw.sql
    34 readonly FITSDUMP="/home/frankm/Dateien/FACT++_0/build/fitsdump"
     34readonly FITSDUMP="/home/frankm/Dateien/FACT++/build/fitsdump"
    3535readonly PROGRAM=$0
    3636INSERT="INSERT INTO"
     
    167167        # necessary, removes enclosures around hex-numbers and adds
    168168        # commas after all lines except the last one
    169         # FIXME: fitsdump -h alway returns error. Must be fixed in FACT++
    170         #        so pipe errors from this are ignored. Also fitsdump outputs
    171         #        some info to filedescriptor 2. So error outputs are now
    172         #        redirected to filedescriptor 4, which redirects to LOG.
    173         set +o pipefail
    174169        RESULT=`${FITSDUMP} -h "${ROOT}" 2>&4 \
    175170                | grep "${TOGREP}" \
     
    189184                | sed "s/^\(.*\)'\(0x[0-9a-f]*\)'\(.*\)$/\1\2\3/g" \
    190185                | sed '$!s/$/,/'`
    191         set -o pipefail
    192186
    193187        # compare to refference header and count commas
  • trunk/Mars/hawc/processing/DiskToDB/run-callisto2.sh

    r20091 r20093  
    166166                       RC=${PIPESTATUS[0]}
    167167
    168                        CALLERR=`grep "Error" "${OUT}"/${PREFIX}.log || true`
    169                        if [ -n "${CALLERR}" ]
    170                        then
    171                                echo "ERROR: Line $LINENO error in callisto.C" >&2
    172                                echo "error was: ${CALLERR}" >&2
    173                                exit 1
    174                        fi
    175168
    176169                       # Remember exit status of callisto
  • trunk/Mars/hawc/processing/DiskToDB/run-root2sql2.sh

    r20091 r20093  
    2828
    2929# Path to the executable
    30 readonly ROOT2SQL="/home/frankm/Dateien/FACT++_0/build/root2sql"
     30readonly ROOT2SQL="/home/frankm/Dateien/FACT++/build/root2sql"
    3131readonly PROGRAM=${0}
    3232
  • trunk/Mars/hawc/processing/DiskToDB/run-scripts.sh

    r20091 r20093  
    7777readonly DATE=`date +%Y%m%d_%H%M`
    7878readonly LOG="./log/${SCRPTN}_${DATE}.log"
    79 # exec 3>&1 1>>${LOG}
    80 # exec 4>>${LOG}
    81 exec 3>&1
    82 exec 4>&1
     79exec 3>&1 1>>${LOG}
     80exec 4>>${LOG}
     81# exec 3>&1
     82# exec 4>&1
    8383
    8484echo "Start processing data"
     
    180180fi
    181181
    182 echo "Updating database" >&3
     182echo "Updating database"
    183183
    184184echo "Nights to process:"
     
    224224        fi
    225225
    226         # if [ ${STATUS} -lt "3" ]
    227         if [ "a" = "b" ]
     226        if [ ${STATUS} -lt "3" ]
    228227        then
    229228                # Get aux data
     
    266265        fi
    267266
    268         SetStatus ${CRED} ${TEL} "4" ${NIGHT}
    269267        if [ ${STATUS} -lt "5" ]
    270268        then
  • trunk/Mars/hawc/processing/DiskToDB/run-star2.sh

    r20091 r20093  
    156156                        RC=${PIPESTATUS[0]}
    157157
    158                         STARERR=`grep "Error" "${OUT}"/${PREFIX}.log || true`
    159                         BADSTRG=`grep "Error in <ReplaceSubs>: bad string number:"\
    160                                 "${OUT}"/${PREFIX}.log || true`
    161                         if [ -n "${STARERR}" ] && [ -z "${BADSTRG}" ]
    162                         then
    163                                 echo "ERROR: Line $LINENO error in star.C" >&2
    164                                 echo "error was: ${STARERR}" >&2
    165                                 exit 1
    166                         fi
    167 
    168158                        echo RC=${RC} | tee -a "${OUT}"/${PREFIX}.log
    169159                        echo ${RC} > "${OUT}"/.${PREFIX}.done
Note: See TracChangeset for help on using the changeset viewer.