Changeset 23480 for trunk/ippTasks/detrend.stack.pro
- Timestamp:
- Mar 20, 2009, 6:08:06 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/ippTasks/detrend.stack.pro (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTasks/detrend.stack.pro
r23230 r23480 7 7 8 8 book init detPendingStackedImfile 9 book init detCleanupStackedImfile10 9 11 10 macro detstack.reset 12 11 book init detPendingStackedImfile 13 book init detCleanupStackedImfile14 12 end 15 13 … … 17 15 echo detPendingStackedImfile 18 16 book listbook detPendingStackedImfile 19 echo detCleanupStackedImfile20 book listbook detCleanupStackedImfile21 17 end 22 18 … … 26 22 end 27 23 task detrend.stack.run 28 active true29 end30 task detrend.cleanup.stack.load31 active true32 end33 task detrend.cleanup.stack.run34 24 active true 35 25 end … … 43 33 active false 44 34 end 45 task detrend.cleanup.stack.load46 active false47 end48 task detrend.cleanup.stack.run49 active false50 end51 35 end 52 36 53 37 # this variable will cycle through the known database names 54 38 $detPendingStackedImfile_DB = 0 55 $detCleanupStackedImfile_DB = 056 39 57 40 # select images ready for detrend_stack.pl … … 182 165 end 183 166 end 184 185 ########## cleanup stack ###########186 task detrend.cleanup.stack.load187 host local188 189 periods -poll $LOADPOLL190 periods -exec $LOADEXEC191 periods -timeout 30192 npending 1193 active true194 195 stdout NULL196 stderr $LOGDIR/detrend.cleanup.stack.log197 198 task.exec199 $run = dettool -pendingcleanup_stacked200 if ($DB:n == 0)201 option DEFAULT202 else203 # save the DB name for the exit tasks204 option $DB:$detCleanupStackedImfile_DB205 $run = $run -dbname $DB:$detCleanupStackedImfile_DB206 $detCleanupStackedImfile_DB ++207 if ($detCleanupStackedImfile_DB >= $DB:n) set detCleanupStackedImfile_DB = 0208 end209 add_poll_args run210 command $run211 end212 213 # success214 task.exit 0215 # convert 'stdout' to book format216 ipptool2book stdout detCleanupStackedImfile -key det_id:iteration:class_id -uniq -setword dbname $options:0 -setword pantaskState INIT217 if ($VERBOSE > 2)218 book listbook detCleanupStackedImfile219 end220 221 # delete existing entries in the appropriate pantaskStates222 process_cleanup detCleanupStackedImfile223 end224 225 # locked list226 task.exit default227 showcommand failure228 end229 230 task.exit crash231 showcommand crash232 end233 234 # operation times out?235 task.exit timeout236 showcommand timeout237 end238 end239 240 # run the ipp_cleanup.pl script on pending images241 task detrend.cleanup.stack.run242 periods -poll $RUNPOLL243 periods -exec $RUNEXEC244 periods -timeout 60245 active true246 247 task.exec248 book npages detCleanupStackedImfile -var N249 if ($N == 0) break250 if ($NETWORK == 0) break251 252 # look for new images in detCleanupStackedImfile (pantaskState == INIT)253 book getpage detCleanupStackedImfile 0 -var pageName -key pantaskState INIT254 if ("$pageName" == "NULL") break255 256 book setword detCleanupStackedImfile $pageName pantaskState RUN257 book getword detCleanupStackedImfile $pageName det_id -var DET_ID258 book getword detCleanupStackedImfile $pageName iteration -var ITERATION259 book getword detCleanupStackedImfile $pageName class_id -var CLASS_ID260 book getword detCleanupStackedImfile $pageName camera -var CAMERA261 book getword detCleanupStackedImfile $pageName state -var CLEANUP_MODE262 book getword detCleanupStackedImfile $pageName dbname -var DBNAME263 264 # specify choice of local or remote host based on camera and chip (class_id)265 set.host.for.camera $CAMERA FPA266 267 stdout $LOGDIR/detrend.cleanup.stack.log268 stderr $LOGDIR/detrend.cleanup.stack.log269 270 # XXX is everything listed here needed?271 $run = ipp_cleanup.pl --stage detrend.stack.imfile --stage_id $DET_ID --iteration $ITERATION --class_id $CLASS_ID --camera $CAMERA --mode $CLEANUP_MODE272 add_standard_args run273 274 # save the pageName for future reference below275 options $pageName276 277 # create the command line278 if ($VERBOSE > 1)279 echo command $run280 end281 command $run282 end283 284 # default exit status285 task.exit default286 process_exit detCleanupStackedImfile $options:0 $JOB_STATUS287 end288 289 # locked list290 task.exit crash291 showcommand crash292 echo "hostname: $JOB_HOSTNAME"293 book setword detCleanupStackedImfile $options:0 pantaskState CRASH294 end295 296 # operation timed out?297 task.exit timeout298 showcommand timeout299 book setword detCleanupStackedImfile $options:0 pantaskState TIMEOUT300 end301 end302
Note:
See TracChangeset
for help on using the changeset viewer.
