- Timestamp:
- Mar 30, 2012, 2:49:37 PM (14 years ago)
- Location:
- branches/eam_branches/ipp-20111122/ippTools/src
- Files:
-
- 2 edited
-
. (modified) (2 props)
-
chiptool.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20111122/ippTools/src
- Property svn:ignore
-
old new 7 7 Makefile.in 8 8 addtool 9 mergetool 9 10 caltool 10 11 camtool
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/eam_branches/ipp-20111122/ippTools/src/chiptool.c
r32653 r33638 198 198 GET_VALUE (psS64, S64, exp_id, "exp_id"); 199 199 GET_VALUE (psString, Str, raw_workdir, "workdir"); 200 #ifdef notyet 201 GET_VALUE (psString, Str, old_workdir, "old_workdir"); 202 GET_VALUE (psString, Str, old_data_group, "old_data_group"); 203 #else 204 const char *old_workdir = NULL; 205 const char *old_data_group = NULL; 206 #endif 200 207 GET_VALUE (psString, Str, raw_label, "label"); 201 208 GET_VALUE (psString, Str, raw_reduction, "reduction"); … … 213 220 if (!pxchipQueueByExpTag(config, 214 221 exp_id, 215 workdir ? workdir : raw_workdir,222 workdir ? workdir : (old_workdir ? old_workdir : raw_workdir), 216 223 label ? label : raw_label, 217 data_group ? data_group : ( label ? label : raw_label),224 data_group ? data_group : (old_data_group ? old_data_group : (label ? label : raw_label)), 218 225 dist_group, 219 226 reduction ? reduction : raw_reduction, … … 345 352 pxAddLabelSearchArgs (config, where, "-label", "chipOld.label", "LIKE"); 346 353 pxAddLabelSearchArgs (config, where, "-data_group", "chipOld.data_group", "LIKE"); 354 PXOPT_COPY_STR(config->args, where, "-state", "chipOld.state", "=="); 347 355 348 356 // psListLength(where->list) is at least 1 because exp_type defaults to "object" … … 354 362 } 355 363 356 PXOPT_LOOKUP_STR(workdir, config->args, "-set_workdir", true, false);364 PXOPT_LOOKUP_STR(workdir, config->args, "-set_workdir", false, false); 357 365 PXOPT_LOOKUP_STR(label, config->args, "-set_label", true, false); 358 366 PXOPT_LOOKUP_STR(reduction, config->args, "-set_reduction", false, false); … … 468 476 PXOPT_COPY_S64(config->args, where, "-chip_id", "chipRun.chip_id", "=="); 469 477 pxAddLabelSearchArgs (config, where, "-label", "chipRun.label", "=="); 478 PXOPT_COPY_STR(config->args, where, "-class_id", "rawImfile.class_id", "=="); 470 479 471 480 psString query = pxDataGet("chiptool_pendingimfile.sql"); … … 1006 1015 PXOPT_COPY_S64(config->args, where, "-chip_id", "chipProcessedImfile.chip_id", "=="); 1007 1016 PXOPT_COPY_STR(config->args, where, "-class_id", "chipProcessedImfile.class_id", "=="); 1008 PXOPT_LOOKUP_S64(chip_id, config->args, "-chip_id", true, false); 1017 PXOPT_COPY_S64(config->args, where, "-cam_id", "cam_id", "=="); 1018 1019 PXOPT_LOOKUP_S64(cam_id, config->args, "-cam_id", false, false); 1020 // if cam_id is not supplied chip_id is required 1021 PXOPT_LOOKUP_S64(chip_id, config->args, "-chip_id", cam_id ? false : true, false); 1009 1022 PXOPT_LOOKUP_S64(class_id, config->args, "-class_id", true, false); 1010 1023 PXOPT_LOOKUP_S16(quality, config->args, "-set_quality", true, false); … … 1017 1030 if (psListLength(where->list) == 0) { 1018 1031 // won't get here 1019 psError(PXTOOLS_ERR_CONFIG, true, "-chip_id and -class_id are required");1032 psError(PXTOOLS_ERR_CONFIG, true, "-chip_id (or -cam_id) and -class_id are required"); 1020 1033 return false; 1021 1034 } … … 2024 2037 return false; 2025 2038 } 2026 2027 2039 psFree(setHook); 2028 2040 psFree(query); 2041 2042 // if we are updating a whole chipRun set lingering chips with poor quality to full data_state 2043 if (!class_id) { 2044 query = "UPDATE chipProcessedImfile SET data_state ='full', fault = 0 WHERE chip_id = %" PRId64 " AND quality != 0 AND (data_state ='cleaned' OR data_state = 'update')"; 2045 2046 if (!p_psDBRunQueryF(config->dbh, query, chip_id)) { 2047 psError(PS_ERR_UNKNOWN, false, "database error"); 2048 return false; 2049 } 2050 } 2029 2051 2030 2052 return true;
Note:
See TracChangeset
for help on using the changeset viewer.
