IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 10, 2006, 3:34:31 PM (20 years ago)
Author:
jhoblitt
Message:

VERSION 0.0.25

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippdb/tests/pop.c

    r8266 r8283  
    283283        char            exp_type[256];
    284284        psS32           imfiles;
    285         char            filter[256];
    286         psF32           airmass;
    287         psF64           ra;
    288         psF64           decl;
    289         psF32           exp_time;
    290         psF64           background;
    291 
    292         dbh = psDBInit("localhost", "test", NULL, "test");
    293         if (!dbh) {
    294             exit(EXIT_FAILURE);
    295         }
    296 
    297         if (!rawDetrendExpPop(dbh, (char **)&exp_id, (char **)&camera, (char **)&telescope, (char **)&exp_type, &imfiles, (char **)&filter, &airmass, &ra, &decl, &exp_time, &background)) {
    298             exit(EXIT_FAILURE);
    299         }
    300 
    301         psDBCleanup(dbh);
    302     }
    303 
    304     {
    305         psDB            *dbh;
    306         char            exp_id[256];
    307         char            camera[256];
    308         char            telescope[256];
    309         char            exp_type[256];
    310         psS32           imfiles;
    311         char            filter[256];
    312         psF32           airmass;
    313         psF64           ra;
    314         psF64           decl;
    315         psF32           exp_time;
    316         psF64           background;
    317 
    318         dbh = psDBInit("localhost", "test", NULL, "test");
    319         if (!dbh) {
    320             exit(EXIT_FAILURE);
    321         }
    322 
    323         if (!rawScienceExpPop(dbh, (char **)&exp_id, (char **)&camera, (char **)&telescope, (char **)&exp_type, &imfiles, (char **)&filter, &airmass, &ra, &decl, &exp_time, &background)) {
    324             exit(EXIT_FAILURE);
    325         }
    326 
    327         psDBCleanup(dbh);
    328     }
    329 
    330     {
    331         psDB            *dbh;
    332         char            exp_id[256];
    333         char            class[256];
    334         char            class_id[256];
    335         char            uri[256];
    336285        char            filter[256];
    337286        psF32           airmass;
     
    352301        }
    353302
    354         if (!rawImfilePop(dbh, (char **)&exp_id, (char **)&class, (char **)&class_id, (char **)&uri, (char **)&filter, &airmass, &ra, &decl, &exp_time, &bg, &bg_stdev, &bg_mean_stdev, &alt, &az, &ccd_temp, &posang)) {
     303        if (!rawDetrendExpPop(dbh, (char **)&exp_id, (char **)&camera, (char **)&telescope, (char **)&exp_type, &imfiles, (char **)&filter, &airmass, &ra, &decl, &exp_time, &bg, &bg_stdev, &bg_mean_stdev, &alt, &az, &ccd_temp, &posang)) {
    355304            exit(EXIT_FAILURE);
    356305        }
     
    371320        psF64           decl;
    372321        psF32           exp_time;
    373         psF64           background;
    374         char            recipe[256];
    375         psS32           p1_version;
    376 
    377         dbh = psDBInit("localhost", "test", NULL, "test");
    378         if (!dbh) {
    379             exit(EXIT_FAILURE);
    380         }
    381 
    382         if (!p1PendingExpPop(dbh, (char **)&exp_id, (char **)&camera, (char **)&telescope, (char **)&exp_type, &imfiles, (char **)&filter, &airmass, &ra, &decl, &exp_time, &background, (char **)&recipe, &p1_version)) {
    383             exit(EXIT_FAILURE);
    384         }
    385 
    386         psDBCleanup(dbh);
    387     }
    388 
    389     {
    390         psDB            *dbh;
    391         char            exp_id[256];
    392         char            camera[256];
    393         char            telescope[256];
    394         char            exp_type[256];
    395         psS32           imfiles;
     322        psF64           bg;
     323        psF64           bg_stdev;
     324        psF64           bg_mean_stdev;
     325        psF64           alt;
     326        psF64           az;
     327        psF32           ccd_temp;
     328        psF64           posang;
     329
     330        dbh = psDBInit("localhost", "test", NULL, "test");
     331        if (!dbh) {
     332            exit(EXIT_FAILURE);
     333        }
     334
     335        if (!rawScienceExpPop(dbh, (char **)&exp_id, (char **)&camera, (char **)&telescope, (char **)&exp_type, &imfiles, (char **)&filter, &airmass, &ra, &decl, &exp_time, &bg, &bg_stdev, &bg_mean_stdev, &alt, &az, &ccd_temp, &posang)) {
     336            exit(EXIT_FAILURE);
     337        }
     338
     339        psDBCleanup(dbh);
     340    }
     341
     342    {
     343        psDB            *dbh;
     344        char            exp_id[256];
     345        char            class[256];
     346        char            class_id[256];
     347        char            uri[256];
    396348        char            filter[256];
    397349        psF32           airmass;
    398         psF32           ra;
    399         psF64           decl;
    400         psF64           exp_time;
    401         psF64           background;
     350        psF64           ra;
     351        psF64           decl;
     352        psF32           exp_time;
     353        psF64           bg;
     354        psF64           bg_stdev;
     355        psF64           bg_mean_stdev;
     356        psF64           alt;
     357        psF64           az;
     358        psF32           ccd_temp;
     359        psF64           posang;
     360
     361        dbh = psDBInit("localhost", "test", NULL, "test");
     362        if (!dbh) {
     363            exit(EXIT_FAILURE);
     364        }
     365
     366        if (!rawImfilePop(dbh, (char **)&exp_id, (char **)&class, (char **)&class_id, (char **)&uri, (char **)&filter, &airmass, &ra, &decl, &exp_time, &bg, &bg_stdev, &bg_mean_stdev, &alt, &az, &ccd_temp, &posang)) {
     367            exit(EXIT_FAILURE);
     368        }
     369
     370        psDBCleanup(dbh);
     371    }
     372
     373    {
     374        psDB            *dbh;
     375        char            exp_id[256];
     376        char            recipe[256];
     377        psS32           p1_version;
     378
     379        dbh = psDBInit("localhost", "test", NULL, "test");
     380        if (!dbh) {
     381            exit(EXIT_FAILURE);
     382        }
     383
     384        if (!p1PendingExpPop(dbh, (char **)&exp_id, (char **)&recipe, &p1_version)) {
     385            exit(EXIT_FAILURE);
     386        }
     387
     388        psDBCleanup(dbh);
     389    }
     390
     391    {
     392        psDB            *dbh;
     393        char            exp_id[256];
    402394        char            recipe[256];
    403395        psS32           p1_version;
     
    409401        }
    410402
    411         if (!p2PendingExpPop(dbh, (char **)&exp_id, (char **)&camera, (char **)&telescope, (char **)&exp_type, &imfiles, (char **)&filter, &airmass, &ra, &decl, &exp_time, &background, (char **)&recipe, &p1_version, &p2_version)) {
     403        if (!p2PendingExpPop(dbh, (char **)&exp_id, (char **)&recipe, &p1_version, &p2_version)) {
    412404            exit(EXIT_FAILURE);
    413405        }
     
    440432        psDB            *dbh;
    441433        char            exp_id[256];
    442         char            camera[256];
    443         char            telescope[256];
    444         char            exp_type[256];
    445         psS32           imfiles;
    446         char            filter[256];
    447         psF32           airmass;
    448         psF64           ra;
    449         psF64           decl;
    450         psF32           exp_time;
    451         psF64           background;
    452434        char            recipe[256];
    453435        psS32           p1_version;
     
    459441        }
    460442
    461         if (!p2DoneExpPop(dbh, (char **)&exp_id, (char **)&camera, (char **)&telescope, (char **)&exp_type, &imfiles, (char **)&filter, &airmass, &ra, &decl, &exp_time, &background, (char **)&recipe, &p1_version, &p2_version)) {
     443        if (!p2DoneExpPop(dbh, (char **)&exp_id, (char **)&recipe, &p1_version, &p2_version)) {
    462444            exit(EXIT_FAILURE);
    463445        }
     
    490472        psDB            *dbh;
    491473        char            exp_id[256];
    492         char            camera[256];
    493         char            exp_type[256];
    494         psS32           imfiles;
    495         char            filter[256];
    496         psF32           airmass;
    497         psF64           ra;
    498         psF64           decl;
    499         psF32           exp_time;
    500         psF64           background;
    501474        char            recipe[256];
    502475        psS32           p2_version;
     
    508481        }
    509482
    510         if (!p3PendingExpPop(dbh, (char **)&exp_id, (char **)&camera, (char **)&exp_type, &imfiles, (char **)&filter, &airmass, &ra, &decl, &exp_time, &background, (char **)&recipe, &p2_version, &p3_version)) {
     483        if (!p3PendingExpPop(dbh, (char **)&exp_id, (char **)&recipe, &p2_version, &p3_version)) {
    511484            exit(EXIT_FAILURE);
    512485        }
     
    537510        psS32           iteration;
    538511        char            exp_id[256];
    539         char            camera[256];
    540         char            telescope[256];
    541         char            exp_type[256];
    542         psS32           imfiles;
    543         char            filter[256];
    544         psF32           airmass;
    545         psF64           ra;
    546         psF64           decl;
    547         psF32           exp_time;
    548         psF64           background;
    549 
    550         dbh = psDBInit("localhost", "test", NULL, "test");
    551         if (!dbh) {
    552             exit(EXIT_FAILURE);
    553         }
    554 
    555         if (!detInputExpPop(dbh, &det_id, &iteration, (char **)&exp_id, (char **)&camera, (char **)&telescope, (char **)&exp_type, &imfiles, (char **)&filter, &airmass, &ra, &decl, &exp_time, &background)) {
     512        bool            include;
     513        bool            accept;
     514
     515        dbh = psDBInit("localhost", "test", NULL, "test");
     516        if (!dbh) {
     517            exit(EXIT_FAILURE);
     518        }
     519
     520        if (!detInputExpPop(dbh, &det_id, &iteration, (char **)&exp_id, &include, &accept)) {
    556521            exit(EXIT_FAILURE);
    557522        }
Note: See TracChangeset for help on using the changeset viewer.