Changeset 540 for BAORadio/AmasNancay/proc_rawonoff.sh
- Timestamp:
- Oct 3, 2011, 10:58:41 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BAORadio/AmasNancay/proc_rawonoff.sh
r535 r540 126 126 $ECHO "DEBUG (${scriptName}): START call getscafiles.sh ${sourceRadio} ${dateSelected}" 127 127 OUT1=./getScaStatus.$$ 128 $RM -f ${tmppublicpath}/getscafiles.finished 128 #JEC 29/9/11 avoid finished stuff 129 #$RM -f ${tmppublicpath}/getscafiles.finished 129 130 ${scriptpath}/getscafiles.sh ${sourceRadio} ${dateSelected} > ${OUT1} 2>&1 130 while [ ! -f "${tmppublicpath}/getscafiles.finished" ]; do131 $ECHO "INFO (${scriptName}): waiting for ${tmppublicpath}/getscafiles.finished"132 date +%T133 sleep 30134 done135 $RM -f ${tmppublicpath}/getscafiles.finished131 #while [ ! -f "${tmppublicpath}/getscafiles.finished" ]; do 132 # $ECHO "INFO (${scriptName}): waiting for ${tmppublicpath}/getscafiles.finished" 133 # date +%T 134 # sleep 30 135 #done 136 #$RM -f ${tmppublicpath}/getscafiles.finished 136 137 $ECHO "DEBUG (${scriptName}): END" 137 138 … … 144 145 $CAT ${OUT1} 145 146 $ECHO "DEBUG (${scriptName}): END" 146 touch ${tmppublicpath}/proc_script.finished 147 #JEC 29/9/11 avoid finished stuff 148 # touch ${tmppublicpath}/proc_script.finished 147 149 exit 1 148 150 fi … … 155 157 $CAT ${OUT1} 156 158 $ECHO "DEBUG (${scriptName}): END" 157 touch ${tmppublicpath}/proc_script.finished 159 #JEC 29/9/11 avoid finished stuff 160 # touch ${tmppublicpath}/proc_script.finished 158 161 exit 1 159 162 fi … … 189 192 $ECHO "FATAL (${scriptName}): error while iget:" 190 193 $ECHO $igetStatus 191 touch ${tmppublicpath}/proc_script.finished 194 #JEC 29/9/11 avoid finished stuff 195 # touch ${tmppublicpath}/proc_script.finished 192 196 exit 1 193 197 fi … … 200 204 #Get list of file to process 201 205 headerFileSelected=./selectSignal.$$ 202 $RM -f ${tmppublicpath}/select.finished 206 #JEC 29/9/11 avoid finished stuff 207 #$RM -f ${tmppublicpath}/select.finished 203 208 ${scriptpath}/select.sh ${scaFileSummarized} ${dirFiberfile} ${typeofproc} | $GREP "^#[0-9]" | $SED "s/^#//" > $headerFileSelected 204 while [ ! -f "${tmppublicpath}/select.finished" ]; do205 $ECHO "INFO (${scriptName}): waiting for ${tmppublicpath}/select.finished"206 date +%T207 sleep 30208 done209 $RM ${tmppublicpath}/select.finished209 #while [ ! -f "${tmppublicpath}/select.finished" ]; do 210 # $ECHO "INFO (${scriptName}): waiting for ${tmppublicpath}/select.finished" 211 # date +%T 212 # sleep 30 213 #done 214 #$RM ${tmppublicpath}/select.finished 210 215 # 211 216 $ECHO "DEBUG (${scriptName}): END" … … 229 234 if [ ${#cycleArray[*]} -eq 0 -o ${#filesArray[*]} -eq 0 ]; then 230 235 $ECHO "FATAL (${scriptName}): no header file selected (${#cycleArray[*]}, ${#filesArray[*]})" 231 touch ${tmppublicpath}/proc_script.finished 236 #JEC 29/9/11 avoid finished stuff 237 # touch ${tmppublicpath}/proc_script.finished 232 238 exit 1 233 239 else … … 326 332 $ECHO "FATAL (${scriptName}): type of processing" 327 333 usage 328 touch ${tmppublicpath}/proc_script.finished 334 #JEC 29/9/11 avoid finished stuff 335 # touch ${tmppublicpath}/proc_script.finished 329 336 exit 1 330 337 ;; … … 387 394 if [ ! -e $prg ]; then 388 395 $ECHO "FATAL (${scriptName}): $prg not found" 389 touch ${tmppublicpath}/proc_script.finished 396 #JEC 29/9/11 avoid finished stuff 397 # touch ${tmppublicpath}/proc_script.finished 390 398 exit 1 391 399 fi … … 417 425 $ECHO "FATAL (${scriptName}): error while iget:" 418 426 $ECHO $igetStatus 419 touch ${tmppublicpath}/${jobBatchName}.finished 427 #JEC 29/9/11 avoid finished stuff 428 # touch ${tmppublicpath}/${jobBatchName}.finished 420 429 exit 1 421 430 fi … … 426 435 for ((i=${firstCycleId};i<${lastp1CycleId};i++)); do 427 436 # 437 438 #### 439 # Check daq status 440 #JEC 1/10/11 Use generic baodaqstatus name 441 #### 442 #get the daq current irod status 443 #tag=`${DATE} +%F` 444 #OUT1=${publicpath}/baodaqstatus-${tag}.txt 445 OUT1=${publicpath}/baodaqstatus-current.txt 446 447 if [ ! -e ${OUT1} -o ! -r ${OUT1} ]; then 448 $ECHO "FATAL (${scriptName}): ${OUT1} has a problem" 449 exit 1 450 # $ECHO "We should bring the DAQ status more up to date, this take 1 or 2min..." 451 #JEC 29/9/11 avoid finished stuff 452 # $RM -f ${tmppublicpath}/statusdaq.finished 453 # ${scriptpath}/statusdaq.sh > ${OUT1} 454 # while [ ! -f "${tmppublicpath}/statusdaq.finished" ]; do 455 # sleep 30 456 # done 457 # $RM ${tmppublicpath}/statusdaq.finished 458 #protect against remove/rewriting 459 # $CHMOD -v 444 ${OUT1} 460 fi 461 428 462 #time window selection 429 463 tmproc="-tmproc ${timeArray[${i}]},${timeDuration}" … … 455 489 #get signals files 456 490 OUT3=./getsignals.$$ 457 $RM -f ${tmppublicpath}/getsignalfiles.finished 491 #JEC 29/9/11 avoid finished stuff 492 # $RM -f ${tmppublicpath}/getsignalfiles.finished 458 493 ${scriptpath}/getsignalfiles.sh ${sourceRadio} ${dateSelected} ${firstFile} ${lastFile} > ${OUT3} 2>&1 459 while [ ! -f "${tmppublicpath}/getsignalfiles.finished" ]; do460 $ECHO "INFO (${scriptName}): waiting for ${tmppublicpath}/getsignalfiles.finished"461 date +%T462 sleep 30463 done464 $RM ${tmppublicpath}/getsignalfiles.finished494 # while [ ! -f "${tmppublicpath}/getsignalfiles.finished" ]; do 495 # $ECHO "INFO (${scriptName}): waiting for ${tmppublicpath}/getsignalfiles.finished" 496 # date +%T 497 # sleep 30 498 # done 499 # $RM ${tmppublicpath}/getsignalfiles.finished 465 500 466 501 getSignals=`$GREP "^FATAL" ${OUT3}` … … 468 503 $ECHO "FATAL (${scriptName}): error while get signals" 469 504 $ECHO $getSignals 470 touch ${tmppublicpath}/${jobBatchName}.finished 505 #JEC 29/9/11 avoid finished stuff 506 # touch ${tmppublicpath}/${jobBatchName}.finished 471 507 exit 1 472 508 fi … … 511 547 $ECHO "DEBUG (${scriptName}): END loop on cycles" 512 548 # 513 touch ${tmppublicpath}/proc_script.finished 549 #JEC 29/9/11 avoid finished stuff 550 #touch ${tmppublicpath}/proc_script.finished 514 551 exit 0
Note: See TracChangeset
for help on using the changeset viewer.