IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 2, 2009, 2:51:37 PM (17 years ago)
Author:
Paul Price
Message:

Merging in branches/pap/ from r23685. Some conflicts, most notably in ippTools, but these resolved fairly simply. Only question mark is on regtool reversion, but I think I got it right. Everything builds fine.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/ippTools/src/regtool.c

    r23544 r23688  
    238238    PXOPT_LOOKUP_TIME(dateobs, config->args, "-dateobs", false, false);
    239239    PXOPT_LOOKUP_STR(hostname, config->args, "-hostname", false, false);
    240     PXOPT_LOOKUP_S16(code, config->args, "-code", false, false);
     240
     241    PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false);
     242    PXOPT_LOOKUP_S16(quality, config->args, "-quality", false, false);
    241243
    242244    if (!rawImfileInsert(
     
    302304        ignored,
    303305        hostname,
    304         code,
     306        fault,
     307        quality,
    305308        NULL,
    306309        0
     
    408411    PXOPT_COPY_STR(config->args, where,  "-tmp_class_id", "tmp_class_id", "==");
    409412    PXOPT_COPY_STR(config->args, where,  "-class_id",     "class_id", "==");
    410     PXOPT_COPY_S16(config->args, where,  "-code",         "fault", "==");
     413    PXOPT_COPY_S16(config->args, where,  "-fault",         "fault", "==");
    411414    PXOPT_COPY_S64(config->args, where,  "-exp_id_begin", "exp_id", ">=");
    412415    PXOPT_COPY_S64(config->args, where,  "-exp_id_end", "exp_id", "<=");
     
    452455    PXOPT_LOOKUP_STR(class_id, config->args, "-class_id", true, false);
    453456
    454     PXOPT_LOOKUP_S16(code, config->args, "-code", false, false);
     457    PXOPT_LOOKUP_S16(fault, config->args, "-fault", true, false);
    455458    PXOPT_LOOKUP_F64(user_1, config->args, "-user_1", false, false);
    456459
    457     if ((code == INT16_MAX) && !isfinite(user_1)) {
    458         psError(PS_ERR_UNKNOWN, false, "one of -code or -user_1 must be selected");
    459         return false;
    460     }
    461     if ((code != INT16_MAX) && isfinite(user_1)) {
    462         psError(PS_ERR_UNKNOWN, false, "only one of -code or -user_1 must be selected");
     460    if ((fault == INT16_MAX) && !isfinite(user_1)) {
     461        psError(PS_ERR_UNKNOWN, false, "one of -fault or -user_1 must be selected");
     462        return false;
     463    }
     464    if ((fault != INT16_MAX) && isfinite(user_1)) {
     465        psError(PS_ERR_UNKNOWN, false, "only one of -fault or -user_1 must be selected");
    463466        return false;
    464467    }
     
    468471    PXOPT_COPY_STR(config->args, where,  "-class_id",     "class_id", "==");
    469472
    470     if (code != INT16_MAX) {
     473    if (fault != INT16_MAX) {
    471474        // this is fairly dangerous : can set all if the where is not set...
    472         if (!pxSetFaultCode(config->dbh, "rawImfile", where, code)) {
     475        if (!pxSetFaultCode(config->dbh, "rawImfile", where, fault)) {
    473476            psError(PS_ERR_UNKNOWN, false, "failed to set set fault flag");
    474477            psFree (where);
     
    644647
    645648    // default
    646     PXOPT_LOOKUP_S16(code, config->args, "-code", false, false);
     649    PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false);
    647650
    648651    psString query = pxDataGet("regtool_pendingexp.sql");
     
    801804        moon_phase,
    802805        hostname,
    803         code,
     806        fault,
    804807        NULL,
    805808        0
     
    995998    psMetadata *where = psMetadataAlloc();
    996999    PXOPT_COPY_S64(config->args, where,  "-exp_id",       "exp_id", "==");
    997     PXOPT_COPY_S16(config->args, where,  "-code",         "fault", "==");
     1000    PXOPT_COPY_S16(config->args, where,  "-fault",         "fault", "==");
    9981001    PXOPT_COPY_S64(config->args, where,  "-exp_id_begin", "exp_id", ">=");
    9991002    PXOPT_COPY_S64(config->args, where,  "-exp_id_end", "exp_id", "<=");
     
    10391042    PXOPT_COPY_S64(config->args, where,  "-exp_id",       "exp_id", "==");
    10401043
    1041     PXOPT_LOOKUP_S16(code, config->args, "-code", true, false);
    1042 
    1043     if (!pxSetFaultCode(config->dbh, "rawExp", where, code)) {
     1044    PXOPT_LOOKUP_S16(fault, config->args, "-fault", true, false);
     1045
     1046    if (!pxSetFaultCode(config->dbh, "rawExp", where, fault)) {
    10441047        psError(PS_ERR_UNKNOWN, false, "failed to set set fault flag");
    10451048        psFree(where);
     
    11611164    char sqlFilename[80];
    11621165  } ExportTable;
    1163  
     1166
    11641167  int numExportTables = 2;
    11651168
     
    12411244
    12421245  PS_ASSERT_PTR_NON_NULL(config, NULL);
    1243  
     1246
    12441247  PXOPT_LOOKUP_STR(infile, config->args, "-infile", true,  false);
    12451248
     
    12521255  psAssert (item, "entry not in input?");
    12531256  psAssert (item->type == PS_DATA_METADATA_MULTI, "entry not multi?");
    1254  
     1257
    12551258  psMetadataItem *entry = psListGet (item->data.list, 0);
    12561259  assert (entry);
Note: See TracChangeset for help on using the changeset viewer.