IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 7322


Ignore:
Timestamp:
Jun 2, 2006, 5:11:09 PM (20 years ago)
Author:
jhoblitt
Message:

implement -input

Location:
trunk/ippTools/src
Files:
2 edited

Legend:

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

    r7321 r7322  
    4040        case DETTOOL_MODE_RUNS:
    4141            if (!runsMode(config)) {
     42                goto FAIL;
     43            }
     44            break;
     45        case DETTOOL_MODE_INPUT:
     46            if (!inputMode(config)) {
    4247                goto FAIL;
    4348            }
     
    328333{
    329334    PS_ASSERT_PTR_NON_NULL(config, false);
     335
     336    // no options are required... use the default where statement
     337    psArray *inputExp = detInputExpSelectRowObjects(config->dbh, config->where,
     338            0);
     339    if (!inputExp) {
     340        psError(PS_ERR_UNKNOWN, false, "no rawDetrendExp rows found");
     341        return false;
     342    }
     343
     344    if (psArrayLength(inputExp)) {
     345        // print imfile list
     346        psMetadata *output = psMetadataAlloc();
     347        for (long i = 0; i < psArrayLength(inputExp); i++) {
     348            psMetadata *md = detInputExpMetadataFromObject(inputExp->data[i]);
     349            psMetadataAddMetadata(
     350            output, PS_LIST_TAIL, "detInputExp",  PS_META_DUPLICATE_OK, NULL,
     351                    md);
     352        }
     353
     354        psString str = psMetadataConfigFormat(output);
     355        psFree(output);
     356        fprintf(stdout, "%s\n", str);
     357        psFree(str);
     358    }
     359
     360    psFree(inputExp);
    330361
    331362    return true;
  • trunk/ippTools/src/dettoolConfig.c

    r7321 r7322  
    3737    psMetadataAddStr(inputArgs, PS_LIST_TAIL, "-det_id", 0,
    3838        "search for detrend ID", NULL);
     39    psMetadataAddStr(inputArgs, PS_LIST_TAIL, "-exp_id",  0,
     40        "search for exp ID", NULL);
    3941
    4042    // -raw
Note: See TracChangeset for help on using the changeset viewer.