Changeset 31033 for trunk/ippToPsps/src/DetectionBatch.c
- Timestamp:
- Mar 24, 2011, 11:03:32 AM (15 years ago)
- File:
-
- 1 edited
-
trunk/ippToPsps/src/DetectionBatch.c (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippToPsps/src/DetectionBatch.c
r31030 r31033 157 157 } 158 158 159 this->base.logger->print(this->base.logger, MSG_INFO, 159 this->base.logger->print(this->base.logger, MSG_INFO, "DetectionBatch", 160 160 "+-----------+---------+----------+----------------+--------------+--------------+\n"); 161 this->base.logger->print(this->base.logger, MSG_INFO, 161 this->base.logger->print(this->base.logger, MSG_INFO, "DetectionBatch", 162 162 "| Extension | Rows in | Rows out | Duplicate IDs | Invalid Flux | Bogus det ID |\n"); 163 163 … … 195 195 skylist = dvoSkyListByExternID(this->base.dvoConfig, sourceId, imageId, &image); 196 196 if (skylist == NULL) { 197 this->base.logger->print(this->base.logger, MSG_ERROR, 197 this->base.logger->print(this->base.logger, MSG_ERROR, "DetectionBatch", 198 198 "DVO: can't find SkyList for sourceId='%d' imageId='%d' (CCD = XY%s): skipping this chip\n", 199 199 sourceId, imageId, ccdNumber); … … 210 210 if (numDvoDetections > this->MAXDETECT ) { 211 211 212 this->base.logger->print(this->base.logger, MSG_ERROR, "Number of detections (%d) exceeds max limit (%ld)\n",212 this->base.logger->print(this->base.logger, MSG_ERROR, "DetectionBatch", "Number of detections (%d) exceeds max limit (%ld)\n", 213 213 numDvoDetections, this->MAXDETECT); 214 214 error = true; … … 375 375 } 376 376 377 this->base.logger->print(this->base.logger, MSG_INFO, 377 this->base.logger->print(this->base.logger, MSG_INFO, "DetectionBatch", 378 378 "| %s | %5ld | %5d | %5d | %5d | %5d |\n", 379 379 extensionName, nChipDetectionsIn, nChipDetectionsOut, numOfDuplicates, numInvalidFlux, numOfInvalidIppIDet); … … 388 388 } 389 389 390 this->base.logger->print(this->base.logger, MSG_INFO, 390 this->base.logger->print(this->base.logger, MSG_INFO, "DetectionBatch", 391 391 "+-----------+---------+----------+----------------+--------------+--------------+\n"); 392 392 393 this->base.logger->print(this->base.logger, MSG_INFO, " Total detections for this exposure = %ld\n", totalDetectionsOut);393 this->base.logger->print(this->base.logger, MSG_INFO, "DetectionBatch", "Total detections for this exposure = %ld\n", totalDetectionsOut); 394 394 395 395 // free-up memory … … 425 425 writeResults(this, minObjID, maxObjID, totalDetectionsOut); 426 426 427 this->base.logger->print(this->base.logger, MSG_INFO, "D ata written for a total of %d chips/OTAs", nOta);427 this->base.logger->print(this->base.logger, MSG_INFO, "DetectionBatch", "Data written for a total of %d chips/OTAs\n", nOta); 428 428 429 429 if (error || nOta < 1) this->base.exitCode = PS_EXIT_DATA_ERROR; … … 487 487 !haveExpName) { 488 488 489 this->base.logger->print(this->base.logger, MSG_ERROR, " Problem with supplied arguments\n");489 this->base.logger->print(this->base.logger, MSG_ERROR, "DetectionBatch", "Problem with supplied arguments\n"); 490 490 this->print(this); 491 491 this->base.exitCode = PS_EXIT_CONFIG_ERROR; … … 501 501 DetectionBatch* new_DetectionBatch(Logger* logger, int *argc, char **argv) { 502 502 503 logger->print(logger, MSG_DEBUG, "DetectionBatch :Constructor\n");503 logger->print(logger, MSG_DEBUG, "DetectionBatch", "Constructor\n"); 504 504 DetectionBatch *this = (DetectionBatch*)calloc(1, sizeof(DetectionBatch)); 505 505 … … 526 526 int main(int argc, char **argv) { 527 527 528 psTimerStart("detectionbatch");529 530 528 // ippToPsps_VersionPrint(); 531 529 532 int exitCode;533 534 530 Logger* logger = new_Logger(NULL); 531 logger->print(logger, MSG_INFO, "main", "Creating new detection batch\n"); 535 532 536 533 DetectionBatch* detectionBatch = new_DetectionBatch(logger, &argc, argv); 537 534 detectionBatch->base.run(detectionBatch); 538 exitCode = detectionBatch->base.exitCode;535 int exitCode = detectionBatch->base.exitCode; 539 536 540 537 detectionBatch->destroy(detectionBatch); 541 538 542 double secs = psTimerMark("detectionbatch");543 544 logger->print(logger, MSG_INFO, "detectionbatch completed %ssuccessfully, with exit code %d, in %.1f %s\n",545 (exitCode == PS_EXIT_SUCCESS) ? "" : "un",546 exitCode,547 (secs<60.0) ? secs : (secs/60.0),548 (secs<60.0) ? "sec(s)" : "min(s)");549 550 539 // tidy up 551 psTimerStop();552 540 psLibFinalize(); 553 541 logger->destroy(logger);
Note:
See TracChangeset
for help on using the changeset viewer.
