IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 8, 2008, 5:08:29 PM (18 years ago)
Author:
eugene
Message:

adding cleanup operations to dettool

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branch_20080719/ippTools/src/dettool_stack.c

    r18643 r18991  
    7878
    7979    psMetadata *where = psMetadataAlloc();
    80     PXOPT_COPY_STR(config->args, where, "-det_id",    "det_id", "==");
     80    PXOPT_COPY_S64(config->args, where, "-det_id",    "det_id", "==");
    8181    PXOPT_COPY_S32(config->args, where, "-iteration", "iteration", "==");
    8282
     
    123123
    124124    // det_id, iteration, class_id, uri, & recipe are required
    125     PXOPT_LOOKUP_STR(det_id, config->args, "-det_id", true, false);
     125    PXOPT_LOOKUP_S64(det_id, config->args, "-det_id", true, false);
    126126    PXOPT_LOOKUP_S32(iteration, config->args, "-iteration", true, false);
    127127    PXOPT_LOOKUP_STR(class_id, config->args, "-class_id", true, false);
     
    175175    // create a new detStackedImfile object
    176176    detStackedImfileRow *stackedImfile = detStackedImfileRowAlloc(
    177             (psS64)atoll(det_id),
     177            det_id,
    178178            iteration,
    179179            class_id,
     
    208208
    209209    psMetadata *where = psMetadataAlloc();
    210     PXOPT_COPY_STR(config->args, where, "-det_id",    "det_id", "==");
     210    PXOPT_COPY_S64(config->args, where, "-det_id",    "det_id", "==");
    211211    PXOPT_COPY_S32(config->args, where, "-iteration", "iteration", "==");
    212212    PXOPT_COPY_STR(config->args, where, "-class_id",  "class_id", "==");
     
    282282
    283283    psMetadata *where = psMetadataAlloc();
    284     PXOPT_COPY_STR(config->args, where, "-det_id",    "det_id", "==");
     284    PXOPT_COPY_S64(config->args, where, "-det_id",    "det_id", "==");
    285285    PXOPT_COPY_S32(config->args, where, "-iteration", "iteration", "==");
    286286    PXOPT_COPY_STR(config->args, where, "-class_id",  "class_id", "==");
     
    315315}
    316316
     317bool updatestackedMode(pxConfig *config)
     318{
     319    PS_ASSERT_PTR_NON_NULL(config, NULL);
     320
     321    PXOPT_LOOKUP_S64(det_id, config->args, "-det_id", true, false);
     322    PXOPT_LOOKUP_S32(iteration, config->args, "-iteration", true, false);
     323    PXOPT_LOOKUP_STR(data_state, config->args, "-data_state", true, false);
     324
     325    if (!setStackedImfileDataState(config, det_id, iteration, data_state)) {
     326        return false;
     327    }
     328    return true;
     329}
     330
    317331bool pendingcleanup_stackedMode(pxConfig *config)
    318332{
    319333    PS_ASSERT_PTR_NON_NULL(config, NULL);
    320334
    321     PXOPT_LOOKUP_S64(chip_id, config->args, "-chip_id", false, false);
    322335    PXOPT_LOOKUP_U64(limit, config->args, "-limit", false, false);
    323336    PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false);
    324337
    325338    psMetadata *where = psMetadataAlloc();
    326     if (chip_id) {
    327         PXOPT_COPY_S64(config->args, where, "-chip_id", "chip_id", "==");
    328     }
    329     PXOPT_COPY_STR(config->args, where, "-label", "label", "==");
     339    PXOPT_COPY_S64(config->args, where, "-det_id", "detStackedImfile.det_id", "==");
     340    PXOPT_COPY_S32(config->args, where, "-iteration", "detStackedImfile.iteration", "==");
    330341
    331342    psString query = pxDataGet("dettool_pendingcleanup_stacked.sql");
     
    368379
    369380    // negative simple so the default is true
    370     if (!ippdbPrintMetadatas(stdout, output, "detPendingCleanup_stacked", !simple)) {
     381    if (!ippdbPrintMetadatas(stdout, output, "detCleanupStackedImfile", !simple)) {
    371382        psError(PS_ERR_UNKNOWN, false, "failed to print array");
    372383        psFree(output);
     
    379390}
    380391
    381 
     392// XXX SQL missing
    382393bool donecleanup_stackedMode(pxConfig *config)
    383394{
Note: See TracChangeset for help on using the changeset viewer.