IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 9176


Ignore:
Timestamp:
Oct 3, 2006, 4:59:58 PM (20 years ago)
Author:
jhoblitt
Message:

check detRun.set to be 'run'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/src/dettool.c

    r9160 r9176  
    804804            " JOIN detInputExp USING(exp_tag) "
    805805            " JOIN detRun ON detInputExp.det_id = detRun.position"
     806            " WHERE detRun.state = 'run'"
    806807        );
    807808
    808809    if (config->where) {
    809         psString whereClause = psDBGenerateWhereSQL(config->where, "rawImfile");
    810         psStringAppend(&query, " %s", whereClause);
     810        psString whereClause = psDBGenerateWhereConditionSQL(config->where, "rawImfile");
     811        psStringAppend(&query, " AND %s", whereClause);
    811812        psFree(whereClause);
    812813    }
     
    876877                " AND rawImfile.class_id = detProcessedImfile.class_id"
    877878            " WHERE"
    878             " detInputExp.det_id IS NOT NULL"
     879            " detRun.state = 'run'"
     880            " AND detInputExp.det_id IS NOT NULL"
    879881            " AND detInputExp.exp_tag IS NOT NULL"
    880882            " AND detProcessedImfile.det_id IS NULL"
     
    11531155        "    AND detProcessedImfile.class_id = rawImfile.class_id"
    11541156        " WHERE"
    1155         "    detProcessedExp.det_id IS NULL"
    1156         "    AND detProcessedExp.exp_tag IS NULL"
    1157         "    AND detInputExp.include = 1"
     1157        "   detRun.state = 'run'"
     1158        "   AND  detProcessedExp.det_id IS NULL"
     1159        "   AND detProcessedExp.exp_tag IS NULL"
     1160        "   AND detInputExp.include = 1"
    11581161        " GROUP BY"
    11591162        "    detProcessedImfile.class_id,"
     
    13051308        "    AND detProcessedImfile.class_id = rawImfile.class_id"
    13061309        " WHERE"
    1307         "    detProcessedExp.det_id IS NULL"
    1308         "    AND detProcessedExp.exp_tag IS NULL"
    1309         "    AND detInputExp.include = 1"
    1310         "    AND detRun.position = %s"
    1311         "    AND detProcessedImfile.exp_tag = '%s'"
     1310        "   detRun.state = 'run'"
     1311        "   AND detProcessedExp.det_id IS NULL"
     1312        "   AND detProcessedExp.exp_tag IS NULL"
     1313        "   AND detInputExp.include = 1"
     1314        "   AND detRun.position = %s"
     1315        "   AND detProcessedImfile.exp_tag = '%s'"
    13121316        " GROUP BY"
    13131317        "    detProcessedImfile.class_id,"
     
    14511455        "    AND detProcessedImfile.class_id = detStackedImfile.class_id"
    14521456        " WHERE"
    1453         "    detStackedImfile.det_id IS NULL"
    1454         "    AND detStackedImfile.iteration IS NULL"
    1455         "    AND detStackedImfile.class_id IS NULL"
    1456         "    AND detInputExp.include = 1"
     1457        "   detRun.state = 'run'"
     1458        "   AND detStackedImfile.det_id IS NULL"
     1459        "   AND detStackedImfile.iteration IS NULL"
     1460        "   AND detStackedImfile.class_id IS NULL"
     1461        "   AND detInputExp.include = 1"
    14571462        " GROUP BY"
    14581463        "    rawImfile.class_id"
     
    15171522        " JOIN detRun"
    15181523        "   ON detProcessedImfile.det_id = detRun.position"
     1524        " WHERE"
     1525        "   detRun.state = 'run'"
    15191526    );
    15201527
    15211528    if (config->where) {
    1522         psString whereClause = psDBGenerateWhereSQL(config->where, NULL);
    1523         psStringAppend(&query, " %s", whereClause);
     1529        psString whereClause = psDBGenerateWhereConditionSQL(config->where, NULL);
     1530        psStringAppend(&query, " AND %s", whereClause);
    15241531        psFree(whereClause);
    15251532    }
     
    21342141        "     ON detInputExp.det_id = detStackedImfile.det_id"
    21352142        "     AND detInputExp.iteration = detStackedImfile.iteration"
     2143        " WHERE"
     2144        "   detRun.state = 'run'"
    21362145        " GROUP BY"
    21372146        "     rawDetrendExp.exp_tag"
     
    26092618        "    AND detInputExp.iteration = detNormalizedExp.iteration"
    26102619        " WHERE"
    2611         "    detNormalizedExp.det_id IS NULL"
    2612         "    AND detNormalizedExp.iteration IS NULL"
    2613         "    AND detInputExp.include = 1"
     2620        "   detRun.state = 'run'"
     2621        "   AND detNormalizedExp.det_id IS NULL"
     2622        "   AND detNormalizedExp.iteration IS NULL"
     2623        "   AND detInputExp.include = 1"
    26142624        " GROUP BY"
    26152625        "    detNormalizedImfile.iteration,"
     
    27632773        "    AND detInputExp.iteration = detNormalizedExp.iteration"
    27642774        " WHERE"
    2765         "    detNormalizedExp.det_id IS NULL"
    2766         "    AND detNormalizedExp.iteration IS NULL"
    2767         "    AND detInputExp.include = 1"
    2768         "    AND detRun.position = %s"
    2769         "    AND detNormalizedImfile.iteration = %d"
     2775        "   detRun.state = 'run'"
     2776        "   AND detNormalizedExp.det_id IS NULL"
     2777        "   AND detNormalizedExp.iteration IS NULL"
     2778        "   AND detInputExp.include = 1"
     2779        "   AND detRun.position = %s"
     2780        "   AND detNormalizedImfile.iteration = %d"
    27702781        " GROUP BY"
    27712782        "    detNormalizedImfile.iteration,"
     
    29332944        "   AND detProcessedImfile.class_id = detResidImfile.class_id"
    29342945        " WHERE"
    2935         "   detResidImfile.det_id IS NULL"
     2946        "   detRun.state = 'run'"
     2947        "   AND detResidImfile.det_id IS NULL"
    29362948        "   AND detResidImfile.iteration IS NULL"
    29372949        "   AND detResidImfile.exp_tag IS NULL"
     
    35173529        "       AND detInputExp.exp_tag = detResidExp.exp_tag"
    35183530        "   WHERE"
    3519         "       detResidExp.det_id IS NULL"
     3531        "       detRun.state = 'run'"
     3532        "       AND detResidExp.det_id IS NULL"
    35203533        "       AND detResidExp.iteration IS NULL"
    35213534        "       AND detResidExp.exp_tag IS NULL"
     
    36253638        "       AND detInputExp.exp_tag = detResidExp.exp_tag"
    36263639        "   WHERE"
    3627         "       detResidExp.det_id IS NULL"
     3640        "       detrun.state = 'run'"
     3641        "       AND detResidExp.det_id IS NULL"
    36283642        "       AND detResidExp.iteration IS NULL"
    36293643        "       AND detResidExp.exp_tag IS NULL"
     
    39293943        "       AND detRun.iteration = detResidExp.iteration"
    39303944        "       AND detInputExp.exp_tag = detResidExp.exp_tag"
     3945        "   WHERE"
     3946        "       detrun.state = 'run'"
    39313947        "   GROUP BY"
    39323948        "       detRun.position,"
     
    41854201        "       AND detRun.iteration = detResidExp.iteration"
    41864202        "       AND detInputExp.exp_tag = detResidExp.exp_tag"
     4203        "   WHERE"
     4204        "       detrun.state = 'run'"
    41874205        "   GROUP BY"
    41884206        "       detRun.position,"
     
    44234441        "   AND detInputExp.exp_tag = detResidExp.exp_tag"
    44244442        " WHERE"
    4425         "   detInputExp.exp_tag IS NOT NULL"
     4443        "   detRun.state = 'run'"
     4444        "   AND detInputExp.exp_tag IS NOT NULL"
    44264445        "   AND detResidExp.accept IS NOT NULL"
    44274446        " GROUP BY"
Note: See TracChangeset for help on using the changeset viewer.