IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 25, 2009, 4:33:53 PM (17 years ago)
Author:
eugene
Message:

adding chip, camera, fake, warp revert tasks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTasks/camera.pro

    r24595 r24596  
    77
    88book init camPendingExp
    9 #book init camPendingCleanup
    109
    1110macro camera.status
    1211  book listbook camPendingExp
    13 #  book listbook camPendingCleanup
    1412end
    1513
    1614macro camera.reset
    1715  book init camPendingExp
    18 #  book init camPendingCleanup
    1916end
    2017
     
    3734end
    3835
    39 # macro camera.cleanup.on
    40 #   task camera.cleanup.load
    41 #     active true
    42 #   end
    43 #   task camera.cleanup.run
    44 #     active true
    45 #   end
    46 # end
    47 
    48 # macro camera.cleanup.off
    49 #   task camera.cleanup.load
    50 #     active false
    51 #   end
    52 #   task camera.cleanup.run
    53 #     active false
    54 #   end
    55 # end
    56 
    5736# this variable will cycle through the known database names
    5837$camera_DB = 0
     38$camera_revert_DB = 0
    5939
    6040# select images ready for camera analysis
     
    199179end
    200180
    201 # # this variable will cycle through the known database names
    202 # $camera_cleanup_DB = 0
    203 
    204 # # select images ready for cam analysis
    205 # # new entries are added to camPendingImfile
    206 # # skip already-present entries
    207 # task         camera.cleanup.load
    208 #   host         local
    209 
    210 #   periods      -poll $LOADPOLL
    211 #   periods      -exec $LOADEXEC
    212 #   periods      -timeout 30
    213 #   npending     1
    214 #   active       false
    215 
    216 #   stdout NULL
    217 #   stderr $LOGDIR/camera.cleanup.log
    218 
    219 #   task.exec
    220 #     if ($LABEL:n == 0) break
    221 #     $run = camtool -pendingcleanuprun
    222 #     if ($DB:n == 0)
    223 #       option DEFAULT
    224 #     else
    225 #       # save the DB name for the exit tasks
    226 #       option $DB:$camera_cleanup_DB
    227 #       $run = $run -dbname $DB:$camera_cleanup_DB
    228 #       $camera_cleanup_DB ++
    229 #       if ($camera_cleanup_DB >= $DB:n) set camera_cleanup_DB = 0
    230 #     end
    231 #     add_poll_args run
    232 #     add_poll_labels run
    233 #     command $run
    234 #   end
    235 
    236 #   # success
    237 #   task.exit    0
    238 #     # convert 'stdout' to book format
    239 #     ipptool2book stdout camPendingCleanup -key cam_id -uniq -setword dbname $options:0 -setword pantaskState INIT
    240 #     if ($VERBOSE > 2)
    241 #       book listbook camPendingCleanup
    242 #     end
    243 
    244 #     # delete existing entries in the appropriate pantaskStates
    245 #     process_cleanup camPendingCleanup
    246 #   end
    247 
    248 #   # locked list
    249 #   task.exit    default
    250 #     showcommand failure
    251 #   end
    252 
    253 #   task.exit    crash
    254 #     showcommand crash
    255 #   end
    256 
    257 #   # operation times out?
    258 #   task.exit    timeout
    259 #     showcommand timeout
    260 #   end
    261 # end
    262 
    263 # # run the ipp_cleanup.pl script on pending images
    264 # task         camera.cleanup.run
    265 #   periods      -poll $RUNPOLL
    266 #   periods      -exec $RUNEXEC
    267 #   periods      -timeout 60
    268 #   active       false
    269 
    270 #   task.exec
    271 #     book npages camPendingCleanup -var N
    272 #     if ($N == 0) break
    273 #     if ($NETWORK == 0) break
    274    
    275 #     # look for new images in camPendingCleanup (pantaskState == INIT)
    276 #     book getpage camPendingCleanup 0 -var pageName -key pantaskState INIT
    277 #     if ("$pageName" == "NULL") break
    278 
    279 #     book setword camPendingCleanup $pageName pantaskState RUN
    280 #     book getword camPendingCleanup $pageName camera -var CAMERA
    281 #     book getword camPendingCleanup $pageName state  -var CLEANUP_MODE
    282 #     book getword camPendingCleanup $pageName cam_id -var CAM_ID
    283 #     book getword camPendingCleanup $pageName dbname -var DBNAME
    284 
    285 #     # specify choice of local or remote host based on camera and cam (class_id)
    286 #     set.host.for.camera $CAMERA FPA
    287 
    288 #     stdout $LOGDIR/camera.cleanup.log
    289 #     stderr $LOGDIR/camera.cleanup.log
    290 
    291 #     # XXX is everything listed here needed?
    292 #     $run = ipp_cleanup.pl --stage camera --stage_id $CAM_ID --camera $CAMERA --mode $CLEANUP_MODE
    293 #     add_standard_args run
    294 
    295 #     # save the pageName for future reference below
    296 #     options $pageName
    297 
    298 #     # create the command line
    299 #     if ($VERBOSE > 1)
    300 #       echo command $run
    301 #     end
    302 #     command $run
    303 #   end
    304 
    305 #   # default exit status
    306 #   task.exit    default
    307 #     process_exit camPendingCleanup $options:0 $JOB_STATUS
    308 #   end
    309 
    310 #   task.exit    crash
    311 #     showcommand crash
    312 #     book setword camPendingCleanup $options:0 pantaskState CRASH
    313 #   end
    314 
    315 #   # operation timed out?
    316 #   task.exit    timeout
    317 #     showcommand timeout
    318 #     book setword camPendingCleanup $options:0 pantaskState TIMEOUT
    319 #   end
    320 # end
     181task camera.revert
     182  host         local
     183
     184  periods      -poll 5.0
     185  periods      -exec 60.0
     186  periods      -timeout 120.0
     187  npending     1
     188
     189  stdout NULL
     190  stderr $LOGDIR/revert.log
     191
     192  task.exec
     193    if ($LABEL:n == 0) break
     194    $run = camtool -revertprocessedexp
     195    if ($DB:n == 0)
     196      option DEFAULT
     197    else
     198      # save the DB name for the exit tasks
     199      option $DB:$camera_revert_DB
     200      $run = $run -dbname $DB:$camera_revert_DB
     201      $camera_revert_DB ++
     202      if ($camera_revert_DB >= $DB:n) set camera_revert_DB = 0
     203    end
     204    add_poll_labels run
     205    command $run
     206  end
     207
     208  # success
     209  task.exit    0
     210  end
     211
     212  # locked list
     213  task.exit    default
     214    showcommand failure
     215  end
     216
     217  task.exit    crash
     218    showcommand crash
     219  end
     220
     221  # operation times out?
     222  task.exit    timeout
     223    showcommand timeout
     224  end
     225end
Note: See TracChangeset for help on using the changeset viewer.