Changeset 19090 for trunk/ippTasks/detrend.process.pro
- Timestamp:
- Aug 16, 2008, 1:07:21 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/ippTasks/detrend.process.pro (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTasks/detrend.process.pro
r18935 r19090 8 8 book init detPendingProcessedImfile 9 9 book init detPendingProcessedExp 10 book init detCleanupProcessedImfile 11 book init detCleanupProcessedExp 10 12 11 13 macro detproc.reset 12 14 book init detPendingProcessedImfile 13 15 book init detPendingProcessedExp 16 book init detCleanupProcessedImfile 17 book init detCleanupProcessedExp 14 18 end 15 19 … … 19 23 echo detPendingProcessedExp 20 24 book listbook detPendingProcessedExp 25 echo detCleanupProcessedImfile 26 book listbook detCleanupProcessedImfile 27 echo detCleanupProcessedExp 28 book listbook detCleanupProcessedExp 21 29 end 22 30 … … 34 42 active true 35 43 end 44 task detrend.cleanup.process.load 45 active true 46 end 47 task detrend.cleanup.process.run 48 active true 49 end 50 task detrend.cleanup.processexp.load 51 active true 52 end 53 task detrend.cleanup.processexp.run 54 active true 55 end 36 56 end 37 57 … … 47 67 end 48 68 task detrend.processexp.run 69 active false 70 end 71 task detrend.cleanup.process.load 72 active false 73 end 74 task detrend.cleanup.process.run 75 active false 76 end 77 task detrend.cleanup.processexp.load 78 active false 79 end 80 task detrend.cleanup.processexp.run 49 81 active false 50 82 end … … 55 87 $detPendingProcessedImfile_DB = 0 56 88 $detPendingProcessedExp_DB = 0 89 $detCleanupProcessedImfile_DB = 0 90 $detCleanupProcessedExp_DB = 0 57 91 58 92 # select images ready for copy … … 68 102 69 103 stdout NULL 70 stderr $LOGDIR/det proc.imfile.load.log104 stderr $LOGDIR/detrend.process.imfile.log 71 105 72 106 task.exec … … 142 176 sprintf outroot "%s/%s.%s.%s/%s/%s.detproc.%s" $WORKDIR $CAMERA $DET_TYPE $DET_ID $EXP_TAG $EXP_TAG $DET_ID 143 177 144 stdout $LOGDIR/det proc.imfile.run.log145 stderr $LOGDIR/det proc.imfile.run.log178 stdout $LOGDIR/detrend.process.imfile.log 179 stderr $LOGDIR/detrend.process.imfile.log 146 180 147 181 $run = detrend_process_imfile.pl --det_id $DET_ID --exp_id $EXP_ID --det_type $DET_TYPE --class_id $CLASS_ID --exp_tag $EXP_TAG --input_uri $URI --camera $CAMERA --outroot $outroot --redirect-output … … 185 219 186 220 stdout NULL 187 stderr $LOGDIR/det proc.exp.load.log221 stderr $LOGDIR/detrend.process.exp.log 188 222 189 223 task.exec … … 257 291 sprintf outroot "%s/%s.%s.%s/%s/%s.detproc.%s" $WORKDIR $CAMERA $DET_TYPE $DET_ID $EXP_TAG $EXP_TAG $DET_ID 258 292 259 stdout $LOGDIR/det proc.exp.run.log260 stderr $LOGDIR/det proc.exp.run.log293 stdout $LOGDIR/detrend.process.exp.log 294 stderr $LOGDIR/detrend.process.exp.log 261 295 262 296 $run = detrend_process_exp.pl --det_id $DET_ID --exp_id $EXP_ID --exp_tag $EXP_TAG --det_type $DET_TYPE --camera $CAMERA --outroot $outroot --redirect-output --verbose … … 287 321 end 288 322 end 323 324 ######## cleanup process imfile ######## 325 task detrend.cleanup.process.load 326 host local 327 328 periods -poll $LOADPOLL 329 periods -exec $LOADEXEC 330 periods -timeout 30 331 npending 1 332 active true 333 334 stdout NULL 335 stderr $LOGDIR/detrend.cleanup.process.imfile.log 336 337 task.exec 338 if ($DB:n == 0) 339 option DEFAULT 340 command dettool -pendingcleanup_processedimfile -limit 20 341 else 342 # save the DB name for the exit tasks 343 option $DB:$detCleanupProcessedImfile_DB 344 command dettool -pendingcleanup_processedimfile -limit 20 -dbname $DB:$detCleanupProcessedImfile_DB 345 $detCleanupProcessedImfile_DB ++ 346 if ($detCleanupProcessedImfile_DB >= $DB:n) set detCleanupProcessedImfile_DB = 0 347 end 348 end 349 350 # success 351 task.exit 0 352 # convert 'stdout' to book format 353 ipptool2book stdout detCleanupProcessedImfile -key det_id:exp_id:class_id -uniq -setword dbname $options:0 -setword pantaskState INIT 354 if ($VERBOSE > 2) 355 book listbook detCleanupProcessedImfile 356 end 357 358 # delete existing entries in the appropriate pantaskStates 359 process_cleanup detCleanupProcessedImfile 360 end 361 362 # locked list 363 task.exit default 364 showcommand failure 365 end 366 367 # operation times out? 368 task.exit timeout 369 showcommand timeout 370 end 371 end 372 373 # run the ipp_cleanup.pl script on pending images 374 task detrend.cleanup.process.run 375 periods -poll $RUNPOLL 376 periods -exec $RUNEXEC 377 periods -timeout 60 378 active true 379 380 task.exec 381 book npages detCleanupProcessedImfile -var N 382 if ($N == 0) break 383 if ($NETWORK == 0) break 384 385 # look for new images in detCleanupProcessedImfile (pantaskState == INIT) 386 book getpage detCleanupProcessedImfile 0 -var pageName -key pantaskState INIT 387 if ("$pageName" == "NULL") break 388 389 book setword detCleanupProcessedImfile $pageName pantaskState RUN 390 book getword detCleanupProcessedImfile $pageName det_id -var DET_ID 391 book getword detCleanupProcessedImfile $pageName exp_id -var EXP_ID 392 book getword detCleanupProcessedImfile $pageName class_id -var CLASS_ID 393 book getword detCleanupProcessedImfile $pageName camera -var CAMERA 394 book getword detCleanupProcessedImfile $pageName state -var CLEANUP_MODE 395 book getword detCleanupProcessedImfile $pageName dbname -var DBNAME 396 397 # specify choice of local or remote host based on camera and chip (class_id) 398 set.host.for.camera $CAMERA FPA 399 400 stdout $LOGDIR/detrend.cleanup.process.imfile.log 401 stderr $LOGDIR/detrend.cleanup.process.imfile.log 402 403 # XXX is everything listed here needed? 404 $run = ipp_cleanup.pl --stage detrend.process.imfile --stage_id $DET_ID --exp_id $EXP_ID --class_id $CLASS_ID --camera $CAMERA --mode $CLEANUP_MODE 405 add_standard_args run 406 407 # save the pageName for future reference below 408 options $pageName 409 410 # create the command line 411 if ($VERBOSE > 1) 412 echo command $run 413 end 414 command $run 415 end 416 417 # default exit status 418 task.exit default 419 process_exit detCleanupProcessedImfile $options:0 $JOB_STATUS 420 end 421 422 # operation timed out? 423 task.exit timeout 424 showcommand timeout 425 book setword detCleanupProcessedImfile $options:0 pantaskState TIMEOUT 426 end 427 end 428 429 430 ######## cleanup process exp ######## 431 task detrend.cleanup.processexp.load 432 host local 433 434 periods -poll $LOADPOLL 435 periods -exec $LOADEXEC 436 periods -timeout 30 437 npending 1 438 active true 439 440 stdout NULL 441 stderr $LOGDIR/detrend.cleanup.process.exp.log 442 443 task.exec 444 if ($DB:n == 0) 445 option DEFAULT 446 command dettool -pendingcleanup_processedexp -limit 20 447 else 448 # save the DB name for the exit tasks 449 option $DB:$detCleanupProcessedExp_DB 450 command dettool -pendingcleanup_processedexp -limit 20 -dbname $DB:$detCleanupProcessedExp_DB 451 $detCleanupProcessedExp_DB ++ 452 if ($detCleanupProcessedExp_DB >= $DB:n) set detCleanupProcessedExp_DB = 0 453 end 454 end 455 456 # success 457 task.exit 0 458 # convert 'stdout' to book format 459 ipptool2book stdout detCleanupProcessedExp -key det_id:exp_id -uniq -setword dbname $options:0 -setword pantaskState INIT 460 if ($VERBOSE > 2) 461 book listbook detCleanupProcessedExp 462 end 463 464 # delete existing entries in the appropriate pantaskStates 465 process_cleanup detCleanupProcessedExp 466 end 467 468 # locked list 469 task.exit default 470 showcommand failure 471 end 472 473 # operation times out? 474 task.exit timeout 475 showcommand timeout 476 end 477 end 478 479 # run the ipp_cleanup.pl script on pending images 480 task detrend.cleanup.processexp.run 481 periods -poll $RUNPOLL 482 periods -exec $RUNEXEC 483 periods -timeout 60 484 active true 485 486 task.exec 487 book npages detCleanupProcessedExp -var N 488 if ($N == 0) break 489 if ($NETWORK == 0) break 490 491 # look for new images in detCleanupProcessedExp (pantaskState == INIT) 492 book getpage detCleanupProcessedExp 0 -var pageName -key pantaskState INIT 493 if ("$pageName" == "NULL") break 494 495 book setword detCleanupProcessedExp $pageName pantaskState RUN 496 book getword detCleanupProcessedExp $pageName det_id -var DET_ID 497 book getword detCleanupProcessedExp $pageName exp_id -var EXP_ID 498 book getword detCleanupProcessedExp $pageName camera -var CAMERA 499 book getword detCleanupProcessedExp $pageName state -var CLEANUP_MODE 500 book getword detCleanupProcessedExp $pageName dbname -var DBNAME 501 502 # specify choice of local or remote host based on camera and chip (class_id) 503 set.host.for.camera $CAMERA FPA 504 505 stdout $LOGDIR/detrend.cleanup.process.exp.log 506 stderr $LOGDIR/detrend.cleanup.process.exp.log 507 508 # XXX is everything listed here needed? 509 $run = ipp_cleanup.pl --stage detrend.process.exp --stage_id $DET_ID --exp_id $EXP_ID --camera $CAMERA --mode $CLEANUP_MODE 510 add_standard_args run 511 512 # save the pageName for future reference below 513 options $pageName 514 515 # create the command line 516 if ($VERBOSE > 1) 517 echo command $run 518 end 519 command $run 520 end 521 522 # default exit status 523 task.exit default 524 process_exit detCleanupProcessedExp $options:0 $JOB_STATUS 525 end 526 527 # operation timed out? 528 task.exit timeout 529 showcommand timeout 530 book setword detCleanupProcessedExp $options:0 pantaskState TIMEOUT 531 end 532 end
Note:
See TracChangeset
for help on using the changeset viewer.
