Changeset 19090
- Timestamp:
- Aug 16, 2008, 1:07:21 PM (18 years ago)
- Location:
- trunk/ippTasks
- Files:
-
- 4 edited
-
camera.pro (modified) (4 diffs)
-
detrend.process.pro (modified) (10 diffs)
-
fake.pro (modified) (4 diffs)
-
warp.pro (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTasks/camera.pro
r18607 r19090 7 7 8 8 book init camPendingExp 9 book init camPendingCleanup 9 10 10 11 macro camera.status 11 12 book listbook camPendingExp 13 book listbook camPendingCleanup 12 14 end 13 15 14 16 macro camera.reset 15 17 book init camPendingExp 18 book init camPendingCleanup 16 19 end 17 20 … … 23 26 active true 24 27 end 28 task camera.cleanup.load 29 active false 30 end 31 task camera.cleanup.run 32 active false 33 end 25 34 end 26 35 … … 30 39 end 31 40 task camera.exp.run 41 active false 42 end 43 task camera.cleanup.load 44 active false 45 end 46 task camera.cleanup.run 32 47 active false 33 48 end … … 164 179 end 165 180 166 ## XXX add a global path to output files 181 # this variable will cycle through the known database names 182 $camera_cleanup_DB = 0 183 184 # select images ready for cam analysis 185 # new entries are added to camPendingImfile 186 # skip already-present entries 187 task camera.cleanup.load 188 host local 189 190 periods -poll $LOADPOLL 191 periods -exec $LOADEXEC 192 periods -timeout 30 193 npending 1 194 active true 195 196 stdout NULL 197 stderr $LOGDIR/camera.cleanup.log 198 199 task.exec 200 if ($DB:n == 0) 201 option DEFAULT 202 command camtool -pendingcleanuprun -limit 20 203 else 204 # save the DB name for the exit tasks 205 option $DB:$camera_cleanup_DB 206 command camtool -pendingcleanuprun -limit 20 -dbname $DB:$camera_cleanup_DB 207 $camera_cleanup_DB ++ 208 if ($camera_cleanup_DB >= $DB:n) set camera_cleanup_DB = 0 209 end 210 end 211 212 # success 213 task.exit 0 214 # convert 'stdout' to book format 215 ipptool2book stdout camPendingCleanup -key cam_id -uniq -setword dbname $options:0 -setword pantaskState INIT 216 if ($VERBOSE > 2) 217 book listbook camPendingCleanup 218 end 219 220 # delete existing entries in the appropriate pantaskStates 221 process_cleanup camPendingCleanup 222 end 223 224 # locked list 225 task.exit default 226 showcommand failure 227 end 228 229 # operation times out? 230 task.exit timeout 231 showcommand timeout 232 end 233 end 234 235 # run the ipp_cleanup.pl script on pending images 236 task camera.cleanup.run 237 periods -poll $RUNPOLL 238 periods -exec $RUNEXEC 239 periods -timeout 60 240 active true 241 242 task.exec 243 book npages camPendingCleanup -var N 244 if ($N == 0) break 245 if ($NETWORK == 0) break 246 247 # look for new images in camPendingCleanup (pantaskState == INIT) 248 book getpage camPendingCleanup 0 -var pageName -key pantaskState INIT 249 if ("$pageName" == "NULL") break 250 251 book setword camPendingCleanup $pageName pantaskState RUN 252 book getword camPendingCleanup $pageName camera -var CAMERA 253 book getword camPendingCleanup $pageName state -var CLEANUP_MODE 254 book getword camPendingCleanup $pageName cam_id -var CAM_ID 255 book getword camPendingCleanup $pageName dbname -var DBNAME 256 257 # specify choice of local or remote host based on camera and cam (class_id) 258 set.host.for.camera $CAMERA FPA 259 260 stdout $LOGDIR/camera.cleanup.log 261 stderr $LOGDIR/camera.cleanup.log 262 263 # XXX is everything listed here needed? 264 $run = ipp_cleanup.pl --stage camera --stage_id $CAM_ID --camera $CAMERA --mode $CLEANUP_MODE 265 add_standard_args run 266 267 # save the pageName for future reference below 268 options $pageName 269 270 # create the command line 271 if ($VERBOSE > 1) 272 echo command $run 273 end 274 command $run 275 end 276 277 # default exit status 278 task.exit default 279 process_exit camPendingCleanup $options:0 $JOB_STATUS 280 end 281 282 # operation timed out? 283 task.exit timeout 284 showcommand timeout 285 book setword camPendingCleanup $options:0 pantaskState TIMEOUT 286 end 287 end -
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 -
trunk/ippTasks/fake.pro
r18794 r19090 7 7 8 8 book init fakePendingImfile 9 book init fakePendingCleanup 9 10 10 11 macro fake.status 11 12 book listbook fakePendingImfile 13 book listbook fakePendingCleanup 12 14 end 13 15 14 16 macro fake.reset 15 17 book init fakePendingImfile 18 book init fakePendingCleanup 16 19 end 17 20 … … 23 26 active true 24 27 end 28 task fake.cleanup.load 29 active false 30 end 31 task fake.cleanup.run 32 active false 33 end 25 34 end 26 35 … … 30 39 end 31 40 task fake.imfile.run 41 active false 42 end 43 task fake.cleanup.load 44 active false 45 end 46 task fake.cleanup.run 32 47 active false 33 48 end … … 154 169 end 155 170 156 171 # this variable will cycle through the known database names 172 $fake_cleanup_DB = 0 173 174 # select images ready for fake analysis 175 # new entries are added to fakePendingImfile 176 # skip already-present entries 177 task fake.cleanup.load 178 host local 179 180 periods -poll $LOADPOLL 181 periods -exec $LOADEXEC 182 periods -timeout 30 183 npending 1 184 active true 185 186 stdout NULL 187 stderr $LOGDIR/fake.cleanup.log 188 189 task.exec 190 if ($DB:n == 0) 191 option DEFAULT 192 command faketool -pendingcleanuprun -limit 20 193 else 194 # save the DB name for the exit tasks 195 option $DB:$fake_cleanup_DB 196 command faketool -pendingcleanuprun -limit 20 -dbname $DB:$fake_cleanup_DB 197 $fake_cleanup_DB ++ 198 if ($fake_cleanup_DB >= $DB:n) set fake_cleanup_DB = 0 199 end 200 end 201 202 # success 203 task.exit 0 204 # convert 'stdout' to book format 205 ipptool2book stdout fakePendingCleanup -key fake_id -uniq -setword dbname $options:0 -setword pantaskState INIT 206 if ($VERBOSE > 2) 207 book listbook fakePendingCleanup 208 end 209 210 # delete existing entries in the appropriate pantaskStates 211 process_cleanup fakePendingCleanup 212 end 213 214 # locked list 215 task.exit default 216 showcommand failure 217 end 218 219 # operation times out? 220 task.exit timeout 221 showcommand timeout 222 end 223 end 224 225 # run the ipp_cleanup.pl script on pending images 226 task fake.cleanup.run 227 periods -poll $RUNPOLL 228 periods -exec $RUNEXEC 229 periods -timeout 60 230 active true 231 232 task.exec 233 book npages fakePendingCleanup -var N 234 if ($N == 0) break 235 if ($NETWORK == 0) break 236 237 # look for new images in fakePendingCleanup (pantaskState == INIT) 238 book getpage fakePendingCleanup 0 -var pageName -key pantaskState INIT 239 if ("$pageName" == "NULL") break 240 241 book setword fakePendingCleanup $pageName pantaskState RUN 242 book getword fakePendingCleanup $pageName camera -var CAMERA 243 book getword fakePendingCleanup $pageName state -var CLEANUP_MODE 244 book getword fakePendingCleanup $pageName fake_id -var FAKE_ID 245 book getword fakePendingCleanup $pageName dbname -var DBNAME 246 247 # specify choice of local or remote host based on camera and fake (class_id) 248 set.host.for.camera $CAMERA FPA 249 250 stdout $LOGDIR/fake.cleanup.log 251 stderr $LOGDIR/fake.cleanup.log 252 253 # XXX is everything listed here needed? 254 $run = ipp_cleanup.pl --stage fake --stage_id $FAKE_ID --camera $CAMERA --mode $CLEANUP_MODE 255 add_standard_args run 256 257 # save the pageName for future reference below 258 options $pageName 259 260 # create the command line 261 if ($VERBOSE > 1) 262 echo command $run 263 end 264 command $run 265 end 266 267 # default exit status 268 task.exit default 269 process_exit fakePendingCleanup $options:0 $JOB_STATUS 270 end 271 272 # operation timed out? 273 task.exit timeout 274 showcommand timeout 275 book setword fakePendingCleanup $options:0 pantaskState TIMEOUT 276 end 277 end -
trunk/ippTasks/warp.pro
r18916 r19090 12 12 book init warpInputExp 13 13 book init warpPendingSkyCell 14 book init warpPendingCleanup 14 15 15 16 ### Database lists 16 17 $warpExp_DB = 0 17 18 $warpSkycell_DB = 0 19 $warpCleanup_DB = 0 18 20 19 21 ### Check status of warping tasks … … 21 23 book listbook warpInputExp 22 24 book listbook warpPendingSkyCell 25 book listbook warpPendingCleanup 23 26 end 24 27 … … 27 30 book init warpInputExp 28 31 book init warpPendingSkyCell 32 book init warpPendingCleanup 29 33 end 30 34 … … 43 47 active true 44 48 end 49 task warp.cleanup.load 50 active true 51 end 52 task warp.cleanup.run 53 active true 54 end 45 55 end 46 56 … … 57 67 end 58 68 task warp.skycell.run 69 active false 70 end 71 task warp.cleanup.load 72 active false 73 end 74 task warp.cleanup.run 59 75 active false 60 76 end … … 283 299 end 284 300 301 # select images ready for warp analysis 302 # new entries are added to warpPendingImfile 303 # skip already-present entries 304 task warp.cleanup.load 305 host local 306 307 periods -poll $LOADPOLL 308 periods -exec $LOADEXEC 309 periods -timeout 30 310 npending 1 311 active true 312 313 stdout NULL 314 stderr $LOGDIR/warp.cleanup.log 315 316 task.exec 317 if ($DB:n == 0) 318 option DEFAULT 319 command warptool -pendingcleanuprun -limit 20 320 else 321 # save the DB name for the exit tasks 322 option $DB:$warpCleanup_DB 323 command warptool -pendingcleanuprun -limit 20 -dbname $DB:$warpCleanup_DB 324 $warpCleanup_DB ++ 325 if ($warpCleanup_DB >= $DB:n) set warpCleanup_DB = 0 326 end 327 end 328 329 # success 330 task.exit 0 331 # convert 'stdout' to book format 332 ipptool2book stdout warpPendingCleanup -key warp_id -uniq -setword dbname $options:0 -setword pantaskState INIT 333 if ($VERBOSE > 2) 334 book listbook warpPendingCleanup 335 end 336 337 # delete existing entries in the appropriate pantaskStates 338 process_cleanup warpPendingCleanup 339 end 340 341 # locked list 342 task.exit default 343 showcommand failure 344 end 345 346 # operation times out? 347 task.exit timeout 348 showcommand timeout 349 end 350 end 351 352 # run the ipp_cleanup.pl script on pending images 353 task warp.cleanup.run 354 periods -poll $RUNPOLL 355 periods -exec $RUNEXEC 356 periods -timeout 60 357 active true 358 359 task.exec 360 book npages warpPendingCleanup -var N 361 if ($N == 0) break 362 if ($NETWORK == 0) break 363 364 # look for new images in warpPendingCleanup (pantaskState == INIT) 365 book getpage warpPendingCleanup 0 -var pageName -key pantaskState INIT 366 if ("$pageName" == "NULL") break 367 368 book setword warpPendingCleanup $pageName pantaskState RUN 369 book getword warpPendingCleanup $pageName camera -var CAMERA 370 book getword warpPendingCleanup $pageName state -var CLEANUP_MODE 371 book getword warpPendingCleanup $pageName warp_id -var WARP_ID 372 book getword warpPendingCleanup $pageName dbname -var DBNAME 373 374 # specify choice of local or remote host based on camera and warp (class_id) 375 set.host.for.camera $CAMERA FPA 376 377 stdout $LOGDIR/warp.cleanup.log 378 stderr $LOGDIR/warp.cleanup.log 379 380 # XXX is everything listed here needed? 381 $run = ipp_cleanup.pl --stage warp --stage_id $WARP_ID --camera $CAMERA --mode $CLEANUP_MODE 382 add_standard_args run 383 384 # save the pageName for future reference below 385 options $pageName 386 387 # create the command line 388 if ($VERBOSE > 1) 389 echo command $run 390 end 391 command $run 392 end 393 394 # default exit status 395 task.exit default 396 process_exit warpPendingCleanup $options:0 $JOB_STATUS 397 end 398 399 # operation timed out? 400 task.exit timeout 401 showcommand timeout 402 book setword warpPendingCleanup $options:0 pantaskState TIMEOUT 403 end 404 end
Note:
See TracChangeset
for help on using the changeset viewer.
