Changeset 25835 for trunk/ippTools/src/chiptool.c
- Timestamp:
- Oct 14, 2009, 11:06:18 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/src/chiptool.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/chiptool.c
r25822 r25835 146 146 PXOPT_LOOKUP_STR(tess_id, config->args, "-set_tess_id", false, false); 147 147 PXOPT_LOOKUP_STR(end_stage, config->args, "-set_end_stage", false, false); 148 PXOPT_LOOKUP_STR(dist_group, config->args, "-set_dist_group", false, false); 149 PXOPT_LOOKUP_STR(data_group, config->args, "-set_data_group", false, false); 150 PXOPT_LOOKUP_STR(note, config->args, "-set_note", false, false); 148 151 149 152 // default … … 265 268 workdir ? workdir : raw_workdir, 266 269 label ? label : raw_label, 270 data_group ? data_group : (label ? label : raw_label), 271 dist_group, 267 272 reduction ? reduction : raw_reduction, 268 273 // expgroup ? expgroup : raw_expgroup, … … 271 276 dvodb ? dvodb : raw_dvodb, 272 277 tess_id ? tess_id : raw_tess_id, 273 end_stage ? end_stage : raw_end_stage 278 end_stage ? end_stage : raw_end_stage, 279 note 274 280 )) { 275 281 if (!psDBRollback(config->dbh)) { … … 303 309 PXOPT_COPY_STR(config->args, where, "-label", "chipRun.label", "=="); 304 310 PXOPT_COPY_STR(config->args, where, "-state", "chipRun.state", "=="); 305 306 if (!psListLength(where->list) && 307 !psMetadataLookupBool(NULL, config->args, "-all")) { 311 PXOPT_COPY_STR(config->args, where, "-data_group", "chipRun.data_group", "=="); 312 PXOPT_COPY_STR(config->args, where, "-dist_group", "chipRun.dist_group", "=="); 313 314 if (!psListLength(where->list)) { 308 315 psFree(where); 309 where = NULL;310 316 psError(PXTOOLS_ERR_DATA, false, "search parameters are required"); 311 317 return false; 312 318 } 313 314 PXOPT_LOOKUP_STR(state, config->args, "-set_state", false, false); 315 PXOPT_LOOKUP_STR(label, config->args, "-set_label", false, false); 316 317 if ((!state) && (!label)) { 318 psError(PXTOOLS_ERR_DATA, false, "parameters are required"); 319 psFree(where); 320 return false; 321 } 322 323 if (state) { 324 // set chipRun.state to state 325 if (!pxchipRunSetStateByQuery(config, where, state)) { 326 psFree(where); 327 return false; 328 } 329 } 330 331 if (label) { 332 // set chipRun.label to label 333 if (!pxchipRunSetLabelByQuery(config, where, label)) { 334 psFree(where); 335 return false; 336 } 337 } 338 319 psString query = psStringCopy("UPDATE chipRun JOIN rawExp USING(exp_id)"); 320 321 // pxUpdateRun gets parameters from config->args and updates 322 bool result = pxUpdateRun(config, where, &query, true); 323 if (!result) { 324 psError(PXTOOLS_ERR_DATA, false, "pxUpdateRun failed"); 325 } 326 327 psFree(query); 339 328 psFree(where); 340 329 341 return true;330 return result; 342 331 } 343 332 … … 1258 1247 chipRun->workdir, 1259 1248 chipRun->label, 1249 chipRun->data_group, 1250 chipRun->dist_group, 1260 1251 chipRun->reduction, 1261 1252 chipRun->expgroup, 1262 1253 chipRun->dvodb, 1263 1254 chipRun->tess_id, 1264 chipRun->end_stage 1255 chipRun->end_stage, 1256 NULL // note does not propagate 1265 1257 )) { 1266 1258 if (!psDBRollback(config->dbh)) {
Note:
See TracChangeset
for help on using the changeset viewer.
