Changeset 8231 for trunk/MagicSoft/Mars/scripts/processsequence
- Timestamp:
- 12/13/06 14:23:09 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/scripts/processsequence
r8034 r8231 66 66 echo "" 67 67 echo "Remarks: " 68 echo " - you can set the variables (or part of it)also in the script "68 echo " - you can set the needed variables also in the script " 69 69 echo " - you have to set the outpath and either the sequence number or the sequence file" 70 70 echo " (if both is set, the sequence given by the sequencefile is processed)" 71 echo " - you have to execute the script from your mars directory" 71 72 echo "" 72 73 exit 73 74 } 75 76 function checkreturncode() 77 { 78 case $check in 79 0) echo "$program finished sucessfully" 80 echo "" 81 ;; 82 [1-9]|[0-9][0-9]|1[0-1][0-9]|12[0-7]) 83 echo -n "ERROR@$HOSTNAME: $program returned $check - please check the logfile $logfile" 84 if [ "$program" == "callisto" ] 85 then 86 echo -n " - for more details see http://www.astro.uni-wuerzburg.de/datacenter/instructions/intern/errorcoding.txt" 87 fi 88 echo " you executed the following command: "$command 89 exit 90 ;; 91 *) echo -n "ERROR@$HOSTNAME: $program returned $check - please check the logfile $logfile" 92 echo -n " $program returned a signal > 127 ($check)" 93 echo " you executed the following command: "$command 94 exit;; 95 esac 96 } 97 74 98 75 99 interactive="yes" … … 80 104 --sequ) shift 81 105 sequence=$1 82 ;;83 --mars) shift84 mars=$185 106 ;; 86 107 --out) shift … … 136 157 echo " sequence: "$sequence 137 158 echo " sequfile: "$sequfile 138 if ! [ "$star" = "yes" ] || [ "$cal" = "yes" ]139 then159 # if ! [ "$star" = "yes" ] || [ "$cal" = "yes" ] 160 # then 140 161 calpath=$outpath"/callisto/$n8" 141 162 echo " path where calibration files are stored : "$calpath 142 fi163 # fi 143 164 if ! [ "$cal" = "yes" ] || [ "$star" = "yes" ] 144 165 then … … 148 169 else 149 170 echo " sequfile: "$sequfile 150 if ! [ "$star" = "yes" ] || [ "$cal" = "yes" ]151 then171 # if ! [ "$star" = "yes" ] || [ "$cal" = "yes" ] 172 # then 152 173 calpath=$outpath"/callisto" 153 174 echo " path where calibration files are stored : "$calpath 154 fi175 # fi 155 176 if ! [ "$cal" = "yes" ] || [ "$star" = "yes" ] 156 177 then … … 185 206 mkdir -pv $calpath 186 207 187 echo "run callisto..." 188 echo "./callisto -b -q -f --log=$calpath/callisto$sequence.log --out=$calpath $sequfile " 189 ./callisto -b -q -f --log=$calpath/callisto$sequence.log --out=$calpath $sequfile 208 program=callisto 209 echo "run $program..." 210 logfile=$calpath/$program$sequence.log 211 command="./$program -b -q -f --log=$logfile --out=$calpath $sequfile " 212 echo $command 213 $command 190 214 check=$? 191 case $check in 192 0) echo "callisto finished sucessfully" 193 echo "";; 194 *) echo -n "ERROR: callisto returned $check - please check " 195 echo -n "http://www.astro.uni-wuerzburg.de/datacenter/instructions/intern/errorcoding.txt" 196 echo " for more details" 197 exit;; 198 esac 199 215 checkreturncode 200 216 201 217 calfiles=`find $calpath -name [2][0][0-2][0-9][0,1][0-9][0-3][0-9]_*_Y_*.root` … … 214 230 215 231 runno=`echo $calfile | cut -d_ -f2 | sed -e 's/^0//' | sed -e 's/^0//' | sed -e 's/^0//' ` 216 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`217 cacofile=`find /magic/subsystemdata/caco/ -name dc_ [2][0][0-2][0-9]_[0,1][0-9]_[0-3][0-9]_*${runno}_*.txt`232 ccfile=`find /magic/subsystemdata/cc/ -name 20[0-2][0-9][0,1][0-9][0-3][0-9]_*${runno}_[P,D,C,S]_*_S.rep` 233 cacofile=`find /magic/subsystemdata/caco/ -name dc_20[0-2][0-9]_[01][0-9]_[0-3][0-9]_*${runno}_*.txt` 218 234 echo "runno: "$runno 219 235 echo "ccfile: "$ccfile … … 245 261 done 246 262 fi 263 264 program=merppccupdate 265 logfile=$merpplogpath/$program$runno.log 266 command="./merpp -u --log=$logfile --runfile=$runno $ccfile $calfile " 267 echo $command 268 $command 269 check=$? 270 checkreturncode 247 271 248 logfile=$merpplogpath/merppccupdate$runno.log 249 echo "./merpp -u --log=$logfile --runfile=$runno $ccfile $calfile " 250 ./merpp -u --log=$logfile --runfile=$runno $ccfile $calfile 272 program=merppcacoupdate 273 logfile=$merpplogpath/$program$runno.log 274 command="./merpp -u --log=$logfile --auto-time $cacofile $calfile" 275 echo $command 276 $command 251 277 check=$? 252 case $check in 253 0) ;; 254 *) echo "ERROR: merppccupdate returned $check " 255 echo "please check the logfile $logfile " 256 exit;; 257 esac 258 259 logfile=$merpplogpath/merppcacoupdate$runno.log 260 echo "./merpp -u --log=$logfile --auto-time $cacofile $calfile " 261 ./merpp -u --log=$logfile --auto-time $cacofile $calfile 262 check=$? 263 case $check in 264 0) ;; 265 *) echo "ERROR: merppcacoupdate returned $check " 266 echo "please check the logfile $logfile " 267 exit;; 268 esac 278 checkreturncode 279 269 280 done 270 281 echo "merppupdate is finished" … … 276 287 mkdir -pv $starpath 277 288 278 echo "run star..." 279 logfile=$starpath/star$sequence.log 289 program=star 290 echo "run $program..." 291 logfile=$starpath/$program$sequence.log 280 292 if ! ls $calpath 281 293 then 282 echo "couldn't find $calpath => taking standard inpath for star" 283 echo "./star -b -q -f --log=$logfile --out=$starpath $sequfile " 284 ./star -b -q -f --log=$logfile --out=$starpath $sequfile 294 echo "couldn't find $calpath => taking standard inpath for $program" 295 command="./$program -b -q -f --log=$logfile --out=$starpath $sequfile" 296 echo $command 297 $command 285 298 else 286 echo "./star -b -q -f --log=$logfile --ind=$calpath --out=$starpath $sequfile " 287 ./star -b -q -f --log=$logfile --ind=$calpath --out=$starpath $sequfile 299 command="./$program -b -q -f --log=$logfile --ind=$calpath --out=$starpath $sequfile" 300 echo $command 301 $command 288 302 fi 289 303 check=$? 290 case $check in 291 0) echo "star finished sucessfully" 292 echo "";; 293 *) echo "ERROR: star returned $check - please check " 294 echo "please check the logfile $logfile " 295 exit;; 296 esac 297 298 echo "star is finished " 299 fi 300 304 checkreturncode 305 fi 306
Note:
See TracChangeset
for help on using the changeset viewer.