IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 23783


Ignore:
Timestamp:
Apr 9, 2009, 3:20:44 PM (17 years ago)
Author:
bills
Message:

fix problems in definebyquery for camera stage

Location:
trunk/ippTools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/share/disttool_definebyquery_camera.sql

    r23765 r23783  
    11SELECT
    2     'cam' as stage,
     2    'camera' as stage,
    33    camRun.cam_id as stage_id,
    44    rawExp.exp_name as run_tag,
     
    1616    AND rcInterest.state = 'enabled'
    1717    AND distRun.dist_id IS NULL      -- no existing distRun
    18     AND ((!distTarget.clean  AND camRun.state = 'full') OR (distTarget.clean AND camRun.state = 'cleaned'))
     18    AND ((camRun.state = 'full') OR (distTarget.clean AND camRun.state = 'cleaned'))
  • trunk/ippTools/src/disttool.c

    r23777 r23783  
    157157
    158158    psString query = NULL;
    159     psString runType = NULL;
     159    psString magicRunType = NULL;
    160160    psString runJoinStr = NULL;
    161161    if (!strcmp(stage, "raw")) {
    162         runType = "rawExp";
     162        magicRunType = "rawExp";
    163163        runJoinStr = "rawExp.exp_id";
    164164        query = pxDataGet("disttool_definebyquery_raw.sql");
     
    169169        }
    170170    } else if (!strcmp(stage, "chip")) {
    171         runType = "chipRun";
     171        magicRunType = "chipRun";
    172172        runJoinStr = "chipRun.chip_id";
    173173        query = pxDataGet("disttool_definebyquery_chip.sql");
     
    182182        }
    183183    } else if (!strcmp(stage, "camera")) {
    184         runType = "camRun";
     184        magicRunType = "chipRun";    // This is used below to set the magicked business
    185185        query = pxDataGet("disttool_definebyquery_camera.sql");
    186186        if (!query) {
     
    194194        }
    195195    } else if (!strcmp(stage, "fake")) {
    196         runType = "fakeRun";
     196        magicRunType = "fakeRun";
    197197        query = pxDataGet("disttool_definebyquery_fake.sql");
    198198        if (!query) {
     
    208208        no_magic = true;
    209209    } else if (!strcmp(stage, "warp")) {
    210         runType = "warpRun";
     210        magicRunType = "warpRun";
    211211        runJoinStr = "warpRun.warp_id";
    212212        query = pxDataGet("disttool_definebyquery_warp.sql");
     
    222222
    223223    } else if (!strcmp(stage, "diff")) {
    224         runType = "diffRun";
     224        magicRunType = "diffRun";
    225225        runJoinStr = "diffRun.diff_id";
    226226        query = pxDataGet("disttool_definebyquery_diff.sql");
     
    236236
    237237    } else if (!strcmp(stage, "stack")) {
    238         runType = "stackRun";
     238        magicRunType = "stackRun";
    239239        query = pxDataGet("disttool_definebyquery_stack.sql");
    240240        if (!query) {
     
    265265
    266266    if (!no_magic) {
    267         psStringAppend(&query, " AND (distTarget.clean OR %s.magicked)", runType);
     267        psStringAppend(&query, " AND (distTarget.clean OR %s.magicked)", magicRunType);
    268268
    269269        // is selecting by magic_ds_id really interesting?
Note: See TracChangeset for help on using the changeset viewer.