IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 25, 2010, 10:45:22 AM (16 years ago)
Author:
Paul Price
Message:

Adding background restoration to disttool.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/pap/ippTools/src/disttool.c

    r28270 r28503  
    210210            psStringAppend(&query, " AND (chipRun.dist_group = '%s')", dist_group);
    211211        }
     212    } else if (!strcmp(stage, "chip_bg")) {
     213        magicRunType = "chipBackgroundRun";
     214        runJoinStr = "chipBackgroundRun.chip_bg_id";
     215        query = pxDataGet("disttool_definebyquery_chip_bg.sql");
     216        if (!query) {
     217            psError(PXTOOLS_ERR_SYS, false, "failed to retreive SQL statement");
     218            psFree(where);
     219            return false;
     220        }
     221
     222        if (label) {
     223            psStringAppend(&query, " AND (chipBackgroundRun.label = '%s')", label);
     224        }
     225        if (dist_group) {
     226            psStringAppend(&query, " AND (chipBackgroundRun.dist_group = '%s')", dist_group);
     227        }
    212228    } else if (!strcmp(stage, "camera")) {
    213229        magicRunType = "camRun";    // This is used below to set the magicked business
     
    258274        if (dist_group) {
    259275            psStringAppend(&query, " AND (warpRun.dist_group = '%s')", dist_group);
     276        }
     277
     278    } else if (!strcmp(stage, "warp_bg")) {
     279        magicRunType = "warpBackgroundRun";
     280        runJoinStr = "warpBackgroundRun.warp_bg_id";
     281        query = pxDataGet("disttool_definebyquery_warp_bg.sql");
     282        if (!query) {
     283            psError(PXTOOLS_ERR_SYS, false, "failed to retreive SQL statement");
     284            psFree(where);
     285            return false;
     286        }
     287
     288        if (label) {
     289            psStringAppend(&query, " AND (warpBackgroundRun.label = '%s')", label);
     290        }
     291        if (dist_group) {
     292            psStringAppend(&query, " AND (warpBackgroundRun.dist_group = '%s')", dist_group);
    260293        }
    261294
Note: See TracChangeset for help on using the changeset viewer.