Ignore:
Timestamp:
08/25/06 22:09:49 (18 years ago)
Author:
Daniela Dorner
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r7938 r7944  
    3636#
    3737
     38source `dirname $0`/sourcefile
     39printprocesslog "INFO starting $0"
    3840program=checkstardone
    39 source `dirname $0`/sourcefile
    40 
    4141column=fStarFilesAvail
    4242
    43 lockfile=$lockpath/lock-$program.txt
    44 
    45 scriptlogpath=$runlogpath/$program
    46 makedir $scriptlogpath
    47 scriptlog=$scriptlogpath/$program-$datetime.log
    48 
     43scriptlog=$runlogpath/$program-$datetime.log
    4944date >> $scriptlog 2>&1
    5045
    5146# check if script is already running
     47lockfile=$lockpath/lock-$program.txt
    5248checklock  >> $scriptlog 2>&1
    5349
     
    6157   finish >> $scriptlog 2>&1
    6258fi
    63 echo "datasets: "${datasets[@]} #>> $scriptlog 2>&1
     59echo "datasets: "${datasets[@]} >> $scriptlog 2>&1
    6460rm -v $todofile >> $scriptlog 2>&1
    6561
     
    6864for dataset in ${datasets[@]}
    6965do
     66   echo "checking files for dataset $dataset..." >> $scriptlog 2>&1
     67   printprocesslog "INFO checking files for dataset $dataset"
    7068   no=`printf %08d $dataset | cut -c 0-5`
    7169   no2=`printf %08d $dataset`
    7270   var1=$no
    7371   var2=$dataset
    74    echo "checking files for dataset $dataset..." >> $scriptlog 2>&1
    7572   datasetfile=$datasetpath/$no/dataset`printf %08d $dataset`.txt
     73   
    7674   sequences=(`cat $datasetfile | grep Sequences | sed -e 's/SequencesOn://g' | sed -e 's/SequencesOff://g'`)
    77    
    7875   if [ "$sequences" = "" ]
    7976   then
     
    8279      continue
    8380   fi
     81   echo "sequences: "${sequences[@]} >> $scriptlog 2>&1
    8482   
    85    echo "sequences: "${sequences[@]} >> $scriptlog 2>&1
    86 
    8783   outpath=$logpath/$program/$no/$no2
    8884   makedir $outpath  >> $scriptlog 2>&1
     
    9389   do
    9490      echo "run $program for sequence $sequence..." >> $scriptlog 2>&1
     91      printprocesslog "INFO check availability for sequence $sequence"
    9592
    9693      check1=`root -q -b $macrospath/checkstardone.C+\(\""$sequence\""\) | tee $outpath/checkstardone-$sequence.log | grep int | sed -e 's/(int)//'`
     
    9996         1)   echo " check1=$check1 -> everything ok -> continue with next sequence..." >> $scriptlog 2>&1 ;;
    10097         2)   echo " check1=$check1 -> files for sequence $sequence not yet available -> continue..." >> $scriptlog 2>&1
     98              printprocesslog "INFO files not yet available for sequence $sequence"
    10199              check="no"
    102100              break
    103101              ;;
    104102         0)   echo " check1=$check1 -> no connection to db -> continue..." >> $scriptlog 2>&1
     103              printprocesslog "WARN connection to DB failed"
    105104              check="no"
    106105              break
    107106              ;;
    108107         *)   echo " check1=$check1 -> ERROR " >> $scriptlog 2>&1
     108              printprocesslog "ERROR $program.C failed"
    109109              com=$Fstardone
    110110              comadd=$sequence
Note: See TracChangeset for help on using the changeset viewer.