Changeset 7460 for trunk/MagicSoft/Mars/datacenter/scripts/runcallisto
- Timestamp:
- 01/10/06 22:12:58 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/scripts/runcallisto
r7426 r7460 20 20 # Author(s): Daniela Dorner 08/2004 <mailto:dorner@astro.uni-wuerzburg.de> 21 21 # 22 # Copyright: MAGIC Software Development, 2000-200 422 # Copyright: MAGIC Software Development, 2000-2006 23 23 # 24 24 # 25 25 # ======================================================================== 26 26 # 27 # This script is launching the calibration of sequences. 28 # 29 # In the case of calibration only one sequence is processed. Despite of 30 # that the structure of the script is such, that also more sequences could 31 # be processed. The restriction to one sequence has been made, as the 32 # calibration takes some time. There's one todo file per sequence. 33 # First the script searches for a todo file. Then the sequence from this 34 # todo file is calibrated and the merpp update is done. 35 # 36 # the callisto.rc files are stored in the setup directory 27 37 # 28 38 … … 32 42 set -C 33 43 44 # define callisto.rc files 34 45 callistorcnew=$setuppath/callisto/callisto.rc 35 46 callistorcmarapr05=$setuppath/callisto/callisto_MarApr05.rc … … 56 67 cd $mars 57 68 69 # get todo file 58 70 echo "checking if other todo-files are there" >> $scriptlog 2>&1 59 71 if ls $todofile-[1-9]*.txt >> $scriptlog 2>&1 … … 73 85 esac 74 86 75 if ls $todofile-[1-9]*.txt >> $scriptlog 2>&1 76 then 77 echo "other file(s) on disk " >> $scriptlog 2>&1 78 echo " -> choose one file and start calibrating" >> $scriptlog 2>&1 79 else 80 echo "getting list..." >> $scriptlog 2>&1 81 check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'` 82 83 case $check0 in 84 1) echo "check0=$check0 -> everything ok -> run callisto" >> $scriptlog 2>&1;; 85 *) echo "check0=$check0 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1;; 86 esac 87 fi 87 echo "getting list..." >> $scriptlog 2>&1 88 check0=`root -q -b $macrospath/getdolist.C+\("\"$table\""\,"\"$column\""\,"\"$date\""\,"\"$listpath\""\) | tee $getstatuslog | grep int | sed -e 's/(int)//'` 89 90 case $check0 in 91 1) echo "check0=$check0 -> everything ok -> run callisto" >> $scriptlog 2>&1;; 92 *) echo "check0=$check0 -> ERROR -> could not get todo list -> exit" >> $scriptlog 2>&1 93 rm -v $lockpath/lock-getting-callisto-list.txt >> $scriptlog 2>&1 94 date >> $scriptlog 2>&1 95 exit;; 96 esac 88 97 rm -v $lockpath/lock-getting-callisto-list.txt >> $scriptlog 2>&1 89 98 fi 90 99 91 100 # choose todo file 92 101 nr=bla 93 102 echo "finding the right todo-file" >> $scriptlog 2>&1 94 103 todofiles=`ls -r $listpath/ToDo-$table-$column-*` 95 96 #echo "todofiles: "${todofiles[@]} >> $scriptlog 2>&197 104 98 105 for todofile in ${todofiles[@]} … … 122 129 esac 123 130 131 # get sequence(s) from todo file 124 132 sequences=(`cat $todofile`) 125 126 133 if [ "$sequences" = "" ] 127 134 then … … 133 140 fi 134 141 142 # run calibration for sequence(s) 135 143 echo "sequences: "${sequences[@]} >> $scriptlog 2>&1 136 137 144 for sequence in ${sequences[@]} 138 145 do … … 146 153 echo "sequfile: "$sequfile >> $scriptlog 2>&1 147 154 155 # find callisto.rc file 148 156 if [ -e $outpath/callisto.rc ] 149 157 then … … 167 175 case $check1 in 168 176 0) echo "check1=$check1 -> everything ok -> doing update..." >> $scriptlog 2>&1 177 # running merpp update if calibration worked 178 # finding files, which have to be updated 169 179 echo "finding files to be updated" >> $scriptlog 2>&1 170 180 calfiles=`find $outpath -name *_Y_* ` … … 179 189 makedir $merpplogpath >> $scriptlog 2>&1 180 190 191 # updated calibrated data files with the information from the cc and caco files 181 192 for calfile in ${calfiles[@]} 182 193 do 183 194 echo "calfile: "$calfile >> $scriptlog 2>&1 195 # find cc and caco file 196 # if file is missing continue with next sequence 184 197 runno=`echo $calfile | cut -d_ -f2 | sed -e 's/^0//' | sed -e 's/^0//' | sed -e 's/^0//' ` 185 198 ccfile=`find /magic/subsystemdata/cc/ -name [2][0][0-2][0-9][0,1][0-9][0-3][0-9]_*${runno}_[P,D,C,S]_*_S.rep` … … 232 245 done 233 246 247 # set status for calibration if merpp updates are also done 234 248 echo "inserting the status for callisto for sequence $sequence into the db" >> $scriptlog 2>&1 235 249 setstatuslogpath=$logpath/setstatus/callisto/$no
Note:
See TracChangeset
for help on using the changeset viewer.