IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 14, 2009, 11:06:18 AM (17 years ago)
Author:
bills
Message:

Add data_group, dist_group, and note to the pipeline. These new columns will be used
for some of the tasks that label was used previously.

File:
1 edited

Legend:

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

    r25816 r25835  
    111111    PXOPT_LOOKUP_STR(dvodb,       config->args, "-set_dvodb", false, false);
    112112    PXOPT_LOOKUP_STR(label,       config->args, "-set_label", false, false);
     113    PXOPT_LOOKUP_STR(data_group,  config->args, "-set_data_group", false, false);
    113114    PXOPT_LOOKUP_STR(reduction,   config->args, "-set_reduction", false, false);
     115    PXOPT_LOOKUP_STR(note,        config->args, "-set_note", false, false);
    114116    PXOPT_LOOKUP_BOOL(image_only, config->args, "-image_only", false);
    115117    PXOPT_LOOKUP_BOOL(pretend,    config->args, "-pretend", false);
     
    216218                               reduction   ? reduction : row->reduction,
    217219                               label       ? label     : row->label,
     220                               data_group  ? data_group : (label ? label : row->label),
    218221                               dvodb       ? dvodb     : row->dvodb,
     222                               note        ? note      : NULL,
    219223                               image_only
    220224        )) {
     
    253257    PXOPT_COPY_STR(config->args, where, "-reduction", "addRun.reduction", "==");
    254258
    255     if (!psListLength(where->list)
    256         && !psMetadataLookupBool(NULL, config->args, "-all")) {
     259    if (!psListLength(where->list)) {
    257260        psFree(where);
    258261        psError(PXTOOLS_ERR_DATA, false, "search parameters are required");
     
    260263    }
    261264
     265    psString query = psStringCopy("UPDATE addRun JOIN camRun USING(cam_id) JOIN chipRun USING(chip_id) JOIN rawExp USING(exp_id)");
     266
     267    // pxUpdateRun gets parameters from config->args and runs the update query
     268    bool result = pxUpdateRun(config, where, &query, false);
     269
     270    psFree(query);
     271    psFree(where);
     272
     273    return result;
     274
     275
     276#ifdef notdef
    262277    PXOPT_LOOKUP_STR(state, config->args, "-set_state", false, false);
    263278    PXOPT_LOOKUP_STR(label, config->args, "-set_label", false, false);
     
    288303
    289304    return true;
     305#endif
    290306}
    291307
Note: See TracChangeset for help on using the changeset viewer.