Changeset 18794
- Timestamp:
- Jul 30, 2008, 2:35:42 PM (18 years ago)
- Location:
- trunk
- Files:
-
- 1 deleted
- 2 edited
-
ippScripts/Build.PL (modified) (1 diff)
-
ippScripts/scripts/fake_exp.pl (deleted)
-
ippTasks/fake.pro (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/Build.PL
r18789 r18794 48 48 scripts/camera_exp.pl 49 49 scripts/fake_imfile.pl 50 scripts/fake_exp.pl51 50 scripts/warp_overlap.pl 52 51 scripts/warp_skycell.pl -
trunk/ippTasks/fake.pro
r18787 r18794 7 7 8 8 book init fakePendingImfile 9 book init fakePendingExp10 9 11 10 macro fake.status 12 11 book listbook fakePendingImfile 13 book listbook fakePendingExp14 12 end 15 13 16 14 macro fake.reset 17 15 book init fakePendingImfile 18 book init fakePendingExp19 16 end 20 17 … … 24 21 end 25 22 task fake.imfile.run 26 active true27 end28 task fake.exp.load29 active true30 end31 task fake.exp.run32 23 active true 33 24 end … … 41 32 active false 42 33 end 43 task fake.exp.load44 active false45 end46 task fake.exp.run47 active false48 end49 34 end 50 35 51 36 # this variable will cycle through the known database names 52 37 $fakeImfile_DB = 0 53 $fakeExp_DB = 054 38 55 39 # select images ready for fake analysis … … 171 155 172 156 173 174 175 # select exposures ready for fake analysis176 # new entries are added to fakePendingExp177 # skip already-present entries178 task fake.exp.load179 host local180 181 periods -poll $LOADPOLL182 periods -exec $LOADEXEC183 periods -timeout 30184 npending 1185 186 stdout NULL187 stderr $LOGDIR/fake.exp.log188 189 task.exec190 if ($DB:n == 0)191 option DEFAULT192 command faketool -pendingexp -limit 20193 else194 # save the DB name for the exit tasks195 option $DB:$fakeExp_DB196 command faketool -pendingexp -limit 20 -dbname $DB:$fakeExp_DB197 $fakeExp_DB ++198 if ($fakeExp_DB >= $DB:n) set fakeExp_DB = 0199 end200 end201 202 # success203 task.exit 0204 # convert 'stdout' to book format205 ipptool2book stdout fakePendingExp -key fake_id -uniq -setword dbname $options:0 -setword pantaskState INIT206 if ($VERBOSE > 2)207 book listbook fakePendingExp208 end209 210 # delete existing entries in the appropriate pantaskStates211 process_cleanup fakePendingExp212 end213 214 # locked list215 task.exit default216 showcommand failure217 end218 219 # operation times out?220 task.exit timeout221 showcommand timeout222 end223 end224 225 # run the fake_exp.pl script on pending images226 task fake.exp.run227 periods -poll $RUNPOLL228 periods -exec $RUNEXEC229 periods -timeout 60230 231 task.exec232 book npages fakePendingExp -var N233 if ($N == 0) break234 if ($NETWORK == 0) break235 236 # look for new exposures in fakePendingExp (pantaskState == INIT)237 book getpage fakePendingExp 0 -var pageName -key pantaskState INIT238 if ("$pageName" == "NULL") break239 240 book setword fakePendingExp $pageName pantaskState RUN241 book getword fakePendingExp $pageName camera -var CAMERA242 book getword fakePendingExp $pageName exp_id -var EXP_ID243 book getword fakePendingExp $pageName exp_tag -var EXP_TAG244 book getword fakePendingExp $pageName fake_id -var FAKE_ID245 book getword fakePendingExp $pageName workdir -var WORKDIR_TEMPLATE246 book getword fakePendingExp $pageName dbname -var DBNAME247 book getword fakePendingExp $pageName reduction -var REDUCTION248 249 # specify choice of local or remote host based on camera and fake250 set.host.for.camera $CAMERA FPA251 252 # set the WORKDIR variable253 set.workdir.by.camera $CAMERA FPA $WORKDIR_TEMPLATE $default_host WORKDIR254 255 ## generate outroot specific to this exposure (& chip)256 sprintf outroot "%s/%s/%s.fk.%s" $WORKDIR $EXP_TAG $EXP_TAG $FAKE_ID257 258 stderr $LOGDIR/fake.exp.log259 stderr $LOGDIR/fake.exp.log260 261 $run = fake_exp.pl --exp_id $EXP_ID --fake_id $FAKE_ID --camera $CAMERA --outroot $outroot262 if ("$REDUCTION" != "NULL")263 $run = $run --reduction $REDUCTION264 end265 add_standard_args run266 267 # save the pageName for future reference below268 options $pageName269 270 # create the command line271 if ($VERBOSE > 1)272 echo command $run273 end274 command $run275 end276 277 # default exit status278 task.exit default279 process_exit fakePendingExp $options:0 $JOB_STATUS280 end281 282 # operation timed out?283 task.exit timeout284 showcommand timeout285 book setword fakePendingExp $options:0 pantaskState TIMEOUT286 end287 end
Note:
See TracChangeset
for help on using the changeset viewer.
