Changeset 26567 for trunk/ippTools/src/chiptool.c
- Timestamp:
- Jan 12, 2010, 2:07:51 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/src/chiptool.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/chiptool.c
r26465 r26567 720 720 PXOPT_COPY_STR(config->args, where, "-class_id", "class_id", "=="); 721 721 PXOPT_LOOKUP_STR(state, config->args, "-set_state", false, NULL); 722 if (psListLength(where->list) == 0) { 723 psError(PS_ERR_UNKNOWN, true, "search parameters are required"); 724 return false; 725 } 722 726 723 727 if (!state) { … … 1254 1258 chipRun->tess_id, 1255 1259 chipRun->end_stage, 1260 chipRun->magicked, 1256 1261 NULL // note does not propagate 1257 1262 )) { … … 1295 1300 } 1296 1301 1297 psString set_magic = ""; 1302 char *set_magicked_imfile = ""; 1303 char *set_magicked_run = ""; 1298 1304 if (!strcmp(data_state, "full")) { 1299 // copy the magicked state from the input to the output when transitioning to full state 1300 set_magic = "\n , chipProcessedImfile.magicked = rawImfile.magicked"; 1301 } 1302 1303 // note only updates if chipRun.state = run_state 1304 // XXX note that we have removed this constraint for now 1305 if (!p_psDBRunQueryF(config->dbh, query, data_state, set_magic, chip_id, class_id)) { 1305 // if (chipProcessedImfile.magicked < 0 and rawImfile.magicked = 0) leave magicked unchanged. This will 1306 // block warp processing until destreaking has been done 1307 // otherwise copy magicked from the rawImfile 1308 // Same thing for chipRun/rawExp 1309 set_magicked_imfile = "\n , chipProcessedImfile.magicked = IF((chipProcessedImfile.magicked < 0 AND rawImfile.magicked = 0), chipProcessedImfile.magicked, rawImfile.magicked)"; 1310 set_magicked_run = "\n , chipRun.magicked = IF((chipRun.magicked < 0 AND rawExp.magicked = 0), chipRun.magicked, rawExp.magicked)"; 1311 } else if (!strcmp(data_state, "cleaned") || !strcmp(data_state, "purged")) { 1312 // if magicked is non-zero set it to -1 1313 set_magicked_imfile = "\n, chipProcessedImfile.magicked = IF(chipProcessedImfile.magicked = 0, 0, -1)"; 1314 set_magicked_run = "\n, chipRun.magicked = IF(chipRun.magicked = 0, 0, -1)"; 1315 } 1316 1317 if (!p_psDBRunQueryF(config->dbh, query, data_state, set_magicked_imfile, chip_id, class_id)) { 1306 1318 psFree(query); 1307 1319 psError(PS_ERR_UNKNOWN, false, "database error"); … … 1320 1332 1321 1333 query = pxDataGet("chiptool_change_exp_state.sql"); 1322 if (!p_psDBRunQueryF(config->dbh, query, data_state, chip_id, data_state)) {1334 if (!p_psDBRunQueryF(config->dbh, query, data_state, set_magicked_run, chip_id, data_state)) { 1323 1335 psFree(query); 1324 1336 // rollback
Note:
See TracChangeset
for help on using the changeset viewer.
