Changeset 25835 for trunk/ippTools/src/warptool.c
- Timestamp:
- Oct 14, 2009, 11:06:18 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/src/warptool.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/warptool.c
r25822 r25835 141 141 PXOPT_LOOKUP_STR(workdir, config->args, "-workdir", true, false); // required 142 142 PXOPT_LOOKUP_STR(label, config->args, "-label", false, false); 143 PXOPT_LOOKUP_STR(data_group, config->args, "-data_group", false, false); 144 PXOPT_LOOKUP_STR(dist_group, config->args, "-dist_group", false, false); 145 PXOPT_LOOKUP_STR(note, config->args, "-note", false, false); 143 146 PXOPT_LOOKUP_STR(dvodb, config->args, "-dvodb", false, false); 144 147 PXOPT_LOOKUP_STR(tess_id, config->args, "-tess_id", true, false); // required (no default TESS) … … 162 165 "dirty", // workdir_state 163 166 label, 167 data_group ? data_group : label, 168 dist_group, 164 169 dvodb, 165 170 tess_id, … … 167 172 end_stage, 168 173 registered, 169 0 // magicked 174 0, // magicked 175 note 170 176 ); 171 177 if (!warpRun) { … … 253 259 PXOPT_LOOKUP_STR(workdir, config->args, "-set_workdir", false, false); 254 260 PXOPT_LOOKUP_STR(label, config->args, "-set_label", false, false); 261 PXOPT_LOOKUP_STR(data_group, config->args, "-set_data_group", false, false); 262 PXOPT_LOOKUP_STR(dist_group, config->args, "-set_dist_group", false, false); 255 263 PXOPT_LOOKUP_STR(dvodb, config->args, "-set_dvodb", false, false); 256 264 PXOPT_LOOKUP_STR(tess_id, config->args, "-set_tess_id", false, false); 257 265 PXOPT_LOOKUP_STR(reduction, config->args, "-set_reduction", false, false); 258 266 PXOPT_LOOKUP_STR(end_stage, config->args, "-set_end_stage", false, false); 267 PXOPT_LOOKUP_STR(note, config->args, "-set_note", false, false); 259 268 260 269 PXOPT_LOOKUP_TIME(registered, config->args, "-registered", false, false); … … 342 351 workdir ? workdir : row->workdir, 343 352 label ? label : row->label, 353 data_group ? data_group: row->data_group, 354 dist_group ? dist_group: row->dist_group, 344 355 dvodb ? dvodb : row->dvodb, 345 356 tess_id ? tess_id : row->tess_id, 346 357 reduction ? reduction : row->reduction, 347 end_stage ? end_stage : row->end_stage)) 358 end_stage ? end_stage : row->end_stage, 359 note)) 348 360 { 349 361 psError(PS_ERR_UNKNOWN, false, "failed to trying to queue fake_id: %" PRId64, row->fake_id); … … 373 385 PXOPT_COPY_STR(config->args, where, "-label", "warpRun.label", "=="); 374 386 PXOPT_COPY_STR(config->args, where, "-state", "warpRun.state", "=="); 375 376 if (!psListLength(where->list) 377 && !psMetadataLookupBool(NULL, config->args, "-all")) { 387 PXOPT_COPY_STR(config->args, where, "-data_group","warpRun.data_group", "=="); 388 PXOPT_COPY_STR(config->args, where, "-dist_group","warpRun.dist_group", "=="); 389 390 if (!psListLength(where->list)) { 378 391 psFree(where); 379 where = NULL;380 392 psError(PXTOOLS_ERR_DATA, false, "search parameters are required"); 381 393 return false; 382 394 } 383 384 PXOPT_LOOKUP_STR(state, config->args, "-set_state", false, false); 385 PXOPT_LOOKUP_STR(label, config->args, "-set_label", false, false); 386 387 if ((!state) && (!label)) { 388 psError(PXTOOLS_ERR_DATA, false, "parameters (-state or -label) are required"); 389 psFree(where); 390 return false; 391 } 392 393 if (state) { 394 // set warpRun.state to state 395 if (!pxwarpRunSetStateByQuery(config, where, state)) { 396 psFree(where); 397 return false; 398 } 399 } 400 401 if (label) { 402 // set chipRun.label to label 403 if (!pxwarpRunSetLabelByQuery(config, where, label)) { 404 psFree(where); 405 return false; 406 } 407 } 408 395 396 psString query = psStringCopy("UPDATE warpRun JOIN fakeRun USING(fake_id) JOIN camRun USING(cam_id) JOIN chipRun USING(chip_id) JOIN rawExp USING(exp_id)"); 397 398 // pxUpdateRun gets parameters from config->args and updates 399 bool result = pxUpdateRun(config, where, &query, true); 400 401 psFree(query); 409 402 psFree(where); 410 403 411 return true; 412 } 413 404 return result; 405 } 414 406 415 407 static bool expMode(pxConfig *config)
Note:
See TracChangeset
for help on using the changeset viewer.
