IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 2, 2006, 4:32:20 PM (20 years ago)
Author:
jhoblitt
Message:

VERSION 0.0.8

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/jhoblitt/ippdb/tests/pop.c

    r8079 r8084  
    244244        char            exp_type[256];
    245245        psS32           imfiles;
    246         char            class[256];
    247 
    248         dbh = psDBInit("localhost", "test", NULL, "test");
    249         if (!dbh) {
    250             exit(EXIT_FAILURE);
    251         }
    252 
    253         if (!newExpPop(dbh, (char **)&exp_id, (char **)&camera, (char **)&telescope, (char **)&exp_type, &imfiles, (char **)&class)) {
     246
     247        dbh = psDBInit("localhost", "test", NULL, "test");
     248        if (!dbh) {
     249            exit(EXIT_FAILURE);
     250        }
     251
     252        if (!newExpPop(dbh, (char **)&exp_id, (char **)&camera, (char **)&telescope, (char **)&exp_type, &imfiles)) {
    254253            exit(EXIT_FAILURE);
    255254        }
     
    287286        char            class[256];
    288287        psF32           airmass;
    289         psF32           ra;
    290         psF32           dec;
     288        psF64           ra;
     289        psF64           dec;
    291290        psF32           exp_time;
    292 
    293         dbh = psDBInit("localhost", "test", NULL, "test");
    294         if (!dbh) {
    295             exit(EXIT_FAILURE);
    296         }
    297 
    298         if (!rawDetrendExpPop(dbh, (char **)&exp_id, (char **)&camera, (char **)&telescope, (char **)&exp_type, &imfiles, (char **)&filter, (char **)&class, &airmass, &ra, &dec, &exp_time)) {
     291        psF64           background;
     292
     293        dbh = psDBInit("localhost", "test", NULL, "test");
     294        if (!dbh) {
     295            exit(EXIT_FAILURE);
     296        }
     297
     298        if (!rawDetrendExpPop(dbh, (char **)&exp_id, (char **)&camera, (char **)&telescope, (char **)&exp_type, &imfiles, (char **)&filter, (char **)&class, &airmass, &ra, &dec, &exp_time, &background)) {
    299299            exit(EXIT_FAILURE);
    300300        }
     
    313313        char            class[256];
    314314        psF32           airmass;
    315         psF32           ra;
    316         psF32           dec;
     315        psF64           ra;
     316        psF64           dec;
    317317        psF32           exp_time;
    318 
    319         dbh = psDBInit("localhost", "test", NULL, "test");
    320         if (!dbh) {
    321             exit(EXIT_FAILURE);
    322         }
    323 
    324         if (!rawScienceExpPop(dbh, (char **)&exp_id, (char **)&camera, (char **)&telescope, (char **)&exp_type, &imfiles, (char **)&filter, (char **)&class, &airmass, &ra, &dec, &exp_time)) {
     318        psF64           background;
     319
     320        dbh = psDBInit("localhost", "test", NULL, "test");
     321        if (!dbh) {
     322            exit(EXIT_FAILURE);
     323        }
     324
     325        if (!rawScienceExpPop(dbh, (char **)&exp_id, (char **)&camera, (char **)&telescope, (char **)&exp_type, &imfiles, (char **)&filter, (char **)&class, &airmass, &ra, &dec, &exp_time, &background)) {
    325326            exit(EXIT_FAILURE);
    326327        }
     
    335336        char            class_id[256];
    336337        char            uri[256];
    337         char            stats[256];
    338 
    339         dbh = psDBInit("localhost", "test", NULL, "test");
    340         if (!dbh) {
    341             exit(EXIT_FAILURE);
    342         }
    343 
    344         if (!rawImfilePop(dbh, (char **)&exp_id, (char **)&class, (char **)&class_id, (char **)&uri, (char **)&stats)) {
    345             exit(EXIT_FAILURE);
    346         }
    347 
    348         psDBCleanup(dbh);
    349     }
    350 
    351     {
    352         psDB            *dbh;
    353         char            exp_id[256];
    354         char            camera[256];
    355         char            telescope[256];
    356         char            exp_type[256];
    357         psS32           imfiles;
    358         char            filter[256];
    359         char            class[256];
     338
     339        dbh = psDBInit("localhost", "test", NULL, "test");
     340        if (!dbh) {
     341            exit(EXIT_FAILURE);
     342        }
     343
     344        if (!rawImfilePop(dbh, (char **)&exp_id, (char **)&class, (char **)&class_id, (char **)&uri)) {
     345            exit(EXIT_FAILURE);
     346        }
     347
     348        psDBCleanup(dbh);
     349    }
     350
     351    {
     352        psDB            *dbh;
     353        char            exp_id[256];
     354        char            camera[256];
     355        char            telescope[256];
     356        char            exp_type[256];
     357        psS32           imfiles;
     358        char            filter[256];
     359        psF32           airmass;
     360        psF64           ra;
     361        psF64           dec;
     362        psF32           exp_time;
     363        psF64           background;
     364        char            recipe[256];
     365        psS32           p1_version;
     366
     367        dbh = psDBInit("localhost", "test", NULL, "test");
     368        if (!dbh) {
     369            exit(EXIT_FAILURE);
     370        }
     371
     372        if (!p1PendingExpPop(dbh, (char **)&exp_id, (char **)&camera, (char **)&telescope, (char **)&exp_type, &imfiles, (char **)&filter, &airmass, &ra, &dec, &exp_time, &background, (char **)&recipe, &p1_version)) {
     373            exit(EXIT_FAILURE);
     374        }
     375
     376        psDBCleanup(dbh);
     377    }
     378
     379    {
     380        psDB            *dbh;
     381        char            exp_id[256];
     382        char            camera[256];
     383        char            telescope[256];
     384        char            exp_type[256];
     385        psS32           imfiles;
     386        char            filter[256];
    360387        psF32           airmass;
    361388        psF32           ra;
    362         psF32           dec;
    363         psF32           exp_time;
    364         char            recipe[256];
    365         psS32           p1_version;
    366 
    367         dbh = psDBInit("localhost", "test", NULL, "test");
    368         if (!dbh) {
    369             exit(EXIT_FAILURE);
    370         }
    371 
    372         if (!p1PendingExpPop(dbh, (char **)&exp_id, (char **)&camera, (char **)&telescope, (char **)&exp_type, &imfiles, (char **)&filter, (char **)&class, &airmass, &ra, &dec, &exp_time, (char **)&recipe, &p1_version)) {
    373             exit(EXIT_FAILURE);
    374         }
    375 
    376         psDBCleanup(dbh);
    377     }
    378 
    379     {
    380         psDB            *dbh;
    381         char            exp_id[256];
    382         char            camera[256];
    383         char            telescope[256];
    384         char            exp_type[256];
    385         psS32           imfiles;
    386         char            filter[256];
    387         char            class[256];
    388         psF32           airmass;
    389         psF32           ra;
    390         psF32           dec;
    391         psF32           exp_time;
     389        psF64           dec;
     390        psF64           exp_time;
     391        psF64           background;
    392392        char            recipe[256];
    393393        psS32           p1_version;
     
    399399        }
    400400
    401         if (!p2PendingExpPop(dbh, (char **)&exp_id, (char **)&camera, (char **)&telescope, (char **)&exp_type, &imfiles, (char **)&filter, (char **)&class, &airmass, &ra, &dec, &exp_time, (char **)&recipe, &p1_version, &p2_version)) {
     401        if (!p2PendingExpPop(dbh, (char **)&exp_id, (char **)&camera, (char **)&telescope, (char **)&exp_type, &imfiles, (char **)&filter, &airmass, &ra, &dec, &exp_time, &background, (char **)&recipe, &p1_version, &p2_version)) {
    402402            exit(EXIT_FAILURE);
    403403        }
     
    436436        psS32           imfiles;
    437437        char            filter[256];
    438         char            class[256];
    439438        psF32           airmass;
    440         psF32           ra;
    441         psF32           dec;
     439        psF64           ra;
     440        psF64           dec;
    442441        psF32           exp_time;
     442        psF64           background;
    443443        char            recipe[256];
    444444        psS32           p1_version;
     
    450450        }
    451451
    452         if (!p2DoneExpPop(dbh, (char **)&exp_id, (char **)&camera, (char **)&telescope, (char **)&exp_type, &imfiles, (char **)&filter, (char **)&class, &airmass, &ra, &dec, &exp_time, (char **)&recipe, &p1_version, &p2_version)) {
     452        if (!p2DoneExpPop(dbh, (char **)&exp_id, (char **)&camera, (char **)&telescope, (char **)&exp_type, &imfiles, (char **)&filter, &airmass, &ra, &dec, &exp_time, &background, (char **)&recipe, &p1_version, &p2_version)) {
    453453            exit(EXIT_FAILURE);
    454454        }
     
    486486        psS32           imfiles;
    487487        char            filter[256];
    488         char            class[256];
    489488        psF32           airmass;
    490         psF32           ra;
    491         psF32           dec;
     489        psF64           ra;
     490        psF64           dec;
    492491        psF32           exp_time;
     492        psF64           background;
    493493        char            recipe[256];
    494494        psS32           p2_version;
     
    500500        }
    501501
    502         if (!p3PendingExpPop(dbh, (char **)&exp_id, (char **)&camera, (char **)&exp_type, &imfiles, (char **)&filter, (char **)&class, &airmass, &ra, &dec, &exp_time, (char **)&recipe, &p2_version, &p3_version)) {
     502        if (!p3PendingExpPop(dbh, (char **)&exp_id, (char **)&camera, (char **)&exp_type, &imfiles, (char **)&filter, &airmass, &ra, &dec, &exp_time, &background, (char **)&recipe, &p2_version, &p3_version)) {
    503503            exit(EXIT_FAILURE);
    504504        }
     
    534534        psS32           imfiles;
    535535        char            filter[256];
    536         char            class[256];
    537536        psF32           airmass;
    538         psF32           ra;
    539         psF32           dec;
     537        psF64           ra;
     538        psF64           dec;
    540539        psF32           exp_time;
    541 
    542         dbh = psDBInit("localhost", "test", NULL, "test");
    543         if (!dbh) {
    544             exit(EXIT_FAILURE);
    545         }
    546 
    547         if (!detInputExpPop(dbh, &det_id, &iteration, (char **)&exp_id, (char **)&camera, (char **)&telescope, (char **)&exp_type, &imfiles, (char **)&filter, (char **)&class, &airmass, &ra, &dec, &exp_time)) {
     540        psF64           background;
     541
     542        dbh = psDBInit("localhost", "test", NULL, "test");
     543        if (!dbh) {
     544            exit(EXIT_FAILURE);
     545        }
     546
     547        if (!detInputExpPop(dbh, &det_id, &iteration, (char **)&exp_id, (char **)&camera, (char **)&telescope, (char **)&exp_type, &imfiles, (char **)&filter, &airmass, &ra, &dec, &exp_time, &background)) {
    548548            exit(EXIT_FAILURE);
    549549        }
Note: See TracChangeset for help on using the changeset viewer.