Changeset 27871 for trunk/ippToPsps/src/ippToPsps.c
- Timestamp:
- May 6, 2010, 11:40:28 AM (16 years ago)
- File:
-
- 1 edited
-
trunk/ippToPsps/src/ippToPsps.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippToPsps/src/ippToPsps.c
r27845 r27871 124 124 } 125 125 126 // the available IPP data products126 // the available IPP batch types for PSPS 127 127 typedef enum { 128 128 129 PRODUCT_TEST,130 PRODUCT_INIT,131 PRODUCT_DETECTION,132 PRODUCT_STACK,133 PRODUCT_DIFFERENCE,134 PRODUCT_UNDEFINED129 BATCH_TEST, 130 BATCH_INIT, 131 BATCH_DETECTION, 132 BATCH_STACK, 133 BATCH_DIFFERENCE, 134 BATCH_UNDEFINED 135 135 136 136 } ippProducts; … … 148 148 psMetadataAddStr(arguments, PS_LIST_TAIL, "-results", 0, "Path to results output", NULL); 149 149 psMetadataAddStr(arguments, PS_LIST_TAIL, "-config", 0, "Path to config dir", NULL); 150 psMetadataAddStr(arguments, PS_LIST_TAIL, "- product", 0, "Product type: [det|stack|diff]", NULL);150 psMetadataAddStr(arguments, PS_LIST_TAIL, "-batch", 0, "Product type: [det|stack|diff]", NULL); 151 151 152 152 bool ret = true; … … 165 165 this->fitsOutPath = psMemIncrRefCounter(psMetadataLookupStr(NULL, arguments, "-output")); 166 166 this->configsDir = psMemIncrRefCounter(psMetadataLookupStr(NULL, arguments, "-config")); 167 tmp = psMemIncrRefCounter(psMetadataLookupStr(NULL, arguments, "- product"));168 169 if (!tmp) this-> product = PRODUCT_UNDEFINED;170 else if (strcmp(tmp, "test") == 0) this-> product = PRODUCT_TEST;171 else if (strcmp(tmp, "init") == 0) this-> product = PRODUCT_INIT;172 else if (strcmp(tmp, "det") == 0) this-> product = PRODUCT_DETECTION;173 else if (strcmp(tmp, "stack") == 0) this-> product = PRODUCT_STACK;174 else if (strcmp(tmp, "diff") == 0) this-> product = PRODUCT_DIFFERENCE;175 else this-> product = PRODUCT_UNDEFINED;167 tmp = psMemIncrRefCounter(psMetadataLookupStr(NULL, arguments, "-batch")); 168 169 if (!tmp) this->batchType = BATCH_UNDEFINED; 170 else if (strcmp(tmp, "test") == 0) this->batchType = BATCH_TEST; 171 else if (strcmp(tmp, "init") == 0) this->batchType = BATCH_INIT; 172 else if (strcmp(tmp, "det") == 0) this->batchType = BATCH_DETECTION; 173 else if (strcmp(tmp, "stack") == 0) this->batchType = BATCH_STACK; 174 else if (strcmp(tmp, "diff") == 0) this->batchType = BATCH_DIFFERENCE; 175 else this->batchType = BATCH_UNDEFINED; 176 176 177 177 if ( 178 (this-> product != PRODUCT_INIT && !this->fitsInPath) ||179 (this-> product != PRODUCT_INIT && !this->resultsPath) ||180 (this-> product != PRODUCT_INIT && this->expId == -1) ||178 (this->batchType != BATCH_INIT && !this->fitsInPath) || 179 (this->batchType != BATCH_INIT && !this->resultsPath) || 180 (this->batchType != BATCH_INIT && this->expId == -1) || 181 181 !this->fitsOutPath || 182 182 !this->configsDir || 183 this-> product == PRODUCT_UNDEFINED ) {183 this->batchType == BATCH_UNDEFINED ) { 184 184 185 185 usage(this,argv[0], arguments); … … 199 199 if(this->exitCode == PS_EXIT_SUCCESS) { 200 200 201 // which product?202 switch(this-> product) {203 204 case PRODUCT_TEST:201 // which batchType? 202 switch(this->batchType) { 203 204 case BATCH_TEST: 205 205 this->exitCode = ippToPsps_batchTest(this); 206 206 break; 207 case PRODUCT_INIT:207 case BATCH_INIT: 208 208 this->exitCode = ippToPsps_batchInit(this); 209 209 break; 210 case PRODUCT_DETECTION:210 case BATCH_DETECTION: 211 211 this->exitCode = ippToPsps_batchDetection(this); 212 212 break; 213 case PRODUCT_STACK:213 case BATCH_STACK: 214 214 this->exitCode = ippToPsps_batchStack(this); 215 215 break; 216 case PRODUCT_DIFFERENCE:216 case BATCH_DIFFERENCE: 217 217 this->exitCode = ippToPsps_batchDifference(this); 218 218 break; 219 219 default: 220 psError(PS_ERR_UNKNOWN, false, "Unable to run for this product type (%d)", this->product);220 psError(PS_ERR_UNKNOWN, false, "Unable to run for this batch type (%d)", this->batchType); 221 221 this->exitCode = false; 222 222 break; … … 266 266 } 267 267 268 if (this-> product != PRODUCT_INIT && !ippToPsps_readInputFilePaths(this)) {268 if (this->batchType != BATCH_INIT && !ippToPsps_readInputFilePaths(this)) { 269 269 270 270 this->exitCode = PS_EXIT_DATA_ERROR; … … 272 272 } 273 273 274 if (this-> product == PRODUCT_TEST)274 if (this->batchType == BATCH_TEST) 275 275 psStringAppend(&this->configsDir, "/test"); 276 if (this-> product == PRODUCT_INIT)276 if (this->batchType == BATCH_INIT) 277 277 psStringAppend(&this->configsDir, "/init"); 278 if (this-> product == PRODUCT_DETECTION)278 if (this->batchType == BATCH_DETECTION) 279 279 psStringAppend(&this->configsDir, "/detection"); 280 if (this-> product == PRODUCT_DIFFERENCE)280 if (this->batchType == BATCH_DIFFERENCE) 281 281 psStringAppend(&this->configsDir, "/diff"); 282 if (this-> product == PRODUCT_STACK)282 if (this->batchType == BATCH_STACK) 283 283 psStringAppend(&this->configsDir, "/stack"); 284 284
Note:
See TracChangeset
for help on using the changeset viewer.
