IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 15, 2009, 9:33:58 AM (17 years ago)
Author:
bills
Message:

add -clean argument to the exportrun modes. If set switch
state and data state from 'full' to 'cleaned'.
If no rows are found in -exportrun return error status for
the command

File:
1 edited

Legend:

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

    r23870 r23873  
    13081308  PS_ASSERT_PTR_NON_NULL(config, NULL);
    13091309
    1310   PXOPT_LOOKUP_S64(det_id, config->args, "-chip_id", true,  false);
     1310  PXOPT_LOOKUP_S64(dummy, config->args, "-chip_id", true,  false);
    13111311  PXOPT_LOOKUP_STR(outfile, config->args, "-outfile", true,  false);
    13121312  PXOPT_LOOKUP_U64(limit,   config->args, "-limit",   false, false);
     1313  PXOPT_LOOKUP_BOOL(clean, config->args, "-clean", false);
     1314
    13131315
    13141316  FILE *f = fopen (outfile, "w");
     
    13611363    }
    13621364    if (!psArrayLength(output)) {
    1363       psTrace("regtool", PS_LOG_INFO, "no rows found");
     1365      psTrace("chiptool", PS_LOG_INFO, "no rows found");
    13641366      psFree(output);
    1365       return true;
     1367      return false;
     1368    }
     1369
     1370    if (clean) {
     1371        bool success = true;
     1372        if (!strcmp(tables[i].tableName, "chipRun")) {
     1373            success = pxSetStateCleaned("chipRun", "state", output);
     1374        } else if (!strcmp(tables[i].tableName, "chipProcessedImfile")) {
     1375            success = pxSetStateCleaned("chipProcessedImfile", "data_state", output);
     1376        }
     1377        if (!success) {
     1378            psFree(output);
     1379            psError(PS_ERR_UNKNOWN, false, "pxSetStateClean failed for table %s",  tables[i].tableName);
     1380            return false;
     1381        }
    13661382    }
    13671383
     
    14291445    return true;
    14301446}
    1431 
    1432 
Note: See TracChangeset for help on using the changeset viewer.