IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 9, 2007, 10:29:40 AM (19 years ago)
Author:
jhoblitt
Message:

fix -todetrunsummary so that it masks out when an entry is added to the detRunSummary table

File:
1 edited

Legend:

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

    r14076 r14078  
    52725272     */
    52735273
    5274     // select detRun.det_id
    5275     // select detRun.iteration
    5276     // select detRun.det_type
    5277     // by:
    5278     // find the current iteration bassed on det_id
    5279     // find all exp_ids in the current det_id/iteration from detInputExp
    5280     // find all exp_ids in the current det_id/iteration from detResidExp
    5281     // compare the counts of exp_ids
    5282 
    5283     psString query = psStringCopy(
    5284         "SELECT DISTINCT\n"
    5285         "   det_id,\n"
    5286         "   iteration,\n"
    5287         "   det_type,\n"
    5288         "   mode,\n"
    5289         "   workdir,\n"
    5290         "   camera\n"
    5291         " FROM\n"
    5292         "   (SELECT DISTINCT\n"
    5293         "       detRun.det_id,\n"
    5294         "       detRun.iteration,\n"
    5295         "       detRun.det_type,\n"
    5296         "       detRun.mode,\n"
    5297         "       detRun.workdir,\n"
    5298         "       detInputExp.exp_id,\n"
    5299         "       rawExp.camera\n"
    5300         "   FROM detRun\n"
    5301         "   JOIN detInputExp\n"
    5302         "       USING(det_id, iteration)\n"
    5303         "   JOIN rawExp\n"
    5304         "       ON detInputExp.exp_id = rawExp.exp_id\n"
    5305         "   LEFT JOIN detResidExp\n"
    5306         "       ON detRun.det_id = detResidExp.det_id\n"
    5307         "       AND detRun.iteration = detResidExp.iteration\n"
    5308         "       AND detInputExp.exp_id = detResidExp.exp_id\n"
    5309         "   WHERE\n"
    5310         "       detRun.state = 'run'\n"
    5311         "   GROUP BY\n"
    5312         "       detRun.det_id,\n"
    5313         "       detRun.iteration\n"
    5314         "   HAVING\n"
    5315         "       COUNT(detResidExp.exp_id) = COUNT(detInputExp.exp_id)\n"
    5316         " ) AS Foo\n"
    5317         );
     5274    psString query = pxDataGet("dettool_todetrunsummary.sql");
     5275    if (!query) {
     5276        psError(PXTOOLS_ERR_DATA, false, "failed to retreive SQL statement");
     5277        return false;
     5278    }
    53185279
    53195280    // XXX does it make sense to accept any search params?
Note: See TracChangeset for help on using the changeset viewer.