IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 28, 2006, 5:25:54 PM (20 years ago)
Author:
jhoblitt
Message:

require ippdb 0.0.38
the "big" exp_id -> exp_tag conversion

File:
1 edited

Legend:

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

    r8849 r9057  
    9292            for (long j = 0; j < pendingFrames->n; j++) {
    9393                p2PendingFrame *pendingFrame = pendingFrames->data[j];
    94                 if (strcmp(rawFrame->exposure->exp_id,
    95                            pendingFrame->exposure->exp_id) == 0) {
     94                if (strcmp(rawFrame->exposure->exp_tag,
     95                           pendingFrame->exposure->exp_tag) == 0) {
    9696                    psArrayRemove(rawFrames, rawFrame);
    9797                    // dec the counter as the array just got shorter
     
    111111                for (long j = 0; j < pendingFrames->n; j++) {
    112112                    p2DoneFrame *doneFrame = pendingFrames->data[j];
    113                     if (strcmp(rawFrame->exposure->exp_id,
    114                                doneFrame->exposure->exp_id) == 0) {
     113                    if (strcmp(rawFrame->exposure->exp_tag,
     114                               doneFrame->exposure->exp_tag) == 0) {
    115115                        psArrayRemove(rawFrames, rawFrame);
    116116                        // dec the counter as the array just got shorter
     
    178178    // select * from p2ProcessedImfiles
    179179    // where
    180     // exp_id & class_id are not in p2PendingImfile
     180    // exp_tag & class_id are not in p2PendingImfile
    181181
    182182    // add the completed imfile to
     
    193193        " FROM p2PendingImfile "
    194194        " LEFT JOIN p2ProcessedImfile"
    195         "   USING(exp_id, class_id)"
     195        "   USING(exp_tag, class_id)"
    196196        " WHERE"
    197         "  p2ProcessedImfile.exp_id IS NULL"
     197        "  p2ProcessedImfile.exp_tag IS NULL"
    198198        "  AND p2ProcessedImfile.class_id IS NULL"
    199199        );
     
    201201        psMetadata *where = psMetadataAlloc();
    202202        bool status = false;
    203         psString exp_id = psMetadataLookupStr(&status, config->args, "-exp_id");        if (!status) {
    204             psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -exp_id");
     203        psString exp_tag = psMetadataLookupStr(&status, config->args, "-exp_tag");        if (!status) {
     204            psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -exp_tag");
    205205            psFree(query);
    206206            return false;
    207207        }
    208         if (exp_id) {
    209             if (!psMetadataAddStr(where, PS_LIST_TAIL, "exp_id", 0, "==", exp_id)) {
    210                 psError(PS_ERR_UNKNOWN, false, "failed to add item exp_id");
     208        if (exp_tag) {
     209            if (!psMetadataAddStr(where, PS_LIST_TAIL, "exp_tag", 0, "==", exp_tag)) {
     210                psError(PS_ERR_UNKNOWN, false, "failed to add item exp_tag");
    211211                psFree(where);
    212212                psFree(query);
     
    339339
    340340    // select * from p2PendingExp
    341     // where exp_id is not in p2ProcessedExp
    342     // where exp_id is not in p2PendingImfile
     341    // where exp_tag is not in p2ProcessedExp
     342    // where exp_tag is not in p2PendingImfile
    343343    // where the number of entries in p2ProccessedImfile matches the .imfiles
    344344    // entry in rawScienceExp
     
    350350        " FROM p2PendingExp"
    351351        " JOIN rawScienceExp"
    352         "   ON p2PendingExp.exp_id = rawScienceExp.exp_id"
     352        "   ON p2PendingExp.exp_tag = rawScienceExp.exp_tag"
    353353        " LEFT JOIN p2ProcessedExp"
    354         "   ON p2PendingExp.exp_id = p2ProcessedExp.exp_id"
     354        "   ON p2PendingExp.exp_tag = p2ProcessedExp.exp_tag"
    355355        " LEFT JOIN p2PendingImfile"
    356         "   ON p2PendingExp.exp_id = p2PendingImfile.exp_id"
     356        "   ON p2PendingExp.exp_tag = p2PendingImfile.exp_tag"
    357357        " LEFT JOIN p2ProcessedImfile"
    358         "   ON p2PendingExp.exp_id = p2ProcessedImfile.exp_id"
     358        "   ON p2PendingExp.exp_tag = p2ProcessedImfile.exp_tag"
    359359        " WHERE"
    360         "  p2ProcessedExp.exp_id IS NULL"
    361         "  AND p2PendingImfile.exp_id IS NULL"
    362         "  AND p2ProcessedImfile.exp_id IS NOT NULL"
     360        "  p2ProcessedExp.exp_tag IS NULL"
     361        "  AND p2PendingImfile.exp_tag IS NULL"
     362        "  AND p2ProcessedImfile.exp_tag IS NOT NULL"
    363363        " GROUP BY"
    364         "   p2PendingExp.exp_id"
     364        "   p2PendingExp.exp_tag"
    365365        " HAVING rawScienceExp.imfiles = COUNT(p2ProcessedImfile.class_id)"
    366366        );
     
    514514
    515515    return p2ProcessedImfileRowAlloc(
    516         imfile->exp_id,
     516        imfile->exp_tag,
    517517        imfile->class_id,
    518518        uri,
     
    533533
    534534    return p2ProcessedExpRowAlloc(
    535         pendingExp->exp_id,
     535        pendingExp->exp_tag,
    536536        pendingExp->p1_version,
    537537        pendingExp->p2_version
     
    544544
    545545    return p3PendingExpRowAlloc(
    546         pendingExp->exp_id,
     546        pendingExp->exp_tag,
    547547        pendingExp->p1_version,
    548548        pendingExp->p2_version
Note: See TracChangeset for help on using the changeset viewer.