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/magictool.c

    r23389 r23532  
    535535
    536536    // default values
    537     PXOPT_LOOKUP_S16(code, config->args, "-code", false, false);
    538 
    539     if (code > 0) {
     537    PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false);
     538
     539    if (fault > 0) {
    540540        char *query = "UPDATE magicRun SET fault = %d, state = 'full' WHERE magic_id = %" PRId64;
    541         if (!p_psDBRunQueryF(config->dbh, query, code, magic_id)) {
     541        if (!p_psDBRunQueryF(config->dbh, query, fault, magic_id)) {
    542542            psError(PS_ERR_UNKNOWN, false,
    543543                    "failed to set fault for magic_id %" PRId64, magic_id);
     
    561561    psMetadata *where = psMetadataAlloc();
    562562    PXOPT_COPY_S64(config->args, where, "-magic_id", "magic_id", "==");
    563     PXOPT_COPY_S16(config->args, where, "-code", "fault", "==");
     563    PXOPT_COPY_S16(config->args, where, "-fault", "fault", "==");
    564564
    565565    psString query = psStringCopy("UPDATE magicRun SET fault = 0, state = 'run' WHERE fault != 0");
     
    908908
    909909    // default values
    910     PXOPT_LOOKUP_S16(code, config->args, "-code", false, false);
     910    PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false);
    911911
    912912    if (!magicNodeResultInsert(config->dbh,
     
    914914                               node,
    915915                               uri,
    916                                code
     916                               fault
    917917        )) {
    918918        psError(PS_ERR_UNKNOWN, false, "database error");
     
    930930    PXOPT_COPY_S64(config->args, where, "-magic_id", "magic_id", "==");
    931931    PXOPT_COPY_STR(config->args, where, "-node", "node", "==");
    932     PXOPT_COPY_S16(config->args, where, "-code", "fault", "==");
     932    PXOPT_COPY_S16(config->args, where, "-fault", "fault", "==");
    933933
    934934    psString query = psStringCopy("DELETE FROM magicNodeResult WHERE fault != 0");
     
    10241024
    10251025    // default values
    1026     PXOPT_LOOKUP_S16(code, config->args, "-code", false, false);
     1026    PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false);
    10271027
    10281028    if (!psDBTransaction(config->dbh)) {
     
    10351035                         uri,
    10361036                         streaks,
    1037                          code
     1037                         fault
    10381038        )) {
    10391039        psError(PS_ERR_UNKNOWN, false, "database error");
     
    10811081    psMetadata *where = psMetadataAlloc();
    10821082    PXOPT_COPY_S64(config->args, where, "-magic_id", "magic_id", "==");
    1083     PXOPT_COPY_S16(config->args, where, "-code", "fault", "==");
     1083    PXOPT_COPY_S16(config->args, where, "-fault", "fault", "==");
    10841084
    10851085    if (!psDBTransaction(config->dbh)) {
Note: See TracChangeset for help on using the changeset viewer.