IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 16049


Ignore:
Timestamp:
Jan 8, 2008, 4:14:22 PM (18 years ago)
Author:
jhoblitt
Message:

add tess_id & end_stage to chip/cam/warp

Location:
branches/end_stage/ippTools
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • branches/end_stage/ippTools/share/camtool_queue_chip_id.sql

    r14018 r16049  
    1111        '%s',           -- reduction
    1212        '%s',           -- expgroup
    13         '%s'            -- dvodb
     13        '%s',           -- dvodb
     14        '%s',           -- tess_id
     15        '%s'            -- end_stage
    1416    FROM chipRun
    1517    WHERE
  • branches/end_stage/ippTools/share/chiptool_completely_processed_exp.sql

    r15769 r16049  
    99    reduction,
    1010    expgroup,
    11     dvodb
     11    dvodb,
     12    tess_id,
     13    end_stage
    1214FROM
    1315    (SELECT
  • branches/end_stage/ippTools/src/camtool.c

    r16046 r16049  
    240240    }
    241241
     242    psString tess_id = psMetadataLookupStr(&status, config->args, "-set_tess_id");
     243    if (!status) {
     244        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -set_tess_id");
     245        return false;
     246    }
     247
     248    psString end_stage = psMetadataLookupStr(&status, config->args, "-set_end_stage");
     249    if (!status) {
     250        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -set_end_stage");
     251        return false;
     252    }
     253
    242254    // find the exp_id of all the exposures that we want to queue up.
    243255    psString query = pxDataGet("camtool_find_chip_id.sql");
     
    303315                    reduction      ? reduction    : row->reduction,
    304316                    expgroup    ? expgroup  : row->expgroup,
    305                     dvodb       ? dvodb     : row->dvodb
     317                    dvodb       ? dvodb     : row->dvodb,
     318                    tess_id     ? tess_id   : row->tess_id,
     319                    end_stage   ? end_stage : row->end_stage
    306320        )) {
    307321            if (!psDBRollback(config->dbh)) {
  • branches/end_stage/ippTools/src/camtoolConfig.c

    r14227 r16049  
    138138    psMetadataAddStr(queueArgs, PS_LIST_TAIL, "-set_dvodb",  0,
    139139            "define DVO db", NULL);
     140    psMetadataAddStr(queueArgs, PS_LIST_TAIL, "-set_tess_id",  0,
     141            "define tess ID", NULL);
     142    psMetadataAddStr(queueArgs, PS_LIST_TAIL, "-set_end_stage",  0,
     143            "define end stage", NULL);
    140144
    141145    // -pendingexp
  • branches/end_stage/ippTools/src/chiptool.c

    r14214 r16049  
    228228    }
    229229
     230    psString tess_id = psMetadataLookupStr(&status, config->args, "-set_tess_id");
     231    if (!status) {
     232        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -set_tess_id");
     233        return false;
     234    }
     235
     236    psString end_stage = psMetadataLookupStr(&status, config->args, "-set_end_stage");
     237    if (!status) {
     238        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -set_end_stage");
     239        return false;
     240    }
     241
    230242    // find the exp_id of all the exposures that we want to queue up.
    231243    psString query = pxDataGet("chiptool_find_rawexp.sql");
     
    280292
    281293        // queue the exp
    282         if (!pxchipQueueByExpTag(config, exp_id, workdir, label, reduction, expgroup, dvodb)) {
     294        if (!pxchipQueueByExpTag(config, exp_id, workdir, label, reduction, expgroup, dvodb, tess_id, end_stage)) {
    283295            if (!psDBRollback(config->dbh)) {
    284296                psError(PS_ERR_UNKNOWN, false, "database error");
     
    918930                    chipRun->reduction,
    919931                    chipRun->expgroup,
    920                     chipRun->dvodb
     932                    chipRun->dvodb,
     933                    chipRun->tess_id,
     934                    chipRun->end_stage
    921935        )) {
    922936            // rollback
  • branches/end_stage/ippTools/src/flatcorr.c

    r15765 r16049  
    219219    }
    220220
     221    psString tess_id = psMetadataLookupStr(&status, config->args, "-set_tess_id");
     222    if (!status) {
     223        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -set_tess_id");
     224        return false;
     225    }
     226
     227    psString end_stage = psMetadataLookupStr(&status, config->args, "-set_end_stage");
     228    if (!status) {
     229        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -set_end_stage");
     230        return false;
     231    }
     232
    221233    // find the exp_id of all the exposures that we want to queue up.
    222234    psString query = pxDataGet("chiptool_find_rawexp.sql");
     
    293305
    294306        // queue the exp
    295         psS64 chip_id = pxchipQueueByExpTag(config, exp_id, workdir, label, reduction, expgroup, dvodb);
     307        psS64 chip_id = pxchipQueueByExpTag(config, exp_id, workdir, label, reduction, expgroup, dvodb, tess_id, end_stage);
    296308        if (!chip_id) {
    297309            if (!psDBRollback(config->dbh)) {
  • branches/end_stage/ippTools/src/pxcam.c

    r14023 r16049  
    5858bool pxcamQueueByChipID(pxConfig *config,
    5959                    psS64 chip_id,
    60                     psString workdir,
    61                     psString label,
    62                     psString recipe,
    63                     psString expgroup,
    64                     psString dvodb)
     60                    char *workdir,
     61                    char *label,
     62                    char *recipe,
     63                    char *expgroup,
     64                    char *dvodb,
     65                    char *tess_id,
     66                    char *end_stage)
    6567{
    6668    PS_ASSERT_PTR_NON_NULL(config, false);
     
    8890                expgroup ? expgroup : "NULL",
    8991                dvodb    ? dvodb    : "NULL",
     92                tess_id  ? tess_id  : "NULL",
     93                end_stage ? end_stage : "NULL",
    9094                (long long)chip_id
    9195    )) {
  • branches/end_stage/ippTools/src/pxcam.h

    r14018 r16049  
    2929bool pxcamQueueByChipID(pxConfig *config,
    3030                        psS64 chip_id,
    31                         psString workdir,
    32                         psString label,
    33                         psString recipe,
    34                         psString expgroup,
    35                         psString dvodb);
     31                        char *workdir,
     32                        char *label,
     33                        char *recipe,
     34                        char *expgroup,
     35                        char *dvodb,
     36                        char *tess_id,
     37                        char *end_stage);
    3638
    3739#endif // PXCAM_H
  • branches/end_stage/ippTools/src/pxchip.c

    r15614 r16049  
    5858psS64 pxchipQueueByExpTag(pxConfig *config,
    5959                         psS64 exp_id,
    60                          psString workdir,
    61                          psString label,
    62                          psString reduction,
    63                          psString expgroup,
    64                          psString dvodb)
     60                         char *workdir,
     61                         char *label,
     62                         char *reduction,
     63                         char *expgroup,
     64                         char *dvodb,
     65                         char *tess_id,
     66                         char *end_stage)
    6567{
    6668    PS_ASSERT_PTR_NON_NULL(config, false);
     
    7678            reduction,
    7779            expgroup,
    78             dvodb)
     80            dvodb,
     81            tess_id,
     82            end_stage)
    7983    ) {
    8084        psError(PS_ERR_UNKNOWN, false, "database error");
  • branches/end_stage/ippTools/src/pxchip.h

    r15580 r16049  
    2929psS64 pxchipQueueByExpTag(pxConfig *config,
    3030                         psS64 exp_id,
    31                          psString workdir,
    32                          psString label,
    33                          psString reduction,
    34                          psString expgroup,
    35                          psString dvodb);
     31                         char *workdir,
     32                         char *label,
     33                         char *reduction,
     34                         char *expgroup,
     35                         char *dvodb,
     36                         char *tess_id,
     37                         char *end_stage);
    3638
    3739#endif // PXCHIP_H
  • branches/end_stage/ippTools/src/regtool.c

    r15778 r16049  
    838838    }
    839839
     840    psString dvodb = psMetadataLookupStr(&status, config->args, "-dvodb");
     841    if (!status) {
     842        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -dvodb");
     843        return false;
     844    }
     845
     846    psString tess_id = psMetadataLookupStr(&status, config->args, "-tess_id");
     847    if (!status) {
     848        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -tess_id");
     849        return false;
     850    }
     851
     852    psString end_stage = psMetadataLookupStr(&status, config->args, "-end_stage");
     853    if (!status) {
     854        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -end_stage");
     855        return false;
     856    }
     857
    840858    psString query = pxDataGet("regtool_pendingexp.sql");
    841859    if (!query) {
     
    847865        // build a query to search by exp_id
    848866        psMetadata *where = psMetadataAlloc();
    849         bool status = false;
    850         psString exp_id = psMetadataLookupStr(&status, config->args, "-exp_id");
    851         if (!status) {
    852             psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -exp_id");
    853             psFree(query);
    854             return false;
    855         }
    856867        if (exp_id) {
    857868            if (!psMetadataAddStr(where, PS_LIST_TAIL, "exp_id", 0, "==", exp_id)) {
     
    975986                    rawExp->reduction,
    976987                    NULL, // expgroup
    977                     NULL  // dvodb
     988                    dvodb,
     989                    tess_id,
     990                    end_stage
    978991        )) {
    979992            // rollback
  • branches/end_stage/ippTools/src/regtoolConfig.c

    r15776 r16049  
    234234    psMetadataAddStr(addprocessedexpArgs, PS_LIST_TAIL, "-workdir",  0,
    235235        "define the \"default\" workdir for this exposure", NULL);
     236    psMetadataAddStr(addprocessedexpArgs, PS_LIST_TAIL, "-dvodb",  0,
     237        "define the dvodb for the next processing step", NULL);
     238    psMetadataAddStr(addprocessedexpArgs, PS_LIST_TAIL, "-tess_id",  0,
     239        "define the tess_id for the next processing step", NULL);
     240    psMetadataAddStr(addprocessedexpArgs, PS_LIST_TAIL, "-end_stage",  0,
     241        "define the end goal processing step", NULL);
    236242    psMetadataAddStr(addprocessedexpArgs, PS_LIST_TAIL, "-reduction",  0,
    237243        "define the \"default\" reduction class for this exposure", NULL);
  • branches/end_stage/ippTools/src/warptool.c

    r15532 r16049  
    134134    }
    135135
     136    psString dvodb = psMetadataLookupStr(&status, config->args, "-dvodb");
     137    if (!status) {
     138        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -dvodb");
     139        return false;
     140    }
     141
     142    psString tess_id = psMetadataLookupStr(&status, config->args, "-tess_id");
     143    if (!status) {
     144        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -tess_id");
     145        return false;
     146    }
     147
     148    psString end_stage = psMetadataLookupStr(&status, config->args, "-end_stage");
     149    if (!status) {
     150        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -end_stage");
     151        return false;
     152    }
     153
    136154    psTime *registered = NULL;
    137155    {
     
    154172            "reg",      // state
    155173            workdir,
    156             NULL,       // dvodb
     174            "dirty",    // workdir_state
     175            dvodb,
     176            tess_id,
     177            end_stage,
    157178            registered
    158179    );
     
    10711092        "       USING(warp_id)\n"
    10721093        "   LEFT JOIN warpSkyfile\n"
    1073         "       USING(warp_id, skycell_id, tess_id)\n"
     1094        "       USING(warp_id, skycell_id)\n"
    10741095        "   WHERE\n"
    10751096        "       warpRun.state = 'run'\n"
  • branches/end_stage/ippTools/src/warptoolConfig.c

    r15532 r16049  
    5555    psMetadataAddStr(definerunArgs, PS_LIST_TAIL, "-workdir", 0,
    5656            "define workdir (required)", NULL);
     57    psMetadataAddStr(definerunArgs, PS_LIST_TAIL, "-dvodb", 0,
     58            "define dvodb", NULL);
     59    psMetadataAddStr(definerunArgs, PS_LIST_TAIL, "-tess_id", 0,
     60            "define tess_id", NULL);
     61    psMetadataAddStr(definerunArgs, PS_LIST_TAIL, "-end_stage", 0,
     62            "define end stage", NULL);
    5763    psMetadataAddStr(definerunArgs, PS_LIST_TAIL, "-registered",  0,
    5864            "time detrend run was registered", now);
Note: See TracChangeset for help on using the changeset viewer.