Changeset 35193
- Timestamp:
- Feb 21, 2013, 1:38:59 PM (13 years ago)
- Location:
- trunk/ippTools/src
- Files:
-
- 2 edited
-
disttool.c (modified) (12 diffs)
-
disttoolConfig.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/disttool.c
r34235 r35193 143 143 // optional 144 144 PXOPT_LOOKUP_BOOL(use_alternate, config->args, "-use_alternate", false); 145 PXOPT_LOOKUP_BOOL( no_magic, config->args, "-no_magic", false);145 PXOPT_LOOKUP_BOOL(magic, config->args, "-magic", false); 146 146 PXOPT_LOOKUP_STR(set_label, config->args, "-set_label", false, false); 147 147 PXOPT_LOOKUP_STR(set_data_group, config->args, "-set_data_group", false, false); … … 175 175 return false; 176 176 } 177 if ( no_magic) {177 if (!magic) { 178 178 psError(PXTOOLS_ERR_SYS, true, "no_magic forbidden with alternate inputs"); 179 179 return false; … … 187 187 // an interest) 188 188 // and exp_id to be supplied. We could add -exp_type and dateobs cuts to make it easier 189 if (!strcmp(stage, "raw") && no_magic && !(exp_id && dist_group && exp_type)) {189 if (!strcmp(stage, "raw") && !magic && !(exp_id && dist_group && exp_type)) { 190 190 psError(PXTOOLS_ERR_SYS, true, "exp_id, exp_type, and dist_group are required for raw stage if no_magic"); 191 191 return false; … … 204 204 runJoinStr = "camRun.exp_id"; 205 205 } 206 if ( !no_magic) {206 if (magic) { 207 207 query = pxDataGet("disttool_definebyquery_raw.sql"); 208 208 } else { … … 215 215 } 216 216 217 if ( !no_magic) {217 if (magic) { 218 218 if (label) { 219 219 psStringAppend(&query, " AND (magicDSRun.label = '%s')", label); … … 289 289 } 290 290 // fake stage doesn't require magic 291 no_magic = true;291 magic = false; 292 292 } else if (!strcmp(stage, "warp")) { 293 293 magicRunType = "warpRun"; … … 357 357 } 358 358 // stack stage doesn't require magic 359 no_magic = true;359 magic = false; 360 360 } else if (!strcmp(stage, "sky")) { 361 361 magicRunType = "staticskyRun"; … … 378 378 } 379 379 // (static)sky stage doesn't require magic 380 no_magic = true;380 magic = false; 381 381 } else if (!strcmp(stage, "SSdiff")) { 382 382 magicRunType = "diffRun"; … … 396 396 } 397 397 398 no_magic = true;398 magic = false; 399 399 } else { 400 400 psError(PS_ERR_UNKNOWN, true, "unknown value for stage: %s", stage); … … 408 408 409 409 if (!strcmp(stage, "raw")) { 410 if ( !no_magic) {410 if (magic) { 411 411 psStringAppend(&query, " AND (magicDSRun.re_place = %d)", !use_alternate); 412 412 psStringAppend(&query, " AND (camRun.state = 'full')"); … … 426 426 psString joinHook = NULL; 427 427 428 if ( !no_magic) {428 if (magic) { 429 429 psStringAppend(&query, " AND (%s.magicked > 0)", magicRunType); 430 430 } … … 517 517 NULL, // outdir 518 518 clean, 519 no_magic,519 !magic, 520 520 use_alternate, 521 521 "new", -
trunk/ippTools/src/disttoolConfig.c
r33042 r35193 48 48 psMetadataAddStr(definebyqueryArgs, PS_LIST_TAIL, "-workdir", 0, "define workdir (required)", NULL); 49 49 50 psMetadataAddBool(definebyqueryArgs, PS_LIST_TAIL, "-no_magic", 0, "magic is not needed", false); 50 psMetadataAddBool(definebyqueryArgs, PS_LIST_TAIL, "-no_magic", 0, "magic is not needed (ignored)", false); 51 psMetadataAddBool(definebyqueryArgs, PS_LIST_TAIL, "-magic", 0, "magic is needed", false); 51 52 psMetadataAddBool(definebyqueryArgs, PS_LIST_TAIL, "-use_alternate", 0, "use alternate inputs", false); 52 53 psMetadataAddStr(definebyqueryArgs, PS_LIST_TAIL, "-set_label", 0, "define label for run", NULL);
Note:
See TracChangeset
for help on using the changeset viewer.
