Changeset 6060 for trunk/ippTools/src/p2updatePending.c
- Timestamp:
- Jan 19, 2006, 4:16:26 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/src/p2updatePending.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/p2updatePending.c
r5881 r6060 2 2 3 3 // select pending frames (exposure+images) which are not done, select their done images, count, update 4 bool p2updatePendingFrames (p2 SearchConfig *config, psArray *pendingFrames) {4 bool p2updatePendingFrames (p2Config *config, psArray *pendingFrames) { 5 5 6 6 psMetadata *where = psMetadataAlloc (); 7 7 8 8 // select all of the exposures which are still pending 9 psMetadataAddS tr (where, PS_LIST_TAIL, "STATE", 0, "==", P2_STATE_PENDING);10 psArray *exposures = p2PendingExp osureSelectRows (config->database, where, MAX_ROWS);9 psMetadataAddS32 (where, PS_LIST_TAIL, "STATE", 0, "==", P2_MODE_PENDING); 10 psArray *exposures = p2PendingExpSelectRowObjects (config->database, where, MAX_ROWS); 11 11 12 12 // we will now select all of the matching images which are done 13 psMetadataAddS tr (where, PS_LIST_TAIL, "STATE", PS_META_REPLACE, "==", P2_STATE_DONE);13 psMetadataAddS32 (where, PS_LIST_TAIL, "STATE", PS_META_REPLACE, "==", P2_MODE_DONE); 14 14 for (int i = 0; i < exposures->n; i++) { 15 p2PendingExp osure*exposure = exposures->data[i];15 p2PendingExpRow *exposure = exposures->data[i]; 16 16 17 17 // find the next available version numbers 18 psMetadataAddStr (where, PS_LIST_TAIL, "EXP_ID", PS_META_REPLACE, "==", exposure->exp ID);19 psMetadataAddS tr (where, PS_LIST_TAIL, "P2_VERSION", PS_META_REPLACE, "==", exposure->P2version);20 psArray *images = p2PendingIm ageSelectRows (config->database, where, MAX_ROWS);21 if (images->n != exposure-> Nclass) {18 psMetadataAddStr (where, PS_LIST_TAIL, "EXP_ID", PS_META_REPLACE, "==", exposure->exp_id); 19 psMetadataAddS32 (where, PS_LIST_TAIL, "P2_VERSION", PS_META_REPLACE, "==", exposure->p2_version); 20 psArray *images = p2PendingImfileSelectRowObjects (config->database, where, MAX_ROWS); 21 if (images->n != exposure->nclass) { 22 22 // free things 23 23 continue; … … 25 25 // frame is complete, set exposure state to done 26 26 // XXX add P2 stats here? 27 exposure->state = P2_STATE_DONE;28 p2PendingExposureUpdateRows (config->database, exposure);27 // exposure->state = P2_MODE_DONE; 28 // p2PendingExposureUpdateRows (config->database, exposure); 29 29 } 30 30 return true;
Note:
See TracChangeset
for help on using the changeset viewer.
