IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 28, 2015, 8:24:37 PM (11 years ago)
Author:
eugene
Message:

merge changes from trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20150112/ippTools/src/difftool.c

    r36572 r38049  
    4242static bool definepoprunMode(pxConfig *config);
    4343static bool definewarpstackMode(pxConfig *config);
     44//static bool definewarpstackOldMethodMode(pxConfig *config);
    4445static bool definewarpwarpMode(pxConfig *config);
    4546static bool definestackstackMode(pxConfig *config);
     
    9596        MODECASE(DIFFTOOL_MODE_DEFINEPOPRUN,          definepoprunMode);
    9697        MODECASE(DIFFTOOL_MODE_DEFINEWARPSTACK,       definewarpstackMode);
     98        //      MODECASE(DIFFTOOL_MODE_DEFINEWARPSTACKOLDMETHOD,       definewarpstackOldMethodMode);
    9799        MODECASE(DIFFTOOL_MODE_DEFINEWARPWARP,        definewarpwarpMode);
    98100        MODECASE(DIFFTOOL_MODE_DEFINESTACKSTACK,      definestackstackMode);
     
    12331235
    12341236  PXOPT_COPY_S64(config->args, where, "-exp_id", "exp_id", "==");
    1235   PXOPT_COPY_STR(config->args, where, "-filter", "filter", "==");
     1237  PXOPT_COPY_STR(config->args, where, "-filter", "rawExp.filter", "==");
    12361238  PXOPT_COPY_STR(config->args, where, "-comment", "comment", "LIKE");
    12371239  PXOPT_COPY_S64(config->args, where, "-warp_id", "warpRun.warp_id", "==");
     
    12441246  PXOPT_COPY_STR(config->args, where, "-stack_data_group", "stackRun.data_group", "==");
    12451247
     1248  // Add position dependence here.
     1249  if (!pxspaceBoxAddWhere(config,where)) {
     1250    psError(psErrorCodeLast(), false, "pxSpaceBoxAddWhere failed");
     1251    return false;
     1252  }
     1253 
     1254  // PXOPT_LOOKUP_BOOL(available, config->args, "-available", false);
    12461255  PXOPT_LOOKUP_BOOL(bothways, config->args, "-bothways", false);
    12471256 
     
    12751284
    12761285  psString whereClause = psDBGenerateWhereConditionSQL(where,NULL);
     1286  psString diffWhereClause = psStringCopy("");
     1287  psString joinWhereClause = psStringCopy("");
    12771288 
    12781289  // Don't queue things that already have diffs.
    12791290  if (! (reRun || newTemplates) ) {
    1280     psStringAppend(&whereClause, "\nAND diff_id IS NULL\n");
     1291    psStringAppend(&joinWhereClause, "\nAND diff_id IS NULL\n");
    12811292  }
    12821293  // Append diff qualifiers, if we have them
    12831294  if (label) {
    1284     psStringAppend(&whereClause, "\nAND ((diffRun.label = '%s') OR (diffRun.label IS NULL))",label);
     1295    psStringAppend(&diffWhereClause, "\nAND ((diffRun.label = '%s') OR (diffRun.label IS NULL))",label);
    12851296  }
    12861297  if (data_group) {
    1287     psStringAppend(&whereClause, "\nAND ((diffRun.data_group = '%s') OR (diffRun.data_group IS NULL))",data_group);
     1298    psStringAppend(&diffWhereClause, "\nAND ((diffRun.data_group = '%s') OR (diffRun.data_group IS NULL))",data_group);
    12881299  }
    12891300  if (reduction) {
    1290     psStringAppend(&whereClause, "\nAND ((diffRun.reduction = '%s') OR (diffRun.reduction IS NULL))",reduction);
     1301    psStringAppend(&diffWhereClause, "\nAND ((diffRun.reduction = '%s') OR (diffRun.reduction IS NULL))",reduction);
    12911302  }
    12921303
     
    12961307
    12971308  // This is just a simple query, so we don't need to do a transaction
    1298   if (!p_psDBRunQueryF(config->dbh, query, whereClauseString)) {
     1309  if (!p_psDBRunQueryF(config->dbh, query, whereClauseString, diffWhereClause,joinWhereClause)) {
    12991310    psError(PS_ERR_UNKNOWN, false, "database error");
    13001311    psFree(query);
     
    13271338    return true;
    13281339  }
     1340 
    13291341  if (pretend) {
    13301342    // negative simple so the default is true
     
    15181530
    15191531#if (0)
    1520 static bool definewarpstackMode(pxConfig *config)
     1532static bool definewarpstackOldMethodMode(pxConfig *config)
    15211533{
    15221534    PS_ASSERT_PTR_NON_NULL(config, false);
     
    15301542    PXOPT_COPY_STR(config->args, expWhere, "-filter", "filter", "==");
    15311543    PXOPT_COPY_STR(config->args, expWhere, "-comment", "comment", "LIKE");
     1544   
    15321545    PXOPT_COPY_S64(config->args, warp1Where, "-warp_id", "warpRun.warp_id", "==");
    15331546    PXOPT_COPY_STR(config->args, warp1Where, "-warp_label", "warpRun.label", "==");
     
    17981811        }
    17991812
     1813        // CZW force available off.  If we're using this very-expensive mode, we need to get the one thing it does correctly.
     1814        available = false;;
    18001815        if (!available && (num != skycell_count)) {
    18011816            psTrace("difftool", PS_LOG_INFO, "%" PRId64 " skyfiles with stack found for warp_id %" PRId64
Note: See TracChangeset for help on using the changeset viewer.