Changeset 8079 for branches/jhoblitt/ippdb/tests/pop.c
- Timestamp:
- Aug 2, 2006, 2:47:23 PM (20 years ago)
- File:
-
- 1 edited
-
branches/jhoblitt/ippdb/tests/pop.c (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/jhoblitt/ippdb/tests/pop.c
r8026 r8079 244 244 char exp_type[256]; 245 245 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)) { 253 254 exit(EXIT_FAILURE); 254 255 } … … 284 285 psS32 imfiles; 285 286 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)) { 316 325 exit(EXIT_FAILURE); 317 326 } … … 348 357 psS32 imfiles; 349 358 char filter[256]; 350 char stats[256]; 359 char class[256]; 360 psF32 airmass; 361 psF32 ra; 362 psF32 dec; 363 psF32 exp_time; 351 364 char recipe[256]; 352 365 psS32 p1_version; … … 357 370 } 358 371 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; 375 392 char recipe[256]; 376 393 psS32 p1_version; … … 382 399 } 383 400 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)) { 385 402 exit(EXIT_FAILURE); 386 403 } … … 419 436 psS32 imfiles; 420 437 char filter[256]; 421 char stats[256]; 438 char class[256]; 439 psF32 airmass; 440 psF32 ra; 441 psF32 dec; 442 psF32 exp_time; 422 443 char recipe[256]; 423 444 psS32 p1_version; … … 429 450 } 430 451 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)) { 432 453 exit(EXIT_FAILURE); 433 454 } … … 465 486 psS32 imfiles; 466 487 char filter[256]; 467 char stats[256]; 488 char class[256]; 489 psF32 airmass; 490 psF32 ra; 491 psF32 dec; 492 psF32 exp_time; 468 493 char recipe[256]; 469 494 psS32 p2_version; … … 475 500 } 476 501 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)) { 478 503 exit(EXIT_FAILURE); 479 504 } … … 509 534 psS32 imfiles; 510 535 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)) { 519 548 exit(EXIT_FAILURE); 520 549 }
Note:
See TracChangeset
for help on using the changeset viewer.
