IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 27, 2018, 3:31:55 PM (8 years ago)
Author:
eugene
Message:

merge changes from trunk

Location:
branches/czw_branch/20170908
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/czw_branch/20170908

  • branches/czw_branch/20170908/ippTools/src/dettool.c

    r34081 r40483  
    15131513    psList *exp_id_list = item->data.list;
    15141514    psMetadata *where = psMetadataAlloc();
     1515
     1516    // make sure that -exp_id was parsed correctly
     1517    if (item->type == PS_DATA_METADATA_MULTI) {
     1518        psListIterator *iter = psListIteratorAlloc(item->data.list, 0, false);
     1519        psMetadataItem *mItem = NULL;
     1520        while ((mItem = psListGetAndIncrement(iter))) {
     1521            psS64 exp_id = mItem->data.S64;
     1522            if (!psMetadataAddS64(where, PS_LIST_TAIL, "exp_id", PS_META_DUPLICATE_OK, "==", exp_id)) {
     1523                psError(PS_ERR_UNKNOWN, false, "failed to add item exp_id");
     1524                psFree(iter);
     1525                psFree(where);
     1526                return false;
     1527            }
     1528        }
     1529        psFree(iter);
     1530    }
     1531    if (item->type == PS_DATA_S64) {
     1532        psS64 exp_id = item->data.S64;
     1533        if (!psMetadataAddS64(where, PS_LIST_TAIL, "exp_id", PS_META_DUPLICATE_OK, "==", exp_id)) {
     1534            psError(PS_ERR_UNKNOWN, false, "failed to add item exp_id");
     1535            psFree(where);
     1536            return false;
     1537        }
     1538    }
     1539
     1540# if (0)
    15151541    // make sure that -exp_id was parsed correctly
    15161542    // XXX this can be removed someday
     
    15411567        psAbort("-exp_id was not parsed correctly (this should not happen");
    15421568    }
     1569# endif
    15431570
    15441571    // check that the specified exp_ids actually exist in the iteration zero
     
    15991626    psArray *newInputExps = psArrayAllocEmpty(psListLength(exp_id_list));
    16001627    while ((mItem = psListGetAndIncrement(iter))) {
    1601         detInputExpRow *inputExp = psHashLookup(valid_exp_ids,
    1602                 (char *)mItem->data.V);
    1603         if (!inputExp) {
     1628      psString exp_idStr = psDBIntToString(mItem->data.S64);
     1629      detInputExpRow *inputExp = psHashLookup(valid_exp_ids, exp_idStr);
     1630      if (!inputExp) {
    16041631            // rollback
    16051632            if (!psDBRollback(config->dbh)) {
     
    16071634            }
    16081635            // invalid exp_id
    1609             psError(PS_ERR_UNKNOWN, false, "exp_id %s is invalid for det_id %" PRId64,
    1610                     (char *)mItem->data.V, det_id);
     1636            psError(PS_ERR_UNKNOWN, false, "exp_id %" PRId64 " is invalid for det_id %" PRId64, mItem->data.S64, det_id);
    16111637            psFree(iter);
    16121638            psFree(valid_exp_ids);
     
    24522478        psMetadata *where = psMetadataAlloc();
    24532479        for (long i = 0; i < psArrayLength(inputExps); i++) {
     2480          XXX note that exp_id is not a STRING
    24542481            if (!psMetadataAddStr(where, PS_LIST_TAIL, "exp_id",
    24552482                    PS_META_DUPLICATE_OK, "==",
  • branches/czw_branch/20170908/ippTools/src/pxchip.c

    r35789 r40483  
    4343    psMetadataAddStr(md,  PS_LIST_TAIL, "-exp_tag",            0, "search by exp_tag", NULL);
    4444    psMetadataAddStr(md,  PS_LIST_TAIL, "-exp_type",           0, "search by exp_type", NULL);
     45    psMetadataAddStr(md,  PS_LIST_TAIL, "-data_state",         0, "search by data_state", NULL);
    4546    psMetadataAddStr(md,  PS_LIST_TAIL, "-filelevel",          0, "search by filelevel", NULL);
    4647    psMetadataAddStr(md,  PS_LIST_TAIL, "-filter",             0, "search for filter", NULL);
     
    7374    psMetadataAddStr(md,  PS_LIST_TAIL, "-object",             0, "search by exposure object (LIKE comparison)", NULL);
    7475    psMetadataAddStr(md,  PS_LIST_TAIL, "-comment",            0, "search by comment field (LIKE comparison)", NULL);
     76    psMetadataAddStr(md,  PS_LIST_TAIL, "-comment-skip",       0, "exclude by comment field (NOT LIKE comparison)", NULL);
    7577    psMetadataAddStr(md,  PS_LIST_TAIL, "-obs_mode",           0, "search by observation mode", NULL);
    7678    return true;
     
    9597    PXOPT_COPY_STR(config->args, where, "-exp_tag", "rawExp.exp_tag", "==");
    9698    PXOPT_COPY_STR(config->args, where, "-exp_type", "rawExp.exp_type", "==");
     99    PXOPT_COPY_STR(config->args, where, "-data_state", "rawExp.state", "==");
    97100    PXOPT_COPY_STR(config->args, where, "-filelevel", "rawExp.filelevel", "==");
    98101    PXOPT_COPY_STR(config->args, where, "-filter", "rawExp.filter", "LIKE");
     
    125128    PXOPT_COPY_F32(config->args, where, "-sun_angle_max", "rawExp.sun_angle", "<");
    126129    PXOPT_COPY_STR(config->args, where, "-comment", "rawExp.comment", "LIKE");
     130    PXOPT_COPY_STR(config->args, where, "-comment-skip", "rawExp.comment", "NOTLKE");
    127131    PXOPT_COPY_STR(config->args, where, "-obs_mode", "rawExp.obs_mode", "LIKE");
    128132    return true;
Note: See TracChangeset for help on using the changeset viewer.