IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 10, 2009, 2:58:30 PM (17 years ago)
Author:
eugene
Message:

if data is queue to be processed by warp (end_stage == warp or NULL), require a defined tess_id (either in the db or on the cmdline)

File:
1 edited

Legend:

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

    r23697 r23809  
    198198    }
    199199
     200    // if end_stage is warp (or NULL), check for valid tess_id
     201    for (long i = 0; i < psArrayLength(output); i++) {
     202        psMetadata *md = output->data[i];
     203
     204        bool status;
     205        char *end_stage = psMetadataLookupStr(&status, md, "end_stage");
     206        if (end_stage && strcasecmp(end_stage, "warp")) continue;
     207
     208        char *raw_tess_id   = psMetadataLookupStr(&status, md, "tess_id");
     209        if (raw_tess_id || tess_id) continue;
     210
     211        char *label  = psMetadataLookupStr(&status, md, "label");
     212        psS64 exp_id = psMetadataLookupS64(&status, md, "exp_id");
     213
     214        if (!status) {
     215            psError(PS_ERR_UNKNOWN, false, "cannot queue analysis to WARP without a defined tess id: label: %s, exp_id %" PRId64, label, exp_id);
     216            psFree(output);
     217            return false;
     218        }
     219    }
     220
    200221    // loop over our list of exp_ids
    201222    for (long i = 0; i < psArrayLength(output); i++) {
Note: See TracChangeset for help on using the changeset viewer.