Changeset 31030 for trunk/ippToPsps/src/Batch.c
- Timestamp:
- Mar 23, 2011, 4:27:17 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/ippToPsps/src/Batch.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippToPsps/src/Batch.c
r31025 r31030 63 63 if (this->exitCode != PS_EXIT_SUCCESS) { 64 64 65 psError(PS_ERR_UNKNOWN, false, "Failed, so deleting fits file");65 this->logger->print(this->logger, MSG_ERROR, "Batch: Failed, so deleting fits file\n"); 66 66 this->fitsOut->delete(this->fitsOut); 67 67 } … … 105 105 if (file == NULL) { 106 106 107 psError(PS_ERR_UNKNOWN, false, "Unable to open file at %s", this->fitsInPath);107 this->logger->print(this->logger, MSG_ERROR, "Batch: Unable to open file at %s\n", this->fitsInPath); 108 108 return false; 109 109 } … … 113 113 while (fgets(line, 1000, file) != NULL) this->numOfInputFiles++; 114 114 115 printf ("Number of input files %d\n", this->numOfInputFiles);115 this->logger->print(this->logger, MSG_INFO, "Batch: %d input files found\n", this->numOfInputFiles); 116 116 117 117 if (this->numOfInputFiles < 1) return false; … … 156 156 if (!this->pmconfig) { 157 157 158 psError(PS_ERR_UNKNOWN, false, "Unable to read configuration.");158 this->logger->print(this->logger, MSG_ERROR, "Batch: Unable to read configuration\n"); 159 159 this->exitCode = PS_EXIT_CONFIG_ERROR; 160 160 return false; … … 220 220 221 221 // create an InitData object and get survey ID 222 this->initData = new_InitData(configsBaseDir );222 this->initData = new_InitData(configsBaseDir, this->logger); 223 223 if (strlen(this->surveyType) > 0 && 224 224 !this->initData->getSurveyId(this->initData, this->surveyType, &this->surveyID)) { … … 230 230 // create a FitsGenerator object 231 231 strcat(configsBaseDir, configsDir); 232 this->fitsGenerator = new_FitsGenerator( configsBaseDir);232 this->fitsGenerator = new_FitsGenerator(this->logger, configsBaseDir); 233 233 234 234 // create full FITS out path … … 236 236 237 237 // create an output FITS file 238 this->fitsOut = new_Fits(fitsOutPath );238 this->fitsOut = new_Fits(fitsOutPath, this->logger); 239 239 if (this->fitsOut->getFilePtr(this->fitsOut) == NULL) return false; 240 240 … … 306 306 Constructor. Takes a Batch object and initialises it. 307 307 */ 308 bool new_Batch(Batch *this) { 309 308 bool new_Batch(Logger* logger, Batch *this) { 309 310 this->logger = logger; 310 311 this->surveyID = -1; 311 312 this->resultsXmlDoc = NULL;
Note:
See TracChangeset
for help on using the changeset viewer.
