IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 25, 2009, 12:48:19 PM (17 years ago)
Author:
Paul Price
Message:

Adding quality flag to raw, chip, cam, warp, stack, diff product tables. Renaming '-code' flag in the ippTools to '-fault' (clearer meaning, reduces confusion between fault code and quality code).

File:
1 edited

Legend:

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

    r23365 r23532  
    102102
    103103    // TODO: check that stage_id actually exists for stage
    104     // in magicdstool we queue off of a magic_id so the stage_id, exp_id, and cam_id get looked up 
     104    // in magicdstool we queue off of a magic_id so the stage_id, exp_id, and cam_id get looked up
    105105    // when the run is queued
    106106    // Should we also check here that the run is full or cleaned and that all of the images
     
    138138    PXOPT_LOOKUP_STR(state, config->args, "-set_state", false, false);
    139139    PXOPT_LOOKUP_STR(label, config->args, "-set_label", false, false);
    140     PXOPT_LOOKUP_S16(code, config->args, "-code", false, false);
    141 
    142     if ((!state) && (!label) && (!code)) {
    143         psError(PXTOOLS_ERR_DATA, false, "parameters (-code or -set_state or -set_label) are required");
     140    PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false);
     141
     142    if ((!state) && (!label) && (!fault)) {
     143        psError(PXTOOLS_ERR_DATA, false, "parameters (-fault or -set_state or -set_label) are required");
    144144        psFree(where);
    145145        return false;
     
    156156    }
    157157
    158     if (code) {
    159         psStringAppend(&query, " , fault = %d", code);
     158    if (fault) {
     159        psStringAppend(&query, " , fault = %d", fault);
    160160    }
    161161
     
    182182    PXOPT_COPY_STR(config->args, where, "-state", "state", "==");
    183183    PXOPT_COPY_STR(config->args, where, "-label", "label", "==");
    184     PXOPT_COPY_S16(config->args, where, "-code", "distComponent.fault", "==");
     184    PXOPT_COPY_S16(config->args, where, "-fault", "distComponent.fault", "==");
    185185
    186186    // It might be useful to be able to query by the parameters of the underlying runs
     
    368368    // unless fault code is set require filename, bytes, and md5sum
    369369    bool require_fileinfo = false;
    370     PXOPT_LOOKUP_S16(code, config->args, "-code", false, false);
    371     if (!code) {
     370    PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false);
     371    if (!fault) {
    372372        require_fileinfo = true;
    373373    }
     
    376376    PXOPT_LOOKUP_STR(name, config->args, "-name", require_fileinfo, false);
    377377
    378     if (!distComponentInsert(config->dbh, dist_id, component, bytes, md5sum, "full", name, code)) {
     378    if (!distComponentInsert(config->dbh, dist_id, component, bytes, md5sum, "full", name, fault)) {
    379379        psError(PS_ERR_UNKNOWN, false, "database error");
    380380        return false;
Note: See TracChangeset for help on using the changeset viewer.