Changeset 24776 for trunk/ppStats/src
- Timestamp:
- Jul 12, 2009, 3:19:50 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/ppStats/src/ppStatsLoop.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppStats/src/ppStatsLoop.c
r18168 r24776 19 19 psMetadata *newResults = psMetadataAlloc(); 20 20 21 // Iterate through the FPA 21 // check if we can legitimately iterate to the chip level 22 psArray *chips = fpa->chips; // Array of chips 23 if (view->chip >= chips->n) { 24 psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Desired chip view (%d) doesn't match " 25 "number of chips (%ld)\n", view->chip, chips->n); 26 return NULL; 27 } 28 29 // Iterate over chips (if view->chip is set, skip all others) 30 for (int i = 0; i < chips->n; i++) { 31 if ((view->chip >= 0) && (i != view->chip)) continue; 32 pmChip *chip = chips->data[i]; // Chip of interest 33 *result = ppStatsChip(newResults, chip, fits, view, data, config); 34 if (*result != PS_EXIT_SUCCESS) { 35 psError(PS_ERR_UNKNOWN, false, "trouble with stats for chip %d\n", i); 36 psFree (view); 37 psFree (newResults); 38 return NULL; 39 } 40 } 41 42 // Iterate through the FPA -- Do this after the chip since we in the SPLIT cases, we 43 // only populate the FPA concepts after chips have been read. 22 44 if (psListLength(data->headers) > 0 && fpa->hdu) { 23 45 if (fits && !pmFPAReadHeader(fpa, fits, config)) { … … 43 65 } 44 66 45 // check if we can legitimately iterate to the chip level46 psArray *chips = fpa->chips; // Array of chips47 if (view->chip >= chips->n) {48 psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Desired chip view (%d) doesn't match "49 "number of chips (%ld)\n", view->chip, chips->n);50 return NULL;51 }52 53 // Iterate over chips (if view->chip is set, skip all others)54 for (int i = 0; i < chips->n; i++) {55 if ((view->chip >= 0) && (i != view->chip)) continue;56 pmChip *chip = chips->data[i]; // Chip of interest57 *result = ppStatsChip(newResults, chip, fits, view, data, config);58 if (*result != PS_EXIT_SUCCESS) {59 psError(PS_ERR_UNKNOWN, false, "trouble with stats for chip %d\n", i);60 psFree (view);61 psFree (newResults);62 return NULL;63 }64 }65 66 67 if (fits) { 67 68 pmFPAFreeData(fpa);
Note:
See TracChangeset
for help on using the changeset viewer.
