IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 11034 for trunk/ippTools/src


Ignore:
Timestamp:
Jan 11, 2007, 12:13:05 PM (19 years ago)
Author:
jhoblitt
Message:

strip out p2tool -quick & -define stubs

Location:
trunk/ippTools/src
Files:
3 edited

Legend:

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

    r11033 r11034  
    2929#include "p2tool.h"
    3030
    31 static bool quickMode(pxConfig *config);
    32 static bool defineMode(pxConfig *config);
    3331static bool pendingimfileMode(pxConfig *config);
    3432static bool addprocessedimfileMode(pxConfig *config);
     
    5755
    5856    switch (config->mode) {
    59         MODECASE(P2TOOL_MODE_QUICK,                 quickMode);
    60         MODECASE(P2TOOL_MODE_DEFINE,                defineMode);
    6157        MODECASE(P2TOOL_MODE_PENDINGIMFILE,         pendingimfileMode);
    6258        MODECASE(P2TOOL_MODE_ADDPROCESSEDIMFILE,    addprocessedimfileMode);
     
    8480
    8581    exit(EXIT_FAILURE);
    86 }
    87 
    88 static bool quickMode(pxConfig *config)
    89 {
    90     PS_ASSERT_PTR_NON_NULL(config, NULL);
    91 
    92     psArray *rawFrames = rawScienceFrameSearch(config);
    93     if (!rawFrames) {
    94         psError(PS_ERR_UNKNOWN, false, "no rawScienceFrames found");
    95         return false;
    96     }
    97     bool status = rawScienceFramePrint(stdout, config, rawFrames);
    98     if (!status) {
    99         psError(PS_ERR_UNKNOWN, false, "rawScienceFramePrint() failed");
    100         return false;
    101     }
    102 
    103     return true;
    104 }
    105 
    106 static bool defineMode(pxConfig *config)
    107 {
    108     PS_ASSERT_PTR_NON_NULL(config, NULL);
    109 #if 0
    110 
    111     psArray *rawFrames = rawScienceFrameSearch(config);
    112     if (!rawFrames) {
    113         psError(PS_ERR_UNKNOWN, false, "no rawScienceFrames found");
    114         return false;
    115     }
    116     psArray *pendingFrames = p2PendingFrameSearch(config);
    117     // XXX compare raw frames to pending frames and remove duplicate
    118     // frames from the raw set.  This may not be quiet right as it's
    119     // possible (likely?) that a rawScienceExp is inserted into the
    120     // dbh prior to /ALL/ of that exposure's Imfiles
    121     if (pendingFrames) {
    122         for (long i = 0; i < rawFrames->n; i++) {
    123             rawScienceFrame *rawFrame = rawFrames->data[i];
    124             for (long j = 0; j < pendingFrames->n; j++) {
    125                 p2PendingFrame *pendingFrame = pendingFrames->data[j];
    126                 if (strcmp(rawFrame->exposure->exp_tag,
    127                            pendingFrame->exposure->exp_tag) == 0) {
    128                     psArrayRemoveData(rawFrames, rawFrame);
    129                     // dec the counter as the array just got shorter
    130                     // and we don't want to skip elemnts
    131                     i--;
    132                     break;
    133                 }
    134             }
    135         }
    136 
    137         psFree(pendingFrames);
    138 
    139         psArray *doneFrames = p2searchDoneFrames(config);
    140         if (doneFrames && (rawFrames->n > 0)) {
    141             for (long i = 0; i < rawFrames->n; i++) {
    142                 rawScienceFrame *rawFrame = rawFrames->data[i];
    143                 for (long j = 0; j < pendingFrames->n; j++) {
    144                     p2DoneFrame *doneFrame = pendingFrames->data[j];
    145                     if (strcmp(rawFrame->exposure->exp_tag,
    146                                doneFrame->exposure->exp_tag) == 0) {
    147                         psArrayRemoveData(rawFrames, rawFrame);
    148                         // dec the counter as the array just got shorter
    149                         // and we don't want to skip elemnts
    150                         i--;
    151                         break;
    152                     }
    153                 }
    154             }
    155 
    156             psFree(doneFrames);
    157         }
    158     }
    159 
    160     if (!rawFrames->n > 0) {
    161         psError(PS_ERR_UNKNOWN, false, "no unprocessed rawScienceFrames found");
    162         psFree(rawFrames);
    163         return false;
    164     }
    165 
    166     bool status = p2insertPendingFrames(config, rawFrames);
    167     if (!status) {
    168         psError(PS_ERR_UNKNOWN, false,"p2insertPendingFrames() failed");
    169         return false;
    170     }
    171 
    172 #endif
    173     return true;
    17482}
    17583
     
    257165}
    258166
     167
    259168static bool addprocessedimfileMode(pxConfig *config)
    260169{
     
    558467}
    559468
     469
    560470static bool maskedMode(pxConfig *config)
    561471{
     
    605515}
    606516
     517
    607518static bool unblockMode(pxConfig *config)
    608519{
     
    630541    return true;
    631542}
     543
    632544
    633545static bool p2ProcessedCompleteExp(pxConfig *config)
     
    746658}
    747659
     660
    748661static p2ProcessedImfileRow *p2PendingToProcessedImfile(pxConfig *config, p2PendingImfileRow *imfile)
    749662{
     
    838751}
    839752
     753
    840754static p2ProcessedExpRow *p2PendingToProcessedExp(pxConfig *config, p2PendingExpRow *pendingExp)
    841755{
     
    850764}
    851765
     766
    852767static p3PendingExpRow *p2PendingToP3PendingExp(pxConfig *config, p2PendingExpRow *pendingExp)
    853768{
  • trunk/ippTools/src/chiptool.h

    r11033 r11034  
    2525typedef enum {
    2626    P2TOOL_MODE_NONE      = 0x0,
    27     P2TOOL_MODE_QUICK,
    28     P2TOOL_MODE_DEFINE,
    2927    P2TOOL_MODE_PENDINGIMFILE,
    3028    P2TOOL_MODE_ADDPROCESSEDIMFILE,
  • trunk/ippTools/src/chiptoolConfig.c

    r11033 r11034  
    3838        goto FAIL;
    3939    }
    40 
    41     // -quick
    42     psMetadata *quickArgs = psMetadataAlloc();
    43    
    44     // -define
    45     psMetadata *defineArgs = psMetadataAlloc();
    4640
    4741    // -pendingimfile
     
    154148
    155149    psMetadata *argSets = psMetadataAlloc();
    156     PXTOOL_MODE("-quick",           P2TOOL_MODE_QUICK,          quickArgs);
    157     PXTOOL_MODE("-define",          P2TOOL_MODE_DEFINE,         defineArgs);
    158150    PXTOOL_MODE("-pendingimfile",   P2TOOL_MODE_PENDINGIMFILE,  pendingimfileArgs);
    159151    PXTOOL_MODE("-addprocessedimfile",P2TOOL_MODE_ADDPROCESSEDIMFILE,addprocessedimfileArgs);
Note: See TracChangeset for help on using the changeset viewer.