Changeset 25870 for branches/eam_branches/20090820/ippTools/src/regtool.c
- Timestamp:
- Oct 18, 2009, 10:23:28 AM (17 years ago)
- Location:
- branches/eam_branches/20090820
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
ippTools/src/regtool.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/20090820
-
branches/eam_branches/20090820/ippTools/src/regtool.c
r25766 r25870 334 334 PXOPT_COPY_TIME(config->args, where, "-dateobs_end", "dateobs", "<="); 335 335 PXOPT_COPY_STR(config->args, where, "-filter", "filter", "=="); 336 PXOPT_COPY_STR(config->args, where, "-exp_type", "exp_type", "=="); 337 PXOPT_COPY_STR(config->args, where, "-obs_mode", "obs_mode", "=="); 336 338 PXOPT_COPY_S64(config->args, where, "-magicked", "magicked", "=="); 337 338 PXOPT_LOOKUP_S64(magicked, config->args, "-magicked", false, false);339 PXOPT_LOOKUP_BOOL(destreaked, config->args, "-destreaked", false);340 PXOPT_LOOKUP_BOOL(not_destreaked, config->args, "-not_destreaked", false);341 339 342 340 PXOPT_LOOKUP_U64(limit, config->args, "-limit", false, false); 343 341 PXOPT_LOOKUP_BOOL(faulted, config->args, "-faulted", false); 344 342 PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false); 343 PXOPT_LOOKUP_BOOL(all, config->args, "-all", false); 345 344 PXOPT_LOOKUP_BOOL(ordered_by_date, config->args, "-ordered_by_date", false); 345 346 // build where string for some parameters that don't fit PXOPT_COPY* 347 psString where2 = NULL; 348 if (!pxmagicAddWhere(config, &where2, "rawImfile")) { 349 psError(PXTOOLS_ERR_DATA, false, "pxSpaceAddWhere failed"); 350 return false; 351 } 352 if (!pxspaceAddWhere(config, &where2, "rawImfile")) { 353 psError(PXTOOLS_ERR_DATA, false, "pxSpaceAddWhere failed"); 354 return false; 355 } 346 356 347 357 psString query = pxDataGet("regtool_processedimfile.sql"); … … 356 366 psStringAppend(&query, " AND %s", whereClause); 357 367 psFree(whereClause); 368 } else if (!all && !where2) { 369 psError(PXTOOLS_ERR_DATA, false, "search parameters are required"); 370 return false; 358 371 } 359 372 psFree(where); 373 if (where2) { 374 psStringAppend(&query, " %s", where2); 375 psFree(where2); 376 } 360 377 361 378 if (faulted) { … … 366 383 psStringAppend(&query, " %s", "AND rawImfile.fault = 0"); 367 384 } 368 369 if (not_destreaked) {370 if (destreaked) {371 psError(PXTOOLS_ERR_DATA, true, "providing -not_destreaked and -destreaked makes no sense");372 return false;373 }374 if (magicked) {375 psError(PXTOOLS_ERR_DATA, true, "providing -not_destreaked and -magicked makes no sense");376 return false;377 }378 psStringAppend(&query, " AND rawImfile.magicked = 0");379 }380 if (destreaked) {381 psStringAppend(&query, " AND rawImfile.magicked != 0");382 }383 384 385 385 386 // add the ORDER BY statement if desired … … 884 885 workdir, 885 886 label, 887 NULL, // data_group 888 NULL, // dist_group 886 889 reduction, 887 NULL, // expgroup890 NULL, // expgroup 888 891 dvodb, 889 892 tess_id, 890 end_stage 893 end_stage, 894 NULL // note 891 895 )) { 892 896 // rollback
Note:
See TracChangeset
for help on using the changeset viewer.
