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_normalizedstat.c

    r18643 r18991  
    7575
    7676    // required
    77     PXOPT_LOOKUP_STR(det_id, config->args, "-det_id", true, false);
     77    PXOPT_LOOKUP_S64(det_id, config->args, "-det_id", true, false);
    7878    PXOPT_LOOKUP_STR(class_id, config->args, "-class_id", true, false);
    7979
     
    8686
    8787    if (!detNormalizedStatImfileInsert(config->dbh,
    88         (psS64)atoll(det_id),
     88        det_id,
    8989        iteration,
    9090        class_id,
     
    105105
    106106    psMetadata *where = psMetadataAlloc();
    107     PXOPT_COPY_STR(config->args, where, "-det_id",    "det_id", "==");
     107    PXOPT_COPY_S64(config->args, where, "-det_id",    "det_id", "==");
    108108    PXOPT_COPY_S32(config->args, where, "-iteration", "iteration", "==");
    109109    PXOPT_COPY_STR(config->args, where, "-class_id",  "class_id", "==");
     
    176176
    177177    psMetadata *where = psMetadataAlloc();
    178     PXOPT_COPY_STR(config->args, where, "-det_id",    "det_id", "==");
     178    PXOPT_COPY_S64(config->args, where, "-det_id",    "det_id", "==");
    179179    PXOPT_COPY_S32(config->args, where, "-iteration", "iteration", "==");
    180180    PXOPT_COPY_STR(config->args, where, "-class_id",  "class_id", "==");
     
    209209}
    210210
     211bool updatenormalizedstatMode(pxConfig *config)
     212{
     213    PS_ASSERT_PTR_NON_NULL(config, NULL);
     214
     215    PXOPT_LOOKUP_S64(det_id, config->args, "-det_id", true, false);
     216    PXOPT_LOOKUP_S32(iteration, config->args, "-iteration", true, false);
     217    PXOPT_LOOKUP_STR(class_id, config->args, "-class_id",  true, false);
     218    PXOPT_LOOKUP_STR(data_state, config->args, "-data_state", true, false);
     219
     220    if (!setNormStatImfileDataState(config, det_id, iteration, class_id, data_state)) {
     221        return false;
     222    }
     223    return true;
     224}
     225
    211226bool pendingcleanup_normalizedstatMode(pxConfig *config)
    212227{
    213228    PS_ASSERT_PTR_NON_NULL(config, NULL);
    214229
    215     PXOPT_LOOKUP_S64(chip_id, config->args, "-chip_id", false, false);
    216230    PXOPT_LOOKUP_U64(limit, config->args, "-limit", false, false);
    217231    PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false);
    218232
    219233    psMetadata *where = psMetadataAlloc();
    220     if (chip_id) {
    221         PXOPT_COPY_S64(config->args, where, "-chip_id", "chip_id", "==");
    222     }
    223     PXOPT_COPY_STR(config->args, where, "-label", "label", "==");
     234    PXOPT_COPY_S64(config->args, where, "-det_id", "detNormalizedStatImfile.det_id", "==");
     235    PXOPT_COPY_S32(config->args, where, "-iteration", "detNormalizedStatImfile.iteration", "==");
     236    PXOPT_COPY_STR(config->args, where, "-class_id", "detNormalizedStatImfile.det_id", "==");
    224237
    225238    psString query = pxDataGet("dettool_pendingcleanup_normalizedstat.sql");
     
    262275
    263276    // negative simple so the default is true
    264     if (!ippdbPrintMetadatas(stdout, output, "detPendingCleanup_normalizedstat", !simple)) {
     277    if (!ippdbPrintMetadatas(stdout, output, "detCleanupNormStatImfile", !simple)) {
    265278        psError(PS_ERR_UNKNOWN, false, "failed to print array");
    266279        psFree(output);
Note: See TracChangeset for help on using the changeset viewer.