IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

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

VERSION 0.0.7

File:
1 edited

Legend:

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

    r8026 r8079  
    244244        char            exp_type[256];
    245245        psS32           imfiles;
    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)) {
     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)) {
    253254            exit(EXIT_FAILURE);
    254255        }
     
    284285        psS32           imfiles;
    285286        char            filter[256];
    286         char            stats[256];
    287 
    288         dbh = psDBInit("localhost", "test", NULL, "test");
    289         if (!dbh) {
    290             exit(EXIT_FAILURE);
    291         }
    292 
    293         if (!rawDetrendExpPop(dbh, (char **)&exp_id, (char **)&camera, (char **)&telescope, (char **)&exp_type, &imfiles, (char **)&filter, (char **)&stats)) {
    294             exit(EXIT_FAILURE);
    295         }
    296 
    297         psDBCleanup(dbh);
    298     }
    299 
    300     {
    301         psDB            *dbh;
    302         char            exp_id[256];
    303         char            camera[256];
    304         char            telescope[256];
    305         char            exp_type[256];
    306         psS32           imfiles;
    307         char            filter[256];
    308         char            stats[256];
    309 
    310         dbh = psDBInit("localhost", "test", NULL, "test");
    311         if (!dbh) {
    312             exit(EXIT_FAILURE);
    313         }
    314 
    315         if (!rawScienceExpPop(dbh, (char **)&exp_id, (char **)&camera, (char **)&telescope, (char **)&exp_type, &imfiles, (char **)&filter, (char **)&stats)) {
     287        char            class[256];
     288        psF32           airmass;
     289        psF32           ra;
     290        psF32           dec;
     291        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)) {
     299            exit(EXIT_FAILURE);
     300        }
     301
     302        psDBCleanup(dbh);
     303    }
     304
     305    {
     306        psDB            *dbh;
     307        char            exp_id[256];
     308        char            camera[256];
     309        char            telescope[256];
     310        char            exp_type[256];
     311        psS32           imfiles;
     312        char            filter[256];
     313        char            class[256];
     314        psF32           airmass;
     315        psF32           ra;
     316        psF32           dec;
     317        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)) {
    316325            exit(EXIT_FAILURE);
    317326        }
     
    348357        psS32           imfiles;
    349358        char            filter[256];
    350         char            stats[256];
     359        char            class[256];
     360        psF32           airmass;
     361        psF32           ra;
     362        psF32           dec;
     363        psF32           exp_time;
    351364        char            recipe[256];
    352365        psS32           p1_version;
     
    357370        }
    358371
    359         if (!p1PendingExpPop(dbh, (char **)&exp_id, (char **)&camera, (char **)&telescope, (char **)&exp_type, &imfiles, (char **)&filter, (char **)&stats, (char **)&recipe, &p1_version)) {
    360             exit(EXIT_FAILURE);
    361         }
    362 
    363         psDBCleanup(dbh);
    364     }
    365 
    366     {
    367         psDB            *dbh;
    368         char            exp_id[256];
    369         char            camera[256];
    370         char            telescope[256];
    371         char            exp_type[256];
    372         psS32           imfiles;
    373         char            filter[256];
    374         char            stats[256];
     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;
    375392        char            recipe[256];
    376393        psS32           p1_version;
     
    382399        }
    383400
    384         if (!p2PendingExpPop(dbh, (char **)&exp_id, (char **)&camera, (char **)&telescope, (char **)&exp_type, &imfiles, (char **)&filter, (char **)&stats, (char **)&recipe, &p1_version, &p2_version)) {
     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)) {
    385402            exit(EXIT_FAILURE);
    386403        }
     
    419436        psS32           imfiles;
    420437        char            filter[256];
    421         char            stats[256];
     438        char            class[256];
     439        psF32           airmass;
     440        psF32           ra;
     441        psF32           dec;
     442        psF32           exp_time;
    422443        char            recipe[256];
    423444        psS32           p1_version;
     
    429450        }
    430451
    431         if (!p2DoneExpPop(dbh, (char **)&exp_id, (char **)&camera, (char **)&telescope, (char **)&exp_type, &imfiles, (char **)&filter, (char **)&stats, (char **)&recipe, &p1_version, &p2_version)) {
     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)) {
    432453            exit(EXIT_FAILURE);
    433454        }
     
    465486        psS32           imfiles;
    466487        char            filter[256];
    467         char            stats[256];
     488        char            class[256];
     489        psF32           airmass;
     490        psF32           ra;
     491        psF32           dec;
     492        psF32           exp_time;
    468493        char            recipe[256];
    469494        psS32           p2_version;
     
    475500        }
    476501
    477         if (!p3PendingExpPop(dbh, (char **)&exp_id, (char **)&camera, (char **)&exp_type, &imfiles, (char **)&filter, (char **)&stats, (char **)&recipe, &p2_version, &p3_version)) {
     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)) {
    478503            exit(EXIT_FAILURE);
    479504        }
     
    509534        psS32           imfiles;
    510535        char            filter[256];
    511         char            stats[256];
    512 
    513         dbh = psDBInit("localhost", "test", NULL, "test");
    514         if (!dbh) {
    515             exit(EXIT_FAILURE);
    516         }
    517 
    518         if (!detInputExpPop(dbh, &det_id, &iteration, (char **)&exp_id, (char **)&camera, (char **)&telescope, (char **)&exp_type, &imfiles, (char **)&filter, (char **)&stats)) {
     536        char            class[256];
     537        psF32           airmass;
     538        psF32           ra;
     539        psF32           dec;
     540        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)) {
    519548            exit(EXIT_FAILURE);
    520549        }
Note: See TracChangeset for help on using the changeset viewer.