Changeset 25870 for branches/eam_branches/20090820/ippTools/src/faketool.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/faketool.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/20090820
-
branches/eam_branches/20090820/ippTools/src/faketool.c
r25766 r25870 177 177 PXOPT_LOOKUP_STR(tess_id, config->args, "-set_tess_id", false, false); 178 178 PXOPT_LOOKUP_STR(end_stage, config->args, "-set_end_stage", false, false); 179 PXOPT_LOOKUP_STR(data_group, config->args, "-set_data_group", false, false); 180 PXOPT_LOOKUP_STR(dist_group, config->args, "-set_dist_group", false, false); 181 PXOPT_LOOKUP_STR(note, config->args, "-set_note", false, false); 179 182 180 183 // default … … 265 268 266 269 // queue the exp 267 if (!pxfakeQueueByCamID(config, cam_id, workdir, label, reduction, expgroup, dvodb, tess_id, end_stage)) {270 if (!pxfakeQueueByCamID(config, cam_id, workdir, label, data_group ? data_group : label, dist_group, reduction, expgroup, dvodb, tess_id, end_stage, note)) { 268 271 if (!psDBRollback(config->dbh)) { 269 272 psError(PS_ERR_UNKNOWN, false, "database error"); … … 330 333 PXOPT_COPY_F32(config->args, where, "-sun_angle_max", "sun_angle", "<"); 331 334 PXOPT_COPY_STR(config->args, where, "-label", "fakeRun.label", "=="); 332 333 if (!psListLength(where->list) 334 && !psMetadataLookupBool(NULL, config->args, "-all")) { 335 PXOPT_COPY_STR(config->args, where, "-data_group", "fakeRun.data_group", "=="); 336 PXOPT_COPY_STR(config->args, where, "-dist_group", "fakeRun.dist_group", "=="); 337 338 if (!psListLength(where->list)) { 335 339 psFree(where); 336 340 where = NULL; … … 339 343 } 340 344 341 PXOPT_LOOKUP_STR(state, config->args, "-set_state", false, false); 342 PXOPT_LOOKUP_STR(label, config->args, "-set_label", false, false); 343 344 if ((!state) && (!label)) { 345 psError(PXTOOLS_ERR_DATA, false, "parameters are required"); 346 psFree(where); 347 return false; 348 } 349 350 if (state) { 351 // set fakeRun.state to state 352 if (!pxfakeRunSetStateByQuery(config, where, state)) { 353 psFree(where); 354 return false; 355 } 356 } 357 358 if (label) { 359 // set fakeRun.label to label 360 if (!pxfakeRunSetLabelByQuery(config, where, label)) { 361 psFree(where); 362 return false; 363 } 364 } 365 345 psString query = psStringCopy("UPDATE fakeRun JOIN camRun USING(cam_id) JOIN chipRun USING(chip_id) JOIN rawExp USING(exp_id)"); 346 347 // pxUpdateRun gets parameters from config->args and updates 348 bool result = pxUpdateRun(config, where, &query, "fakeRun", true); 349 if (!result) { 350 psError(PXTOOLS_ERR_DATA, false, "pxUpdateRun failed"); 351 } 352 353 psFree(query); 366 354 psFree(where); 367 355 368 return true;356 return result; 369 357 } 370 358 … … 1162 1150 fakeRun->workdir, 1163 1151 fakeRun->label, 1152 fakeRun->data_group, 1153 fakeRun->dist_group, 1164 1154 fakeRun->dvodb, 1165 1155 fakeRun->tess_id, 1166 1156 fakeRun->reduction, 1167 fakeRun->end_stage 1157 fakeRun->end_stage, 1158 NULL // note does not propagate 1168 1159 )) { 1169 1160 psError(PS_ERR_UNKNOWN, false, "failed to queue warpRun"); … … 1279 1270 return false; 1280 1271 } 1281 1272 if (!pxExportVersion(config, f)) { 1273 psError(PS_ERR_UNKNOWN, false, "failed to write dbversion output file"); 1274 return false; 1275 } 1282 1276 psMetadata *where = psMetadataAlloc(); 1283 1277 PXOPT_COPY_S64(config->args, where, "-fake_id", "fake_id", "=="); … … 1360 1354 psMetadata *input = psMetadataConfigRead (NULL, &nFail, infile, false); 1361 1355 1362 fprintf (stdout, "---- input ----\n"); 1356 #ifdef notdef 1357 fprintf (stderr, "---- input ----\n"); 1363 1358 psMetadataPrint (stderr, input, 1); 1364 1359 #endif 1360 1361 if (!pxCheckImportVersion(config, input)) { 1362 psError(PS_ERR_UNKNOWN, false, "pxCheckImportVersion failed"); 1363 return false; 1364 } 1365 1365 psMetadataItem *item = psMetadataLookup (input, "fakeRun"); 1366 1366 psAssert (item, "entry not in input?");
Note:
See TracChangeset
for help on using the changeset viewer.
