Changeset 31376
- Timestamp:
- Apr 25, 2011, 3:00:33 PM (15 years ago)
- Location:
- trunk/ippTasks
- Files:
-
- 2 edited
-
addstar.pro (modified) (7 diffs)
-
survey.pro (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTasks/addstar.pro
r30327 r31376 17 17 18 18 macro addstar.on 19 task addstar.exp.load 19 task addstar.exp.load.stack 20 active true 21 end 22 task addstar.exp.load.cam 23 active true 24 end 25 task addstar.exp.load.staticsky 20 26 active true 21 27 end … … 26 32 27 33 macro addstar.off 28 task addstar.exp.load 34 task addstar.exp.load.stack 35 active false 36 end 37 task addstar.exp.load.cam 38 active false 39 end 40 task addstar.exp.load.staticsky 29 41 active false 30 42 end … … 54 66 # new entries are added to addPendingExp 55 67 # skip already-present entries 56 task addstar.exp.load 68 task addstar.exp.load.stack 57 69 host local 58 70 … … 67 79 task.exec 68 80 # if ($LABEL:n == 0) break 69 $run = addtool -pendingexp 81 $run = addtool -pendingexp -stage stack 70 82 if ($DB:n == 0) 71 83 option DEFAULT … … 109 121 end 110 122 123 task addstar.exp.load.cam 124 host local 125 126 periods -poll $LOADPOLL 127 periods -exec $LOADEXEC 128 periods -timeout 30 129 npending 1 130 131 stdout NULL 132 stderr $LOGDIR/addstar.exp.log 133 134 task.exec 135 # if ($LABEL:n == 0) break 136 $run = addtool -pendingexp -stage cam 137 if ($DB:n == 0) 138 option DEFAULT 139 else 140 # save the DB name for the exit tasks 141 option $DB:$addstar_DB 142 $run = $run -dbname $DB:$addstar_DB 143 $addstar_DB ++ 144 if ($addstar_DB >= $DB:n) set addstar_DB = 0 145 end 146 add_poll_args run 147 add_poll_labels run 148 command $run 149 end 150 151 # success 152 task.exit 0 153 # convert 'stdout' to book format 154 ipptool2book stdout addPendingExp -key add_id -uniq -setword dbname $options:0 -setword pantaskState INIT 155 if ($VERBOSE > 2) 156 book listbook addPendingExp 157 end 158 159 # delete existing entries in the appropriate pantaskStates 160 process_cleanup addPendingExp 161 end 162 163 # default exit status 164 task.exit default 165 showcommand failure 166 end 167 168 task.exit crash 169 showcommand crash 170 end 171 172 # operation times out? 173 task.exit timeout 174 showcommand timeout 175 end 176 end 177 task addstar.exp.load.staticsky 178 host local 179 180 periods -poll $LOADPOLL 181 periods -exec $LOADEXEC 182 periods -timeout 30 183 npending 1 184 185 stdout NULL 186 stderr $LOGDIR/addstar.exp.log 187 188 task.exec 189 # if ($LABEL:n == 0) break 190 $run = addtool -pendingexp -stage staticsky 191 if ($DB:n == 0) 192 option DEFAULT 193 else 194 # save the DB name for the exit tasks 195 option $DB:$addstar_DB 196 $run = $run -dbname $DB:$addstar_DB 197 $addstar_DB ++ 198 if ($addstar_DB >= $DB:n) set addstar_DB = 0 199 end 200 add_poll_args run 201 add_poll_labels run 202 command $run 203 end 204 205 # success 206 task.exit 0 207 # convert 'stdout' to book format 208 ipptool2book stdout addPendingExp -key add_id -uniq -setword dbname $options:0 -setword pantaskState INIT 209 if ($VERBOSE > 2) 210 book listbook addPendingExp 211 end 212 213 # delete existing entries in the appropriate pantaskStates 214 process_cleanup addPendingExp 215 end 216 217 # default exit status 218 task.exit default 219 showcommand failure 220 end 221 222 task.exit crash 223 showcommand crash 224 end 225 226 # operation times out? 227 task.exit timeout 228 showcommand timeout 229 end 230 end 111 231 # run the addstar script on pending exposures 112 232 task addstar.exp.run … … 132 252 book getword addPendingExp $pageName exp_tag -var EXP_TAG 133 253 book getword addPendingExp $pageName add_id -var ADD_ID 134 book getword addPendingExp $pageName camroot -var CAMROOT 254 book getword addPendingExp $pageName stageroot -var STAGEROOT 255 book getword addPendingExp $pageName stage -var STAGE 135 256 book getword addPendingExp $pageName workdir -var WORKDIR_TEMPLATE 136 257 book getword addPendingExp $pageName reduction -var REDUCTION … … 157 278 158 279 ## generate outroot specific to this exposure (& chip) 159 sprintf outroot "%s/%s/%s.add.%s" $WORKDIR $EXP_TAG $EXP_TAG $ADD_ID 280 281 if ("$STAGE" == "cam") 282 sprintf outroot "%s/%s/%s.add.%s" $WORKDIR $EXP_TAG $EXP_TAG $ADD_ID 283 end 284 if ("$STAGE" == "staticsky") 285 sprintf outroot "%s.add.%s" $STAGEROOT $ADD_ID 286 end 287 if ("$STAGE" == "stack") 288 sprintf outroot "%s.add.%s" $STAGEROOT $ADD_ID 289 end 290 160 291 161 292 stdout $LOGDIR/addstar.exp.log 162 293 stderr $LOGDIR/addstar.exp.log 163 294 164 $run = addstar_run.pl -- exp_tag $EXP_TAG --add_id $ADD_ID --camera $CAMERA --dvodb $DVODB --camroot $CAMROOT --outroot $outroot --redirect-output295 $run = addstar_run.pl --add_id $ADD_ID --camera $CAMERA --dvodb $DVODB --stage $STAGE --stageroot $STAGEROOT --outroot $outroot --redirect-output 165 296 if ("$REDUCTION" != "NULL") 166 297 $run = $run --reduction $REDUCTION -
trunk/ippTasks/survey.pro
r30531 r31376 231 231 232 232 macro survey.add.addstar 233 if ($0 != 4)234 echo "USAGE: survey.add.addstar (label) (dvodb) (minidvodb_group) "233 if ($0 != 5) 234 echo "USAGE: survey.add.addstar (label) (dvodb) (minidvodb_group) (stage)" 235 235 break 236 236 end … … 238 238 book setword SURVEY_ADDSTAR $1 DVODB $2 239 239 book setword SURVEY_ADDSTAR $1 MINIDVODB_GROUP $3 240 book setword SURVEY_ADDSTAR $1 STAGE $4 240 241 book setword SURVEY_ADDSTAR $1 STATE PENDING 241 242 end … … 753 754 book getword SURVEY_ADDSTAR $label DVODB -var dvodb 754 755 book getword SURVEY_ADDSTAR $label MINIDVODB_GROUP -var minidvodb_group 756 book getword SURVEY_ADDSTAR $label STAGE -var stage 757 755 758 756 759 # $run = addtool -definebyquery -destreaked -label $label -set_dvodb $dbodb … … 763 766 end 764 767 765 $run = $run -definebyquery - destreaked -label $label -set_dvodb $dvodb -set_minidvodb_group $minidvodb_group -set_minidvodb -set_label $minidvodb_group768 $run = $run -definebyquery -label $label -set_dvodb $dvodb -set_minidvodb_group $minidvodb_group -set_minidvodb -set_label $minidvodb_group -stage $stage 766 769 # echo $run 770 if ($stage == 'cam') 771 #only queue destreaked cams. stacks and staticsky don't need this 772 $run = $run -destreaked 773 end 774 775 767 776 command $run 768 777 end
Note:
See TracChangeset
for help on using the changeset viewer.
