IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 6, 2011, 11:00:22 AM (15 years ago)
Author:
eugene
Message:

merge changes from trunk

Location:
branches/eam_branches/ipp-20110710/ippTools/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20110710/ippTools/src

  • branches/eam_branches/ipp-20110710/ippTools/src/warptool.c

    r31719 r32337  
    975975    psFree(where);
    976976
     977    psArray *allOutput = psArrayAllocEmpty(0);
    977978    // Now loop over the labels and query each individually
    978979    for (long i = 0; i < psArrayLength(labelOutput); i++) {
     
    10231024        long outputLength = psArrayLength(output);
    10241025        if (outputLength) {
    1025             // negative simple so the default is true
    1026             if (!ippdbPrintMetadatas(stdout, output, "warpPendingSkyCell", !simple)) {
    1027                 psError(PS_ERR_UNKNOWN, false, "failed to print array");
    1028                 psFree(output);
    1029                 return false;
     1026            for (int i = 0; i< outputLength; i++) {
     1027                psPtr ptr = output->data[i];
     1028                allOutput = psArrayAdd(allOutput, outputLength - i + 10, ptr);
     1029                if (!allOutput) {
     1030                    psError(PS_ERR_UNKNOWN, false, "failed to add element to array");
     1031                    return false;
     1032                }
    10301033            }
    10311034        } else {
     
    10441047        }
    10451048    }
     1049    long allLabelsLength = psArrayLength(allOutput);
     1050    if (allLabelsLength) {
     1051        if (!ippdbPrintMetadatas(stdout, allOutput, "warpPendingSkyCell", !simple)) {
     1052            psError(PS_ERR_UNKNOWN, false, "failed to print array");
     1053            psFree(allOutput);
     1054            return false;
     1055        }
     1056    }
     1057    psFree(allOutput);
    10461058    psFree(labelOutput);
    10471059    psFree(whereStr);
     
    13821394    pxAddLabelSearchArgs (config, where, "-data_group",   "warpRun.data_group", "LIKE");
    13831395
     1396    PXOPT_LOOKUP_BOOL(pstamp_order, config->args, "-pstamp_order", false);
    13841397    PXOPT_LOOKUP_BOOL(all, config->args, "-all", false);
    13851398
     
    14231436    }
    14241437    psFree(where);
     1438
     1439    if (pstamp_order) {
     1440        // put runs in order of exposure id with newest warp Runs first
     1441        // The postage stamp parser depends on this behavior
     1442        psStringAppend(&query, "\nORDER by exp_id, warp_id DESC");
     1443    }
    14251444
    14261445    // treat limit == 0 as "no limit"
     
    24672486
    24682487    if (pstamp_order) {
    2469         // put runs in order of exposure id with newest chip Runs first
     2488        // put runs in order of exposure id with newest warp Runs first
    24702489        // The postage stamp parser depends on this behavior
    24712490        psStringAppend(&query, "\nORDER by exp_id, warp_id DESC");
    24722491    }
    2473 
    24742492
    24752493    // treat limit == 0 as "no limit"
Note: See TracChangeset for help on using the changeset viewer.