Ignore:
Timestamp:
07/20/08 15:47:10 (16 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r8482 r9018  
    2020#   Author(s): Daniela Dorner  08/2004 <mailto:dorner@astro.uni-wuerzburg.de>
    2121#
    22 #   Copyright: MAGIC Software Development, 2000-2007
     22#   Copyright: MAGIC Software Development, 2000-2008
    2323#
    2424#
     
    3535# the function setstatus.
    3636#
    37 
    3837source `dirname $0`/sourcefile
    3938printprocesslog "INFO starting $0"
     
    6463for dataset in ${datasets[@]}
    6564do
    66    echo "checking files for dataset $dataset..." >> $scriptlog 2>&1
    67    printprocesslog "INFO checking files for dataset $dataset"
     65   echo "checking star done for sequences of dataset $dataset..." >> $scriptlog 2>&1
     66   printprocesslog "INFO checking star done for sequences of dataset $dataset"
     67
    6868   no=`printf %08d $dataset | cut -c 0-5`
    6969   no2=`printf %08d $dataset`
    70    datasetfile=$datasetpath/$no/dataset`printf %08d $dataset`.txt
    71    
    72    sequences=(`cat $datasetfile | grep Sequences | sed -e 's/SequencesOn://g' | sed -e 's/SequencesOff://g'`)
    73    if [ "$sequences" = "" ]
    74    then
    75       echo "no sequences found" >> $scriptlog 2>&1
    76       echo "continue with next dataset" >> $scriptlog 2>&1
    77       continue
    78    fi
    79    echo "sequences: "${sequences[@]} >> $scriptlog 2>&1
    80    
     70   dsnum=`printf %08d $dataset`
     71
     72   echo "run $program for sequence $sequence..." >> $scriptlog 2>&1
     73
    8174   outpath=$logpath/$program/$no/$no2
    8275   makedir $outpath  >> $scriptlog 2>&1
    83    
     76
    8477   primvar=$dataset
    8578   setstatus "start" >> $scriptlog 2>&1
    8679
    87    for sequence in ${sequences[@]}
    88    do
    89       echo "run $program for sequence $sequence..." >> $scriptlog 2>&1
    90       printprocesslog "INFO check availability for sequence $sequence"
     80   check1=`root -q -b $macrospath/checkstardone.C+\(\""$dsnum\""\) | tee $outpath/checkstardone-$dsnum.log | intgrep`
    9181
    92       check1=`root -q -b $macrospath/checkstardone.C+\(\""$sequence\""\) | tee $outpath/checkstardone-$sequence.log | intgrep`
     82   case $check1 in
     83      1)   echo " check1=$check1 -> everything ok -> continue with next dataset..." >> $scriptlog 2>&1 ;;
     84      2)   echo " check1=$check1 -> star files for dataset $dsnum not yet available -> continue..." >> $scriptlog 2>&1
     85           printprocesslog "INFO files not yet available for dataset $dsnum"
     86           check="no"
     87           break
     88           ;;
     89      0)   echo " check1=$check1 -> no connection to db -> continue..." >> $scriptlog 2>&1
     90           printprocesslog "WARN connection to DB failed"
     91           check="no"
     92           break
     93           ;;
     94      *)   echo " check1=$check1 -> ERROR " >> $scriptlog 2>&1
     95           printprocesslog "ERROR checkstardone.C failed"
     96           com=$Fstardone
     97           comadd=$sequence
     98           check=$check1
     99           break
     100           ;;
     101   esac
    93102
    94       case $check1 in
    95          1)   echo " check1=$check1 -> everything ok -> continue with next sequence..." >> $scriptlog 2>&1 ;;
    96          2)   echo " check1=$check1 -> files for sequence $sequence not yet available -> continue..." >> $scriptlog 2>&1
    97               printprocesslog "INFO files not yet available for sequence $sequence"
    98               check="no"
    99               break
    100               ;;
    101          0)   echo " check1=$check1 -> no connection to db -> continue..." >> $scriptlog 2>&1
    102               printprocesslog "WARN connection to DB failed"
    103               check="no"
    104               break
    105               ;;
    106          *)   echo " check1=$check1 -> ERROR " >> $scriptlog 2>&1
    107               printprocesslog "ERROR $program.C failed"
    108               com=$Fstardone
    109               comadd=$sequence
    110               check=$check1
    111               break
    112               ;;
    113       esac
    114    done
    115    
    116103   setstatus "stop" >> $scriptlog 2>&1
    117104done
    118105
    119106finish >> $scriptlog 2>&1
    120 
Note: See TracChangeset for help on using the changeset viewer.