Ignore:
Timestamp:
05/09/07 17:05:15 (17 years ago)
Author:
Daniela Dorner
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r7954 r8482  
    2020#   Author(s): Daniela Dorner  08/2004 <mailto:dorner@astro.uni-wuerzburg.de>
    2121#
    22 #   Copyright: MAGIC Software Development, 2000-2006
     22#   Copyright: MAGIC Software Development, 2000-2007
    2323#
    2424#
     
    3636#    taken into account when doexclusions is running the next time
    3737# If this was successful, the status is inserted into the database using
    38 # the macro setstatus.C
     38# the function setstatus.
    3939#
    4040
     
    6363no=`printf %08d $run | cut -c 0-2`
    6464no2=`printf %08d $run`
    65 var1=$date
    66 var2=$no2
    67 rawfile=`find /magic/data/rawfiles/ -name *${run}_[D,P,C,S]_*_E.raw -o -name *${run}_[D,P,C,S]_*_E.raw.gz`
     65query="SELECT DATE_FORMAT(ADDDATE(fRunStart, INTERVAL +13 HOUR), '%Y/%m/%d') FROM RunData where fRunNumber="$run
     66date=`sendquery`
     67rawfile=`find /magic/data/rawfiles/$date -name *${run}_[D,P,C,S]_*_E.raw -o -name *${run}_[DPCS]_*_E.raw.gz`
    6868echo "rawfile: "$rawfile >> $scriptlog 2>&1
    69 date=`echo $rawfile | cut -c 22-31`
    7069# for sinope the date is needed in the format YYYY-MM-DD
    7170date2=`echo $date | sed -e 's/\//-/g'`
    7271
     72primvar=$no2
    7373setstatus "start" >> $scriptlog 2>&1
    7474
     
    113113   
    114114   case $check2 in
    115        0)   echo " check2=$check2 -> everything ok -> go on with $program..." >> $scriptlog 2>&1
    116             ;;
    117        *)   echo " check2=$check2 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1
    118             printprocesslog "ERROR sinope $sin failed for $rawfile"
    119             com=$Fsinope
    120 #            comadd=
    121             check=$check2
    122             setstatus "stop" >> $scriptlog 2>&1
    123             continue 2;;
     115      0)   echo " check2=$check2 -> everything ok -> go on with $program..." >> $scriptlog 2>&1
     116           ;;
     117      *)   echo " check2=$check2 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1
     118           printprocesslog "ERROR sinope $sin failed for $rawfile"
     119           com=$Fsinope
     120#           comadd=
     121           check=$check2
     122           setstatus "stop" >> $scriptlog 2>&1
     123           continue 2;;
    124124   esac
    125125   check2=1
     
    182182starttime="NULL"
    183183failedtime="NULL"
    184 var1=$date
    185 var2=$no2
    186184setstatus "stop" >> $scriptlog 2>&1
    187185
Note: See TracChangeset for help on using the changeset viewer.