IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 7304


Ignore:
Timestamp:
Jun 2, 2006, 11:58:39 AM (20 years ago)
Author:
jhoblitt
Message:

make -addstacked options -det_id, -class_id, -uri, -stats, & -recipe required

Location:
trunk/ippTools/src
Files:
2 edited

Legend:

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

    r7302 r7304  
    749749        return false;
    750750    }
     751    if (!det_id) {
     752        psError(PS_ERR_UNKNOWN, true, "-det_id is required");
     753        return false;
     754    }
    751755    psString class_id = psMetadataLookupStr(&status, config->args, "-class_id");
    752756    if (!status) {
     
    754758        return false;
    755759    }
     760    if (!class_id) {
     761        psError(PS_ERR_UNKNOWN, true, "-class_id is required");
     762        return false;
     763    }
    756764    psString uri    = psMetadataLookupStr(&status, config->args, "-uri");
    757765    if (!status) {
     
    759767        return false;
    760768    }
     769    if (!uri) {
     770        psError(PS_ERR_UNKNOWN, true, "-uri is required");
     771        return false;
     772    }
     773    psString stats = psMetadataLookupStr(&status, config->args, "-stats");
     774    if (!status) {
     775        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -stats");
     776        return false;
     777    }
     778    if (!stats) {
     779        psError(PS_ERR_UNKNOWN, true, "-stats is required");
     780        return false;
     781    }
    761782    psString recipe = psMetadataLookupStr(&status, config->args, "-recipe");
    762783    if (!status) {
     
    764785        return false;
    765786    }
    766     psString stats = psMetadataLookupStr(&status, config->args, "-stats");
    767     if (!status) {
    768         psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -stats");
     787    if (!recipe) {
     788        psError(PS_ERR_UNKNOWN, true, "-recipe is required");
    769789        return false;
    770790    }
     
    879899    PS_ASSERT_PTR_NON_NULL(config, false);
    880900
     901    // XXX det_id is requried as a simplification
     902    bool status = false;
     903    psString det_id = psMetadataLookupStr(&status, config->args, "-det_id");
     904    if (!status) {
     905        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -det_id");
     906        return false;
     907    }
     908    if (!det_id) {
     909        psError(PS_ERR_UNKNOWN, true, "-det_id is required");
     910        return false;
     911    }
     912
    881913    // find all detStackedImfile for det_id
    882     // XXX det_id is requried as a simplification
    883914    psArray *stackedImfiles =
    884915        detStackedImfileSelectRowObjects(config->dbh, config->where, 0);
     
    889920
    890921    // find all class_ids for the det_id's associated detInputExps
    891     // find detInputExps in det_id
    892     bool status = false;
    893     psString det_id = psMetadataLookupStr(&status, config->args, "-det_id");
    894     if (!status) {
    895         psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -det_id");
    896         psFree(stackedImfiles);
    897         return false;
    898     }
    899 
    900922    psArray *valid_class_ids = validDetInputClassIds(config, det_id);
    901923    if (!valid_class_ids) {
  • trunk/ippTools/src/dettoolConfig.c

    r7303 r7304  
    8181    psMetadata *addstacArgs = psMetadataAlloc();
    8282    psMetadataAddStr(addstacArgs, PS_LIST_TAIL, "-det_id",  0,
    83         "define detrend ID", NULL);
     83        "define detrend ID (required)", NULL);
    8484    psMetadataAddStr(addstacArgs, PS_LIST_TAIL, "-iter",  0,
    8585        "define iteration number", NULL);
    8686    psMetadataAddStr(addstacArgs, PS_LIST_TAIL, "-class_id",  0,
    87         "define class ID", NULL);
     87        "define class ID (required)", NULL);
    8888    psMetadataAddStr(addstacArgs, PS_LIST_TAIL, "-uri",  0,
    89         "define URI", NULL);
     89        "define URI (required)", NULL);
    9090    psMetadataAddStr(addstacArgs, PS_LIST_TAIL, "-stats",  0,
    91         "define stat", NULL);
     91        "define stat (required)", NULL);
    9292    psMetadataAddStr(addstacArgs, PS_LIST_TAIL, "-recipe",  0,
    93         "define recipe", NULL);
     93        "define recipe (required)", NULL);
    9494   
    9595    // -stacked
     
    109109    psMetadata *stacframeArgs = psMetadataAlloc();
    110110    psMetadataAddStr(stacframeArgs, PS_LIST_TAIL, "-det_id",  0,
    111         "search for detrend ID", NULL);
     111        "search for detrend ID (required)", NULL);
    112112    psMetadataAddStr(stacframeArgs, PS_LIST_TAIL, "-iter",  0,
    113113        "search for iteration number", NULL);
Note: See TracChangeset for help on using the changeset viewer.