Changeset 9018 for trunk/MagicSoft/Mars/datacenter/scripts/checkstardone
- Timestamp:
- 07/20/08 15:47:10 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/scripts/checkstardone
r8482 r9018 20 20 # Author(s): Daniela Dorner 08/2004 <mailto:dorner@astro.uni-wuerzburg.de> 21 21 # 22 # Copyright: MAGIC Software Development, 2000-200 722 # Copyright: MAGIC Software Development, 2000-2008 23 23 # 24 24 # … … 35 35 # the function setstatus. 36 36 # 37 38 37 source `dirname $0`/sourcefile 39 38 printprocesslog "INFO starting $0" … … 64 63 for dataset in ${datasets[@]} 65 64 do 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 68 68 no=`printf %08d $dataset | cut -c 0-5` 69 69 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 81 74 outpath=$logpath/$program/$no/$no2 82 75 makedir $outpath >> $scriptlog 2>&1 83 76 84 77 primvar=$dataset 85 78 setstatus "start" >> $scriptlog 2>&1 86 79 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` 91 81 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 93 102 94 case $check1 in95 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>&197 printprocesslog "INFO files not yet available for sequence $sequence"98 check="no"99 break100 ;;101 0) echo " check1=$check1 -> no connection to db -> continue..." >> $scriptlog 2>&1102 printprocesslog "WARN connection to DB failed"103 check="no"104 break105 ;;106 *) echo " check1=$check1 -> ERROR " >> $scriptlog 2>&1107 printprocesslog "ERROR $program.C failed"108 com=$Fstardone109 comadd=$sequence110 check=$check1111 break112 ;;113 esac114 done115 116 103 setstatus "stop" >> $scriptlog 2>&1 117 104 done 118 105 119 106 finish >> $scriptlog 2>&1 120
Note:
See TracChangeset
for help on using the changeset viewer.