- Timestamp:
- Mar 29, 2009, 6:15:31 PM (17 years ago)
- Location:
- branches/cnb_branches/cnb_branch_20090301
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
ippTasks/detrend.resid.pro (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/cnb_branches/cnb_branch_20090301
-
branches/cnb_branches/cnb_branch_20090301/ippTasks/detrend.resid.pro
r23352 r23594 8 8 book init detPendingResidImfile 9 9 book init detPendingResidExp 10 book init detCleanupResidImfile11 book init detCleanupResidExp12 10 13 11 macro detresid.reset 14 12 book init detPendingResidImfile 15 13 book init detPendingResidExp 16 book init detCleanupResidImfile17 book init detCleanupResidExp18 14 end 19 15 … … 21 17 book listbook detPendingResidImfile 22 18 book listbook detPendingResidExp 23 book listbook detCleanupResidImfile24 book listbook detCleanupResidExp25 19 end 26 20 … … 38 32 active true 39 33 end 40 task detrend.cleanup.resid.load41 active true42 end43 task detrend.cleanup.resid.run44 active true45 end46 task detrend.cleanup.residexp.load47 active true48 end49 task detrend.cleanup.residexp.run50 active true51 end52 34 end 53 35 … … 65 47 active false 66 48 end 67 task detrend.cleanup.resid.load68 active false69 end70 task detrend.cleanup.resid.run71 active false72 end73 task detrend.cleanup.residexp.load74 active false75 end76 task detrend.cleanup.residexp.run77 active false78 end79 49 end 80 50 … … 82 52 $detPendingResidImfile_DB = 0 83 53 $detPendingResidExp_DB = 0 84 $detCleanupResidImfile_DB = 085 $detCleanupResidExp_DB = 086 54 87 55 # select images ready for copy … … 348 316 end 349 317 end 350 351 ######## cleanup resid imfile ########352 task detrend.cleanup.resid.load353 host local354 355 periods -poll $LOADPOLL356 periods -exec $LOADEXEC357 periods -timeout 30358 npending 1359 active true360 361 stdout NULL362 stderr $LOGDIR/detrend.cleanup.resid.imfile.log363 364 task.exec365 $run = dettool -pendingcleanup_residimfile366 if ($DB:n == 0)367 option DEFAULT368 else369 # save the DB name for the exit tasks370 option $DB:$detCleanupResidImfile_DB371 $run = $run -dbname $DB:$detCleanupResidImfile_DB372 $detCleanupResidImfile_DB ++373 if ($detCleanupResidImfile_DB >= $DB:n) set detCleanupResidImfile_DB = 0374 end375 add_poll_args run376 command $run377 end378 379 # success380 task.exit 0381 # convert 'stdout' to book format382 ipptool2book stdout detCleanupResidImfile -key det_id:iteration:exp_id:class_id -uniq -setword dbname $options:0 -setword pantaskState INIT383 if ($VERBOSE > 2)384 book listbook detCleanupResidImfile385 end386 387 # delete existing entries in the appropriate pantaskStates388 process_cleanup detCleanupResidImfile389 end390 391 # locked list392 task.exit default393 showcommand failure394 end395 396 task.exit crash397 showcommand crash398 end399 400 # operation times out?401 task.exit timeout402 showcommand timeout403 end404 end405 406 # run the ipp_cleanup.pl script on pending images407 task detrend.cleanup.resid.run408 periods -poll $RUNPOLL409 periods -exec $RUNEXEC410 periods -timeout 60411 active true412 413 task.exec414 book npages detCleanupResidImfile -var N415 if ($N == 0) break416 if ($NETWORK == 0) break417 418 # look for new images in detCleanupResidImfile (pantaskState == INIT)419 book getpage detCleanupResidImfile 0 -var pageName -key pantaskState INIT420 if ("$pageName" == "NULL") break421 422 book setword detCleanupResidImfile $pageName pantaskState RUN423 book getword detCleanupResidImfile $pageName det_id -var DET_ID424 book getword detCleanupResidImfile $pageName exp_id -var EXP_ID425 book getword detCleanupResidImfile $pageName class_id -var CLASS_ID426 book getword detCleanupResidImfile $pageName iteration -var ITERATION427 book getword detCleanupResidImfile $pageName camera -var CAMERA428 book getword detCleanupResidImfile $pageName state -var CLEANUP_MODE429 book getword detCleanupResidImfile $pageName dbname -var DBNAME430 431 # specify choice of local or remote host based on camera and chip (class_id)432 set.host.for.camera $CAMERA FPA433 434 stdout $LOGDIR/detrend.cleanup.resid.imfile.log435 stderr $LOGDIR/detrend.cleanup.resid.imfile.log436 437 # XXX is everything listed here needed?438 $run = ipp_cleanup.pl --stage detrend.resid.imfile --stage_id $DET_ID --exp_id $EXP_ID --class_id $CLASS_ID --iteration $ITERATION --camera $CAMERA --mode $CLEANUP_MODE439 add_standard_args run440 441 # save the pageName for future reference below442 options $pageName443 444 # create the command line445 if ($VERBOSE > 1)446 echo command $run447 end448 command $run449 end450 451 # default exit status452 task.exit default453 process_exit detCleanupResidImfile $options:0 $JOB_STATUS454 end455 456 # locked list457 task.exit crash458 showcommand crash459 echo "hostname: $JOB_HOSTNAME"460 book setword detCleanupResidImfile $options:0 pantaskState CRASH461 end462 463 # operation timed out?464 task.exit timeout465 showcommand timeout466 book setword detCleanupResidImfile $options:0 pantaskState TIMEOUT467 end468 end469 470 471 ######## cleanup resid exp ########472 task detrend.cleanup.residexp.load473 host local474 475 periods -poll $LOADPOLL476 periods -exec $LOADEXEC477 periods -timeout 30478 npending 1479 active true480 481 stdout NULL482 stderr $LOGDIR/detrend.cleanup.resid.exp.log483 484 task.exec485 $run = dettool -pendingcleanup_residexp486 if ($DB:n == 0)487 option DEFAULT488 else489 # save the DB name for the exit tasks490 option $DB:$detCleanupResidExp_DB491 $run = $run -dbname $DB:$detCleanupResidExp_DB492 $detCleanupResidExp_DB ++493 if ($detCleanupResidExp_DB >= $DB:n) set detCleanupResidExp_DB = 0494 end495 add_poll_args run496 command $run497 end498 499 # success500 task.exit 0501 # convert 'stdout' to book format502 ipptool2book stdout detCleanupResidExp -key det_id:iteration:exp_id -uniq -setword dbname $options:0 -setword pantaskState INIT503 if ($VERBOSE > 2)504 book listbook detCleanupResidExp505 end506 507 # delete existing entries in the appropriate pantaskStates508 process_cleanup detCleanupResidExp509 end510 511 # locked list512 task.exit default513 showcommand failure514 end515 516 task.exit crash517 showcommand crash518 end519 520 # operation times out?521 task.exit timeout522 showcommand timeout523 end524 end525 526 # run the ipp_cleanup.pl script on pending images527 task detrend.cleanup.residexp.run528 periods -poll $RUNPOLL529 periods -exec $RUNEXEC530 periods -timeout 60531 active true532 533 task.exec534 book npages detCleanupResidExp -var N535 if ($N == 0) break536 if ($NETWORK == 0) break537 538 # look for new images in detCleanupResidExp (pantaskState == INIT)539 book getpage detCleanupResidExp 0 -var pageName -key pantaskState INIT540 if ("$pageName" == "NULL") break541 542 book setword detCleanupResidExp $pageName pantaskState RUN543 book getword detCleanupResidExp $pageName det_id -var DET_ID544 book getword detCleanupResidExp $pageName exp_id -var EXP_ID545 book getword detCleanupResidExp $pageName iteration -var ITERATION546 book getword detCleanupResidExp $pageName camera -var CAMERA547 book getword detCleanupResidExp $pageName state -var CLEANUP_MODE548 book getword detCleanupResidExp $pageName dbname -var DBNAME549 550 # specify choice of local or remote host based on camera and chip (class_id)551 set.host.for.camera $CAMERA FPA552 553 stdout $LOGDIR/detrend.cleanup.resid.exp.log554 stderr $LOGDIR/detrend.cleanup.resid.exp.log555 556 # XXX is everything listed here needed?557 $run = ipp_cleanup.pl --stage detrend.resid.exp --stage_id $DET_ID --exp_id $EXP_ID --class_id $CLASS_ID --camera $CAMERA --mode $CLEANUP_MODE558 add_standard_args run559 560 # save the pageName for future reference below561 options $pageName562 563 # create the command line564 if ($VERBOSE > 1)565 echo command $run566 end567 command $run568 end569 570 # default exit status571 task.exit default572 process_exit detCleanupResidExp $options:0 $JOB_STATUS573 end574 575 # locked list576 task.exit crash577 showcommand crash578 echo "hostname: $JOB_HOSTNAME"579 book setword detCleanupResidExp $options:0 pantaskState CRASH580 end581 582 # operation timed out?583 task.exit timeout584 showcommand timeout585 book setword detCleanupResidExp $options:0 pantaskState TIMEOUT586 end587 end
Note:
See TracChangeset
for help on using the changeset viewer.
