- Timestamp:
- Aug 8, 2008, 5:08:29 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branch_20080719/ippTools/src/dettool_normalizedexp.c
r18643 r18991 73 73 PS_ASSERT_PTR_NON_NULL(config, false); 74 74 75 PXOPT_LOOKUP_S TR(det_id, config->args, "-det_id", true, false); // required75 PXOPT_LOOKUP_S64(det_id, config->args, "-det_id", true, false); // required 76 76 PXOPT_LOOKUP_S32(iteration, config->args, "-iteration", false, false); 77 77 PXOPT_LOOKUP_S16(code, config->args, "-code", false, false); … … 94 94 95 95 // XXX in some other places, we put the arguments in the .sql and supply them to RunQuery 96 psStringAppend(&query, " WHERE det_id = % sAND iteration = %d", det_id, iteration);96 psStringAppend(&query, " WHERE det_id = %" PRId64 " AND iteration = %d", det_id, iteration); 97 97 98 98 if (!p_psDBRunQuery(config->dbh, query)) { … … 116 116 117 117 // insert the new row into the detProcessedImfile table 118 if (!detNormalizedExpInsert(config->dbh, 119 (psS64)atoll(det_id), 120 iteration, 121 recipe, 122 bg, 123 bg_stdev, 124 bg_mean_stdev, 125 user_1, 126 user_2, 127 user_3, 128 user_4, 129 user_5, 130 path_base, 131 code 132 )) { 118 if (!detNormalizedExpInsert( 119 config->dbh, 120 det_id, 121 iteration, 122 recipe, 123 bg, 124 bg_stdev, 125 bg_mean_stdev, 126 user_1, 127 user_2, 128 user_3, 129 user_4, 130 user_5, 131 path_base, 132 "full", 133 code 134 )) { 133 135 psError(PS_ERR_UNKNOWN, false, "database error"); 134 136 return false; … … 144 146 145 147 psMetadata *where = psMetadataAlloc(); 146 PXOPT_COPY_S TR(config->args, where, "-det_id", "det_id", "==");148 PXOPT_COPY_S64(config->args, where, "-det_id", "det_id", "=="); 147 149 PXOPT_COPY_S32(config->args, where, "-iteration", "iteration", "=="); 148 150 PXOPT_COPY_STR(config->args, where, "-recip", "recipe", "=="); … … 217 219 218 220 psMetadata *where = psMetadataAlloc(); 219 PXOPT_COPY_S TR(config->args, where, "-det_id", "det_id", "==");221 PXOPT_COPY_S64(config->args, where, "-det_id", "det_id", "=="); 220 222 PXOPT_COPY_S32(config->args, where, "-iteration", "iteration", "=="); 221 223 PXOPT_COPY_S16(config->args, where, "-code", "fault", "=="); … … 249 251 } 250 252 253 bool updatenormalizedexpMode(pxConfig *config) 254 { 255 PS_ASSERT_PTR_NON_NULL(config, NULL); 256 257 PXOPT_LOOKUP_S64(det_id, config->args, "-det_id", true, false); 258 PXOPT_LOOKUP_S32(iteration, config->args, "-iteration", true, false); 259 PXOPT_LOOKUP_STR(data_state, config->args, "-data_state", true, false); 260 261 if (!setNormExpDataState(config, det_id, iteration, data_state)) { 262 return false; 263 } 264 return true; 265 } 266 251 267 bool pendingcleanup_normalizedexpMode(pxConfig *config) 252 268 { 253 269 PS_ASSERT_PTR_NON_NULL(config, NULL); 254 270 255 PXOPT_LOOKUP_S64(chip_id, config->args, "-chip_id", false, false);256 271 PXOPT_LOOKUP_U64(limit, config->args, "-limit", false, false); 257 272 PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false); 258 273 259 274 psMetadata *where = psMetadataAlloc(); 260 if (chip_id) { 261 PXOPT_COPY_S64(config->args, where, "-chip_id", "chip_id", "=="); 262 } 263 PXOPT_COPY_STR(config->args, where, "-label", "label", "=="); 275 PXOPT_COPY_S64(config->args, where, "-det_id", "detNormalizedExp.det_id", "=="); 276 PXOPT_COPY_S32(config->args, where, "-iteration", "detNormalizedExp.iteration", "=="); 264 277 265 278 psString query = pxDataGet("dettool_pendingcleanup_normalizedexp.sql"); … … 302 315 303 316 // negative simple so the default is true 304 if (!ippdbPrintMetadatas(stdout, output, "det PendingCleanup_normalizedexp", !simple)) {317 if (!ippdbPrintMetadatas(stdout, output, "detCleanupNormExp", !simple)) { 305 318 psError(PS_ERR_UNKNOWN, false, "failed to print array"); 306 319 psFree(output);
Note:
See TracChangeset
for help on using the changeset viewer.
