Changeset 25835 for trunk/ippTools/src/difftool.c
- Timestamp:
- Oct 14, 2009, 11:06:18 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/src/difftool.c (modified) (20 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/difftool.c
r25800 r25835 51 51 52 52 static bool setdiffRunState(pxConfig *config, psS64 diff_id, const char *state, psS64 magicked); 53 static bool setdiffRunStateByLabel(pxConfig *config, const char* label, const char *state);54 53 static bool change_skyfile_data_state(pxConfig *config, psString data_state, psString run_state); 55 54 static bool tocleanedskyfileMode(pxConfig *config); … … 126 125 127 126 // required options 128 PXOPT_LOOKUP_STR(workdir, config->args, "- workdir", true, false);127 PXOPT_LOOKUP_STR(workdir, config->args, "-set_workdir", true, false); 129 128 PXOPT_LOOKUP_STR(tess_id, config->args, "-tess_id", true, false); 130 129 PXOPT_LOOKUP_BOOL(bothways, config->args, "-bothways", false); 131 130 PXOPT_LOOKUP_BOOL(exposure, config->args, "-exposure", false); 132 PXOPT_LOOKUP_STR(label, config->args, "-label", false, false); 133 PXOPT_LOOKUP_STR(reduction, config->args, "-reduction", false, false); 131 PXOPT_LOOKUP_STR(label, config->args, "-set_label", false, false); 132 PXOPT_LOOKUP_STR(data_group, config->args, "-set_data_group", false, false); 133 PXOPT_LOOKUP_STR(dist_group, config->args, "-set_dist_group", false, false); 134 PXOPT_LOOKUP_STR(reduction, config->args, "-rset_eduction", false, false); 135 PXOPT_LOOKUP_STR(note, config->args, "-set_note", false, false); 134 136 135 137 // default … … 142 144 workdir, 143 145 label, 146 data_group ? data_group : label, 147 dist_group, 144 148 reduction, 145 149 NULL, // dvodb … … 148 152 bothways, 149 153 exposure, 150 false 154 false, 155 note 151 156 ); 152 157 if (!run) { … … 179 184 PS_ASSERT_PTR_NON_NULL(config, false); 180 185 186 psMetadata *where = psMetadataAlloc(); 187 188 PXOPT_COPY_S64(config->args, where, "-diff_id", "stack_id", "=="); 189 PXOPT_COPY_STR(config->args, where, "-label", "label", "=="); 190 PXOPT_COPY_STR(config->args, where, "-state", "state", "=="); 191 if (!psListLength(where->list)) { 192 psFree(where); 193 psError(PXTOOLS_ERR_DATA, false, "search parameters are required"); 194 return false; 195 } 196 197 psString query = psStringCopy("UPDATE diffRun"); 198 199 // pxUpdateRun gets parameters from config->args and updates 200 bool result = pxUpdateRun(config, where, &query, true); 201 202 psFree(query); 203 psFree(where); 204 205 return result; 206 207 #ifdef notdef 181 208 // required options 182 209 PXOPT_LOOKUP_S64(diff_id, config->args, "-diff_id", false, false); … … 197 224 198 225 return false; 226 #endif 199 227 } 200 228 … … 907 935 908 936 937 #ifdef notdef 909 938 static bool setdiffRunStateByLabel(pxConfig *config, const char *label, const char *state) { 910 939 PS_ASSERT_PTR_NON_NULL(state,false); … … 925 954 return true; 926 955 } 956 #endif 927 957 928 958 // Generate a single populated run … … 932 962 const char *tess_id, // Tessellation identifier 933 963 const char *label, // label 964 const char *data_group, // data_group 965 const char *dist_group, // dist_group 934 966 const char *reduction, // reduction 967 const char *note, // note 935 968 psS64 input_warp_id, // Warp identifier for input image, PS_MAX_S64 for none 936 969 psS64 input_stack_id, // Stack identifier for input image, PS_MAX_S64 for none … … 963 996 workdir, 964 997 label, 998 data_group ? data_group : label, 999 dist_group, 965 1000 reduction, 966 1001 NULL, // dvodb … … 969 1004 false, 970 1005 false, 971 0 // magicked 1006 0, // magicked 1007 note 972 1008 ); 973 1009 … … 1043 1079 PXOPT_LOOKUP_STR(tess_id, config->args, "-tess_id", true, false); // required options 1044 1080 PXOPT_LOOKUP_STR(label, config->args, "-label", false, false); 1081 PXOPT_LOOKUP_STR(data_group, config->args, "-set_data_group", false, false); 1082 PXOPT_LOOKUP_STR(dist_group, config->args, "-set_dist_group", false, false); 1045 1083 PXOPT_LOOKUP_STR(reduction, config->args, "-reduction", false, false); 1046 1084 PXOPT_LOOKUP_S64(template_warp_id, config->args, "-template_warp_id", false, false); … … 1049 1087 PXOPT_LOOKUP_S64(input_stack_id, config->args, "-input_stack_id", false, false); 1050 1088 PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false); 1089 PXOPT_LOOKUP_STR(note, config->args, "-set_note", false, false); 1051 1090 1052 1091 if (template_stack_id && template_warp_id) { … … 1072 1111 psArray *list = psArrayAllocEmpty(16); // List of runs, to print 1073 1112 1074 if (!populatedrun(list, workdir, skycell_id, tess_id, label, reduction,1113 if (!populatedrun(list, workdir, skycell_id, tess_id, label, data_group ? data_group : label, dist_group, reduction, note, 1075 1114 input_warp_id ? input_warp_id : PS_MAX_S64, 1076 1115 input_stack_id ? input_stack_id : PS_MAX_S64, … … 1111 1150 PXOPT_COPY_STR(config->args, stackWhere, "-stack_label", "stackRun.label", "=="); 1112 1151 1113 PXOPT_LOOKUP_STR(workdir, config->args, "-workdir", true, false); // required options 1114 PXOPT_LOOKUP_STR(reduction, config->args, "-reduction", false, false); // option 1115 PXOPT_LOOKUP_STR(label, config->args, "-label", false, false); // option 1116 PXOPT_LOOKUP_TIME(registered, config->args, "-registered", false, false); 1152 PXOPT_LOOKUP_STR(workdir, config->args, "-set_workdir", true, false); // required option 1153 PXOPT_LOOKUP_STR(reduction, config->args, "-set_reduction", false, false); // option 1154 PXOPT_LOOKUP_STR(label, config->args, "-set_label", false, false); // option 1155 PXOPT_LOOKUP_STR(data_group, config->args, "-set_data_group", false, false); 1156 PXOPT_LOOKUP_STR(dist_group, config->args, "-set_dist_group", false, false); 1157 PXOPT_LOOKUP_STR(note, config->args, "-set_note", false, false); 1158 PXOPT_LOOKUP_TIME(registered, config->args, "-set_registered", false, false); 1159 1117 1160 PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false); 1118 1161 PXOPT_LOOKUP_BOOL(newTemplates, config->args, "-new-templates", false); … … 1350 1393 workdir, 1351 1394 label, 1395 data_group ? data_group : label, 1396 dist_group, 1352 1397 reduction, 1353 1398 NULL, // dvodb … … 1356 1401 false, // bothways 1357 1402 true, // exposure 1358 0 // magicked 1403 0, // magicked 1404 note 1359 1405 ); 1360 1406 … … 1425 1471 } 1426 1472 1427 if ( !diffRunPrintObjects(stdout, list, !simple)) {1473 if (numGood && !diffRunPrintObjects(stdout, list, !simple)) { 1428 1474 psError(PS_ERR_UNKNOWN, false, "failed to print object"); 1429 1475 psFree(list); … … 1506 1552 1507 1553 // Settings to apply to defined run 1508 PXOPT_LOOKUP_STR(workdir, config->args, "-workdir", true, false); // required options 1509 PXOPT_LOOKUP_STR(reduction, config->args, "-reduction", false, false); // option 1510 PXOPT_LOOKUP_STR(label, config->args, "-label", false, false); // option 1511 PXOPT_LOOKUP_TIME(registered, config->args, "-registered", false, false); 1554 PXOPT_LOOKUP_STR(workdir, config->args, "-set_workdir", true, false); // required options 1555 PXOPT_LOOKUP_STR(reduction, config->args, "-set_reduction", false, false); // option 1556 PXOPT_LOOKUP_STR(label, config->args, "-set_label", false, false); // option 1557 PXOPT_LOOKUP_STR(data_group, config->args, "-set_data_group", false, false); // option 1558 PXOPT_LOOKUP_STR(dist_group, config->args, "-set_dist_group", false, false); // option 1559 PXOPT_LOOKUP_STR(note, config->args, "-set_note", false, false); // option 1560 PXOPT_LOOKUP_TIME(registered, config->args, "-set_registered", false, false); 1561 1512 1562 PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false); 1513 1563 PXOPT_LOOKUP_BOOL(pretend, config->args, "-pretend", false); … … 1693 1743 } 1694 1744 1695 diffRunRow *run = diffRunRowAlloc(0, "reg", workdir, label, reduction, NULL, registered,1696 tess_id, true, true, false ); // Run to insert1745 diffRunRow *run = diffRunRowAlloc(0, "reg", workdir, label, data_group ? data_group : label, dist_group, reduction, NULL, registered, 1746 tess_id, true, true, false, note); // Run to insert 1697 1747 if (!diffRunInsertObject(config->dbh, run)) { 1698 1748 psError(PS_ERR_UNKNOWN, false, "database error");
Note:
See TracChangeset
for help on using the changeset viewer.
