IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 7302


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

make -addprocessed options -det_id, -exp_id, -class_id, -uri, -stats, & -recipe required

Location:
trunk/ippTools/src
Files:
2 edited

Legend:

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

    r7299 r7302  
    431431        return false;
    432432    }
     433    if (!det_id) {
     434        psError(PS_ERR_UNKNOWN, true, "-det_id is required");
     435        return false;
     436    }
    433437    psString exp_id = psMetadataLookupStr(&status, config->args, "-exp_id");
    434438    if (!status) {
     
    436440        return false;
    437441    }
     442    if (!exp_id) {
     443        psError(PS_ERR_UNKNOWN, true, "-exp_id is required");
     444        return false;
     445    }
    438446    psString class_id = psMetadataLookupStr(&status, config->args, "-class_id");
    439447    if (!status) {
     
    441449        return false;
    442450    }
     451    if (!class_id) {
     452        psError(PS_ERR_UNKNOWN, true, "-class_id is required");
     453        return false;
     454    }
    443455    psString uri    = psMetadataLookupStr(&status, config->args, "-uri");
    444456    if (!status) {
     
    446458        return false;
    447459    }
     460    if (!uri) {
     461        psError(PS_ERR_UNKNOWN, true, "-uri is required");
     462        return false;
     463    }
     464    psString stats = psMetadataLookupStr(&status, config->args, "-stats");
     465    if (!status) {
     466        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -stats");
     467        return false;
     468    }
     469    if (!stats) {
     470        psError(PS_ERR_UNKNOWN, true, "-stats is required");
     471        return false;
     472    }
    448473    psString recipe = psMetadataLookupStr(&status, config->args, "-recipe");
    449474    if (!status) {
    450475        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -recipe");
     476        return false;
     477    }
     478    if (!recipe) {
     479        psError(PS_ERR_UNKNOWN, true, "-recipe is required");
    451480        return false;
    452481    }
     
    473502
    474503    // create a new detProcessedImfile object
    475     psString stats = ((rawImfileRow *)rawImfiles->data[0])->stats;
    476504    detProcessedImfileRow *detRow = detProcessedImfileRowAlloc(
    477505        (psS32)atol(det_id), exp_id, class_id, uri, stats, recipe
  • trunk/ippTools/src/dettoolConfig.c

    r7299 r7302  
    4747    psMetadata *addprocArgs = psMetadataAlloc();
    4848    psMetadataAddStr(addprocArgs, PS_LIST_TAIL, "-det_id",  0,
    49         "define detrend ID", NULL);
     49        "define detrend ID (required)", NULL);
    5050    psMetadataAddStr(addprocArgs, PS_LIST_TAIL, "-exp_id",  0,
    51         "define exp ID", NULL);
     51        "define exp ID (required)", NULL);
    5252    psMetadataAddStr(addprocArgs, PS_LIST_TAIL, "-class_id",  0,
    53         "define class ID", NULL);
     53        "define class ID (required)", NULL);
     54    psMetadataAddStr(addprocArgs, PS_LIST_TAIL, "-uri",  0,
     55        "define URI (required)", NULL);
     56    psMetadataAddStr(addprocArgs, PS_LIST_TAIL, "-stats",  0,
     57        "define stat (required)", NULL);
     58    psMetadataAddStr(addprocArgs, PS_LIST_TAIL, "-recipe",  0,
     59        "define recipe (required)", NULL);
    5460    psMetadataAddStr(addprocArgs, PS_LIST_TAIL, "-iter",  0,
    5561        "define iteration number", NULL);
    56     psMetadataAddStr(addprocArgs, PS_LIST_TAIL, "-uri",  0,
    57         "define URI", NULL);
    58     psMetadataAddStr(addprocArgs, PS_LIST_TAIL, "-stats",  0,
    59         "define stat", NULL);
    60     psMetadataAddStr(addprocArgs, PS_LIST_TAIL, "-recipe",  0,
    61         "define recipe", NULL);
    6262
    6363    // -processed
Note: See TracChangeset for help on using the changeset viewer.