Changeset 31030 for trunk/ippToPsps/src/StackBatch.c
- Timestamp:
- Mar 23, 2011, 4:27:17 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/ippToPsps/src/StackBatch.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippToPsps/src/StackBatch.c
r31025 r31030 62 62 long unmatched = 0, totalDetections = 0, numOfDuplicates = 0, numInvalidFlux = 0, numDetectionsOut = 0; 63 63 64 this->base.logger->print(this->base.logger, MSG_INFO, 65 "+---------------+---------+----------+------------------+---------------+--------------+\n"); 66 this->base.logger->print(this->base.logger, MSG_INFO, 67 "| Extension | Rows in | Rows out | Missing from DVO | Duplicate IDs | Invalid Flux |\n"); 68 64 69 for (long s=0; s<nDet; s++) { 65 70 … … 102 107 103 108 } 104 psLogMsg("ippToPsps", PS_LOG_INFO, 105 "+---------------+---------+----------+------------------+---------------+--------------+\n" 106 "| Extension | Rows in | Rows out | Missing from DVO | Duplicate IDs | Invalid Flux |\n" 109 110 this->base.logger->print(this->base.logger, MSG_INFO, 107 111 "| %12s | %5ld | %5ld | %5ld | %5ld | %5ld |\n", 108 112 extensionName, nDet, numDetectionsOut, unmatched, numOfDuplicates, numInvalidFlux); 113 this->base.logger->print(this->base.logger, MSG_INFO, 114 "+---------------+---------+----------+------------------+---------------+--------------+\n"); 109 115 110 116 … … 315 321 316 322 // open input FITS file 317 Fits* fitsIn = existing_Fits(this->base.inputFiles[0] );323 Fits* fitsIn = existing_Fits(this->base.inputFiles[0], this->base.logger); 318 324 if (fitsIn->getFilePtr(fitsIn) == NULL) return PS_EXIT_SYS_ERROR; 319 325 … … 425 431 Constructor 426 432 */ 427 StackBatch* new_StackBatch(int *argc, char **argv) { 428 433 StackBatch* new_StackBatch(Logger* logger, int *argc, char **argv) { 434 435 logger->print(logger, MSG_DEBUG, "StackBatch: Constructor\n"); 429 436 StackBatch *this = (StackBatch*)calloc(1, sizeof(StackBatch)); 430 437 431 438 // call base-class constructor 432 if (!new_Batch(&this->base)) { 433 434 psError(PS_ERR_IO, false, "Unable to create Batch base-class object"); 435 return this; 436 } 439 new_Batch(logger, &this->base); 437 440 438 441 this->MAXDETECT = 150000; … … 455 458 psTimerStart("stackbatch"); 456 459 457 ippToPsps_VersionPrint();460 // ippToPsps_VersionPrint(); 458 461 459 462 int exitCode; 460 463 461 StackBatch* stackBatch = new_StackBatch(&argc, argv); 464 Logger* logger = new_Logger(NULL); 465 466 StackBatch* stackBatch = new_StackBatch(logger, &argc, argv); 462 467 stackBatch->base.run(stackBatch); 463 468 exitCode = stackBatch->base.exitCode; … … 467 472 double secs = psTimerMark("stackbatch"); 468 473 469 psLogMsg("stackbatch", 3, "stackbatch completed %ssuccessfully, with exit code %d, in %.1f %s\n",474 logger->print(logger, MSG_INFO, "stackbatch completed %ssuccessfully, with exit code %d, in %.1f %s\n", 470 475 (exitCode == PS_EXIT_SUCCESS) ? "" : "un", 471 476 exitCode, … … 476 481 psTimerStop(); 477 482 psLibFinalize(); 483 logger->destroy(logger); 478 484 479 485 return exitCode;
Note:
See TracChangeset
for help on using the changeset viewer.
