IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 6112


Ignore:
Timestamp:
Jan 20, 2006, 5:31:46 PM (20 years ago)
Author:
jhoblitt
Message:

whitespace reform

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/src/p2searchPendingFrames.c

    r6110 r6112  
    22
    33// select pending frames (exposure+images) which are done/not done
    4 psArray *p2searchPendingFrames (p2Config *config) {
     4psArray *p2searchPendingFrames(p2Config *config) {
    55
    66    // build 'where' structure
    7     psMetadata *where = psMetadataAlloc ();
     7    psMetadata *where = psMetadataAlloc();
    88
    99    // in order to include these restrictions, we need to define these table columns
    1010    if (config->camera_name != NULL) {
    11         psMetadataAddStr (where, PS_LIST_TAIL, "camera", 0, "==",
     11        psMetadataAddStr(where, PS_LIST_TAIL, "camera", 0, "==",
    1212            config->camera_name);
    1313    }
    1414    if (config->filter != NULL) {
    15         psMetadataAddStr (where, PS_LIST_TAIL, "FILTER", 0, "==",
     15        psMetadataAddStr(where, PS_LIST_TAIL, "filter", 0, "==",
    1616            config->filter);
    1717    }
    1818    /*
    1919    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);
    2222    }
    2323    */
    2424
    25     psArray *exposures = p2PendingExpSelectRowObjects (config->database, where, MAX_ROWS);
    26     psFree (where);
     25    psArray *exposures = p2PendingExpSelectRowObjects(config->database, where, MAX_ROWS);
     26    psFree(where);
    2727
    2828    // output array of rawSet
    29     psArray *frames = psArrayAlloc (exposures->n);
     29    psArray *frames = psArrayAlloc(exposures->n);
    3030
    3131    // 'where' to select each exposure
    32     where = psMetadataAlloc ();
     32    where = psMetadataAlloc();
    3333    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];
    3835
    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);
    4038
    41         p2PendingFrame *frame = p2PendingFrameAlloc (exposure, images);
     39        psArray *images = p2PendingImfileSelectRowObjects(config->database, where, MAX_ROWS);
    4240
    43         psArrayAdd (frames, 100, frame);
     41        p2PendingFrame *frame = p2PendingFrameAlloc(exposure, images);
     42
     43        psArrayAdd(frames, 100, frame);
    4444    }
     45
    4546    return frames;
    4647}
    4748
    48 // XXX EAM : this may be more efficient if we just select all p2PendingImages which
    49 // have the appropriate state.  that would limit the ability to filter the selection.
    50 // test to see how well/poorly this performs
     49// 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.