Changeset 7512
- Timestamp:
- Jun 9, 2006, 7:18:59 PM (20 years ago)
- Location:
- trunk/ippTools/src
- Files:
-
- 2 edited
-
dettool.c (modified) (4 diffs)
-
dettoolConfig.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/dettool.c
r7509 r7512 519 519 PS_ASSERT_PTR_NON_NULL(config, false); 520 520 521 // find all matching detProcessedImfiles 522 // where query should be pre-generated 521 // find all matching detProcessedImfiles where query should be 522 // pre-generated the entry for iteration must be pruned from the default 523 // search as processed imfiles aren't 'iterated' 524 bool status = false; 525 psMetadata *prunedWhere = psMetadataCopy(NULL, config->where); 526 psMetadataLookupS32(&status, prunedWhere, "iteration"); 527 if (status) { 528 if (!psMetadataRemove(prunedWhere, 0, "iteration")) { 529 psError(PS_ERR_UNKNOWN, false, "failed to remove item iteration"); 530 return false; 531 } 532 } 523 533 psArray *processedImfiles = 524 detProcessedImfileSelectRowObjects(config->dbh, config->where, 0); 534 detProcessedImfileSelectRowObjects(config->dbh, prunedWhere, 0); 535 psFree(prunedWhere); 525 536 if (!processedImfiles) { 526 537 psError(PS_ERR_UNKNOWN, false, "no detProcessedImfile rows found"); … … 529 540 530 541 // remove detStackedImfiles unless -unmask 531 bool status = false;532 542 if (!psMetadataLookupBool(&status, config->args, "-unmask")) { 533 543 // detStackedImfiles doesn't have an exp_id so we have to generate the … … 540 550 return false; 541 551 } 552 psS32 iteration = psMetadataLookupS32(&status, config->args, "-iteration"); 553 if (!status) { 554 psError(PS_ERR_UNKNOWN, false, 555 "failed to lookup value for -iteration"); 556 return false; 557 } 542 558 psString class_id = psMetadataLookupStr(&status, config->args, 543 559 "-class_id"); … … 555 571 return false; 556 572 } 573 } 574 // iteration always has a value (and it may be 0 anyways) 575 if (!psMetadataAddS32(where, PS_LIST_TAIL, "iteration", 0, "==", 576 iteration)) { 577 psError(PS_ERR_UNKNOWN, false, "failed to add item iteration"); 578 psFree(where); 579 return false; 557 580 } 558 581 if (class_id) { -
trunk/ippTools/src/dettoolConfig.c
r7423 r7512 70 70 psMetadataAddStr(procArgs, PS_LIST_TAIL, "-det_id", 0, 71 71 "search for detrend ID", NULL); 72 psMetadataAddS32(procArgs, PS_LIST_TAIL, "-iteration", 0, 73 "searchfor iteration number", 0); 72 74 psMetadataAddStr(procArgs, PS_LIST_TAIL, "-exp_id", 0, 73 75 "search for exp ID", NULL);
Note:
See TracChangeset
for help on using the changeset viewer.
