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

    r23697 r23809  
    134134    PXOPT_LOOKUP_STR(label, config->args, "-label", false, false);
    135135    PXOPT_LOOKUP_STR(dvodb, config->args, "-dvodb", false, false);
    136     PXOPT_LOOKUP_STR(tess_id, config->args, "-tess_id", false, false);
     136    PXOPT_LOOKUP_STR(tess_id, config->args, "-tess_id", true, false); // required (no default TESS)
    137137    PXOPT_LOOKUP_STR(end_stage, config->args, "-end_stage", false, false);
    138138    PXOPT_LOOKUP_TIME(registered, config->args, "-registered", false, false);
     
    295295    // old values in place (i.e., passing the values through).
    296296
     297    // loop over our list of fakeRun rows to check the supplied and selected tess_id values:
     298    for (long i = 0; i < psArrayLength(output); i++) {
     299        psMetadata *md = output->data[i];
     300
     301        fakeRunRow *row = fakeRunObjectFromMetadata(md);
     302        if (!row) {
     303            psError(PS_ERR_UNKNOWN, false, "failed to convert metadata into fakeRun");
     304            psFree(output);
     305            return false;
     306        }
     307
     308        if (!tess_id  && !row->tess_id) {
     309            psError(PS_ERR_UNKNOWN, false, "cannot queue warp run without a defined tess id: label: %s, fake_id %" PRId64, row->label, row->fake_id);
     310            psFree(output);
     311            return false;
     312        }
     313
     314        psFree(row);
     315    }
     316    psFree(output);
     317
    297318    // loop over our list of fakeRun rows
    298319    for (long i = 0; i < psArrayLength(output); i++) {
Note: See TracChangeset for help on using the changeset viewer.