Changeset 11323 for trunk/ippTasks/detrend.process.pro
- Timestamp:
- Jan 26, 2007, 1:39:42 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/ippTasks/detrend.process.pro (modified) (13 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTasks/detrend.process.pro
r11210 r11323 27 27 book listbook detPendingProcessedExp 28 28 end 29 30 # these variables will cycle through the known database names 31 $detPendingProcessedImfile_DB = 0 32 $detPendingProcessedExp_DB = 0 29 33 30 34 # select images ready for copy … … 42 46 43 47 task.exec 44 command dettool -toprocessedimfile -limit 20 48 if ($DB:n == 0) 49 option DEFAULT 50 command dettool -toprocessedimfile -limit 20 51 else 52 # save the DB name for the exit tasks 53 option $DB:$detPendingProcessedImfile_DB 54 command dettool -toprocessedimfile -limit 20 -dbname $DB:$detPendingProcessedImfile_DB 55 $detPendingProcessedImfile_DB ++ 56 if ($detPendingProcessedImfile_DB >= $DB:n) set detPendingProcessedImfile_DB = 0 57 end 45 58 end 46 59 … … 48 61 task.exit 0 49 62 # convert 'stdout' to book format 50 ipptool2book stdout detPendingProcessedImfile -key det_id:exp_tag:class_id -uniq 63 ipptool2book stdout detPendingProcessedImfile -key det_id:exp_tag:class_id -uniq -setword dbname $options:0 51 64 if ($VERBOSE > 2) 52 65 book listbook detPendingProcessedImfile … … 55 68 # delete existing entries which are DONE 56 69 book delpage detPendingProcessedImfile -key state DONE 70 book delpage detPendingProcessedImfile -key state DATA_ERR 57 71 end 58 72 … … 91 105 book getword detPendingProcessedImfile $pageName uri -var URI 92 106 book getword detPendingProcessedImfile $pageName camera -var CAMERA 107 book getword detPendingProcessedImfile $pageName workdir -var WORKDIR 108 book getword detPendingProcessedImfile $pageName dbname -var DBNAME 109 set_standard_args 93 110 94 111 # specify choice of remote host: … … 100 117 101 118 ## generate output log based on filerule 102 ## XXX use OUTPATH from db to set output path 103 ## XXX use ipp_filename.pl DETPROC.LOG $outroot $CLASS_ID` 104 $word = `basename $EXP_TAG | tr '.' ' '` 105 list word -split $word 106 $base = $word:0 107 stdout $LOGSUBDIR/$base/$EXP_TAG.detproc.$DET_ID.$CLASS_ID.log 108 stderr $LOGSUBDIR/$base/$EXP_TAG.detproc.$DET_ID.$CLASS_ID.log 109 exec mkdir -p $LOGSUBDIR/$base 119 $outroot = $WORKDIR/$EXP_TAG 120 $logfile = `ipp_filename.pl DETPROC.LOG $outroot $CLASS_ID` 121 stdout $logfile 122 stderr $logfile 123 exec mkdir -p $WORKDIR 110 124 111 125 # save the pageName for future reference below … … 114 128 # create example job options as a demonstration 115 129 if ($VERBOSE > 1) 116 echo command detrend_process_imfile.pl --det_id $DET_ID --det_type $DET_TYPE --exp_tag $EXP_TAG --class $CLASS --class_id $CLASS_ID --input_uri $URI --camera $CAMERA 117 end 118 command detrend_process_imfile.pl --det_id $DET_ID --det_type $DET_TYPE --exp_tag $EXP_TAG --class $CLASS --class_id $CLASS_ID --input_uri $URI --camera $CAMERA 130 echo command detrend_process_imfile.pl --det_id $DET_ID --det_type $DET_TYPE --exp_tag $EXP_TAG --class $CLASS --class_id $CLASS_ID --input_uri $URI --camera $CAMERA $ARGS 131 end 132 command detrend_process_imfile.pl --det_id $DET_ID --det_type $DET_TYPE --exp_tag $EXP_TAG --class $CLASS --class_id $CLASS_ID --input_uri $URI --camera $CAMERA $ARGS 119 133 end 120 134 … … 145 159 146 160 task.exec 147 command dettool -toprocessedexp -limit 20 161 if ($DB:n == 0) 162 command dettool -toprocessedexp -limit 20 163 else 164 # save the DB name for the exit tasks 165 option $DB:$detPendingProcessedExp_DB 166 command dettool -toprocessedexp -limit 20 -dbname $DB:$detPendingProcessedExp_DB 167 $detPendingProcessedExp_DB ++ 168 if ($detPendingProcessedExp_DB >= $DB:n) set detPendingProcessedExp_DB = 0 169 end 148 170 end 149 171 … … 151 173 task.exit 0 152 174 # convert 'stdout' to book format 153 ipptool2book stdout detPendingProcessedExp -key det_id:iteration:exp_tag -uniq 175 if ($options:n == 0) 176 ipptool2book stdout detPendingProcessedExp -key det_id:iteration:exp_tag -uniq 177 else 178 ipptool2book stdout detPendingProcessedExp -key det_id:iteration:exp_tag -uniq -setword DBNAME $options:0 179 end 154 180 if ($VERBOSE > 2) 155 181 book listbook detPendingProcessedExp … … 158 184 # delete existing entries which are DONE 159 185 book delpage detPendingProcessedExp -key state DONE 186 book delpage detPendingProcessedExp -key state DATA_ERR 160 187 end 161 188 … … 192 219 book getword detPendingProcessedExp $pageName exp_tag -var EXP_TAG 193 220 book getword detPendingProcessedExp $pageName camera -var CAMERA 221 book getword detPendingProcessedExp $pageName workdir -var WORKDIR 222 book getword detPendingProcessedExp $pageName dbname -var DBNAME 223 set_standard_args 194 224 195 225 # specify choice of remote host: … … 200 230 end 201 231 202 # XXX this is still a lame rule 203 $word = `basename $EXP_TAG | tr '.' ' '` 204 list word -split $word 205 $base = $word:0 206 stdout $LOGSUBDIR/$base/$EXP_TAG.detproc.$DET_ID.log 207 stderr $LOGSUBDIR/$base/$EXP_TAG.detproc.$DET_ID.log 208 exec mkdir -p $LOGSUBDIR/$base 232 # XXX push this into the filerules? 233 $outroot = $WORKDIR/$EXP_TAG 234 $logfile = $outroot/$EXP_TAG.detproc.$DET_ID.log 235 stdout $logfile 236 stderr $logfile 237 exec mkdir -p $outroot 209 238 210 239 # save the pageName for future reference below … … 213 242 # create example job options as a demonstration 214 243 if ($VERBOSE > 1) 215 echo command detrend_process_exp.pl --det_id $DET_ID --exp_tag $EXP_TAG --camera $CAMERA 216 end 217 command detrend_process_exp.pl --det_id $DET_ID --exp_tag $EXP_TAG --camera $CAMERA 244 echo command detrend_process_exp.pl --det_id $DET_ID --exp_tag $EXP_TAG --camera $CAMERA $ARGS 245 end 246 command detrend_process_exp.pl --det_id $DET_ID --exp_tag $EXP_TAG --camera $CAMERA $ARGS 218 247 end 219 248
Note:
See TracChangeset
for help on using the changeset viewer.
