Changeset 9821
- Timestamp:
- Nov 1, 2006, 12:27:41 PM (20 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
-
ippScripts/scripts/detrend_reject_exp.pl (modified) (1 diff)
-
ippTools/scripts/dettest.sh (modified) (1 diff)
-
ippTools/src/dettool.c (modified) (3 diffs)
-
ippTools/src/dettoolConfig.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/detrend_reject_exp.pl
r9524 r9821 188 188 my $command = "$dettool -updatedetrun -det_id $det_id"; 189 189 if ($stop) { 190 $command .= ' -st op';190 $command .= ' -state stop'; 191 191 } else { 192 192 $command .= ' -again'; -
trunk/ippTools/scripts/dettest.sh
r9765 r9821 61 61 dettool -residexp || exit 1 62 62 63 dettool -updatedetrun -det_id $det_id -st op || exit 163 dettool -updatedetrun -det_id $det_id -state stop || exit 1 -
trunk/ippTools/src/dettool.c
r9820 r9821 4285 4285 return false; 4286 4286 } 4287 // either -rerun or -st opmust be specified4287 // either -rerun or -state must be specified 4288 4288 bool again = psMetadataLookupBool(&status, config->args, "-again"); 4289 4289 if (!status) { … … 4291 4291 return false; 4292 4292 } 4293 bool stop = psMetadataLookupBool(&status, config->args, "-stop");4294 if (!status) { 4295 psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -st op");4296 return false; 4297 } 4298 if (!(again || st op)) {4299 psError(PS_ERR_UNKNOWN, true, "either -again or -st opmust be specified");4300 return false; 4301 } 4302 if (again && st op) {4303 psError(PS_ERR_UNKNOWN, true, "either -again or -st opmust be specified");4304 return false; 4305 } 4306 4307 if (st op) {4308 // set detRun.state to st op4309 return setDetRunState(config, det_id, "stop");4293 psString state = psMetadataLookupStr(&status, config->args, "-state"); 4294 if (!status) { 4295 psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -state"); 4296 return false; 4297 } 4298 if (!(again || state)) { 4299 psError(PS_ERR_UNKNOWN, true, "either -again or -state must be specified"); 4300 return false; 4301 } 4302 if (again && state) { 4303 psError(PS_ERR_UNKNOWN, true, "either -again or -state must be specified"); 4304 return false; 4305 } 4306 4307 if (state) { 4308 // set detRun.state to state 4309 return setDetRunState(config, det_id, state); 4310 4310 } 4311 4311 … … 4926 4926 PS_ASSERT_PTR_NON_NULL(state, false); 4927 4927 4928 // check that state is a valid string value 4929 if (!( 4930 (strncmp(state, "run", 4) == 0) 4931 || (strncmp(state, "stop", 5) == 0) 4932 || (strncmp(state, "reg", 4) == 0) 4933 ) 4934 ) { 4935 psError(PS_ERR_UNKNOWN, false, 4936 "invalid detRun state: %s", state); 4937 return false; 4938 } 4939 4928 4940 char *query = "UPDATE detRun SET state = '%s' WHERE det_id = '%s'"; 4929 4941 if (!p_psDBRunQuery(config->dbh, query, state, det_id)) { -
trunk/ippTools/src/dettoolConfig.c
r9817 r9821 509 509 psMetadataAddBool(updatedetrunArgs, PS_LIST_TAIL, "-again", 0, 510 510 "start a new iteration of this detrend run", false); 511 psMetadataAdd Bool(updatedetrunArgs, PS_LIST_TAIL, "-stop", 0,512 "s topthis detrend run", false);511 psMetadataAddStr(updatedetrunArgs, PS_LIST_TAIL, "-state", 0, 512 "set the state of this detrend run", false); 513 513 514 514 // -rerun
Note:
See TracChangeset
for help on using the changeset viewer.
