Changeset 32750 for trunk/ippTools/src/vptool.c
- Timestamp:
- Nov 22, 2011, 10:25:28 AM (15 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/src/vptool.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/vptool.c
r32511 r32750 282 282 psFree(where); 283 283 284 psStringAppend(&query, "\nGROUP BY vp_id HAVING");285 284 psStringAppend(&query, "\nORDER BY priority DESC, vp_id"); 286 285 … … 597 596 static bool processedcellMode(pxConfig *config) 598 597 { 599 return false;600 #ifdef notyet601 598 PS_ASSERT_PTR_NON_NULL(config, NULL); 602 599 603 600 PXOPT_LOOKUP_U64(limit, config->args, "-limit", false, false); 604 601 PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false); 605 PXOPT_LOOKUP_BOOL(faulted, config->args, "-faulted", false);606 PXOPT_LOOKUP_BOOL(allfiles, config->args, "-allfiles", false);607 if (allfiles) {608 faulted = false;609 }610 PXOPT_LOOKUP_BOOL(pstamp_order, config->args, "-pstamp_order", false);611 602 612 603 psMetadata *where = psMetadataAlloc(); 613 604 pxchipGetSearchArgs (config, where); // chipRun, chipProcessedImfile, rawExp 614 PXOPT_COPY_S64(config->args, where, "-chip_id", "chipRun.chip_id", "=="); 615 PXOPT_COPY_S64(config->args, where, "-chip_imfile_id", "chipImfile.chip_imfile_id", "=="); 616 PXOPT_COPY_STR(config->args, where, "-class_id", "chipProcessedImfile.class_id", "=="); 617 PXOPT_COPY_STR(config->args, where, "-reduction", "chipRun.reduction", "=="); 618 pxAddLabelSearchArgs (config, where, "-label", "chipRun.label", "LIKE"); 619 pxAddLabelSearchArgs (config, where, "-data_group", "chipRun.data_group", "LIKE"); 620 PXOPT_COPY_S64(config->args, where, "-magicked", "chipProcessedImfile.magicked", "=="); 621 622 psString where2 = NULL; 623 pxmagicAddWhere(config, &where2, "chipProcessedImfile"); 624 // add cuts on ra and decl if supplied 625 if (!pxspaceAddWhere(config, &where2, "rawExp")) { 626 psError(psErrorCodeLast(), false, "pxSpaceAddWhere failed"); 627 return false; 628 } 605 PXOPT_COPY_S64(config->args, where, "-vp_id", "vp_id", "=="); 606 PXOPT_COPY_STR(config->args, where, "-class_id", "class_id", "=="); 607 PXOPT_COPY_STR(config->args, where, "-cell_id", "cell_id", "=="); 608 pxAddLabelSearchArgs (config, where, "-label", "vpRun.label", "LIKE"); 609 pxAddLabelSearchArgs (config, where, "-data_group", "vpRun.data_group", "LIKE"); 629 610 630 611 psString query = pxDataGet("vptool_processedcell.sql"); … … 636 617 if (psListLength(where->list)) { 637 618 psString whereClause = psDBGenerateWhereConditionSQL(where, NULL); 638 psStringAppend(&query, " WHERE %s %s", whereClause, where2 ? where2 : "");619 psStringAppend(&query, " WHERE %s", whereClause); 639 620 psFree(whereClause); 640 } else if (psMetadataLookupBool(NULL, config->args, "-all") || (faulted || where2)) {641 psStringAppend(&query, " WHERE chipRun.chip_id IS NOT NULL %s", where2 ? where2 : "");642 621 } else { 643 622 psFree(where); 644 psError(PXTOOLS_ERR_CONFIG, false, "search parameters (or -all)are required");623 psError(PXTOOLS_ERR_CONFIG, false, "search parameters are required"); 645 624 return false; 646 625 } 647 626 psFree(where); 648 627 649 if (faulted) {650 // list only faulted rows651 psStringAppend(&query, " %s", "AND chipProcessedImfile.fault != 0");652 } else if (!allfiles) {653 // don't list faulted rows654 psStringAppend(&query, " %s", "AND chipProcessedImfile.fault = 0");655 }656 657 if (pstamp_order) {658 // put runs in order of exposure id with newest chip Runs first659 // The postage stamp parser depends on this behavior660 psStringAppend(&query, "\nORDER by exp_id, chip_id DESC");661 }662 663 // treat limit == 0 as "no limit"664 628 if (limit) { 665 629 psString limitString = psDBGenerateLimitSQL(limit); … … 687 651 688 652 // negative simple so the default is true 689 if (!ippdbPrintMetadatas(stdout, output, " chipProcessedImfile", !simple)) {653 if (!ippdbPrintMetadatas(stdout, output, "vpProcessedCell", !simple)) { 690 654 psError(PS_ERR_UNKNOWN, false, "failed to print array"); 691 655 psFree(output); … … 696 660 697 661 return true; 698 #endif699 662 } 700 663
Note:
See TracChangeset
for help on using the changeset viewer.
