Changeset 6112
- Timestamp:
- Jan 20, 2006, 5:31:46 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/src/p2searchPendingFrames.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/p2searchPendingFrames.c
r6110 r6112 2 2 3 3 // select pending frames (exposure+images) which are done/not done 4 psArray *p2searchPendingFrames (p2Config *config) {4 psArray *p2searchPendingFrames(p2Config *config) { 5 5 6 6 // build 'where' structure 7 psMetadata *where = psMetadataAlloc ();7 psMetadata *where = psMetadataAlloc(); 8 8 9 9 // in order to include these restrictions, we need to define these table columns 10 10 if (config->camera_name != NULL) { 11 psMetadataAddStr (where, PS_LIST_TAIL, "camera", 0, "==",11 psMetadataAddStr(where, PS_LIST_TAIL, "camera", 0, "==", 12 12 config->camera_name); 13 13 } 14 14 if (config->filter != NULL) { 15 psMetadataAddStr (where, PS_LIST_TAIL, "FILTER", 0, "==",15 psMetadataAddStr(where, PS_LIST_TAIL, "filter", 0, "==", 16 16 config->filter); 17 17 } 18 18 /* 19 19 if (!psTimeIsZero(config->start) && !psTimeIsZero(config->stop)) { 20 psMetadataAddTime(where, PS_LIST_TAIL, "TIME_START", 0, "<", config->stop);21 psMetadataAddTime(where, PS_LIST_TAIL, "TIME_STOP", 0, ">", config->start);20 psMetadataAddTime(where, PS_LIST_TAIL, "TIME_START", 0, "<", config->stop); 21 psMetadataAddTime(where, PS_LIST_TAIL, "TIME_STOP", 0, ">", config->start); 22 22 } 23 23 */ 24 24 25 psArray *exposures = p2PendingExpSelectRowObjects (config->database, where, MAX_ROWS);26 psFree (where);25 psArray *exposures = p2PendingExpSelectRowObjects(config->database, where, MAX_ROWS); 26 psFree(where); 27 27 28 28 // output array of rawSet 29 psArray *frames = psArrayAlloc (exposures->n);29 psArray *frames = psArrayAlloc(exposures->n); 30 30 31 31 // 'where' to select each exposure 32 where = psMetadataAlloc ();32 where = psMetadataAlloc(); 33 33 for (int i = 0; i < exposures->n; i++) { 34 p2PendingExpRow *exposure = exposures->data[i]; 35 36 psMetadataAddStr (where, PS_LIST_TAIL, "EXP_ID", PS_META_REPLACE, "==", exposure->exp_id); 37 psMetadataAddS32 (where, PS_LIST_TAIL, "P2_VERSION", PS_META_REPLACE, "==", exposure->p2_version); 34 p2PendingExpRow *exposure = exposures->data[i]; 38 35 39 psArray *images = p2PendingImfileSelectRowObjects (config->database, where, MAX_ROWS); 36 psMetadataAddStr(where, PS_LIST_TAIL, "exp_id", PS_META_REPLACE, "==", exposure->exp_id); 37 psMetadataAddS32(where, PS_LIST_TAIL, "p2_version", PS_META_REPLACE, "==", exposure->p2_version); 40 38 41 p2PendingFrame *frame = p2PendingFrameAlloc (exposure, images);39 psArray *images = p2PendingImfileSelectRowObjects(config->database, where, MAX_ROWS); 42 40 43 psArrayAdd (frames, 100, frame); 41 p2PendingFrame *frame = p2PendingFrameAlloc(exposure, images); 42 43 psArrayAdd(frames, 100, frame); 44 44 } 45 45 46 return frames; 46 47 } 47 48 48 // XXX EAM : this may be more efficient if we just select all p2PendingImages which49 // have the appropriate state. that would limit the ability to filter the selection.50 // t est to see how well/poorly this performs49 // XXX EAM : this may be more efficient if we just select all p2PendingImages 50 // which have the appropriate state. that would limit the ability to filter 51 // the selection. test to see how well/poorly this performs
Note:
See TracChangeset
for help on using the changeset viewer.
