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/faketool.c

    r23688 r23809  
    229229    }
    230230
     231    // if end_stage is warp (or NULL), check for valid tess_id
     232    for (long i = 0; i < psArrayLength(output); i++) {
     233        psMetadata *md = output->data[i];
     234
     235        bool status;
     236        char *end_stage = psMetadataLookupStr(&status, md, "end_stage");
     237        if (end_stage && strcasecmp(end_stage, "warp")) continue;
     238
     239        char *raw_tess_id   = psMetadataLookupStr(&status, md, "tess_id");
     240        if (raw_tess_id || tess_id) continue;
     241
     242        char *label  = psMetadataLookupStr(&status, md, "label");
     243        psS64 exp_id = psMetadataLookupS64(&status, md, "exp_id");
     244
     245        if (!status) {
     246            psError(PS_ERR_UNKNOWN, false, "cannot queue analysis to WARP without a defined tess id: label: %s, exp_id %" PRId64, label, exp_id);
     247            psFree(output);
     248            return false;
     249        }
     250    }
     251
    231252    // loop over our list of cam_ids
    232253    for (long i = 0; i < psArrayLength(output); i++) {
Note: See TracChangeset for help on using the changeset viewer.