Changeset 7931
- Timestamp:
- Jul 18, 2006, 10:27:37 AM (20 years ago)
- File:
-
- 1 edited
-
trunk/ppStats/src/ppStatsLoop.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppStats/src/ppStatsLoop.c
r7924 r7931 59 59 // Iterate through the FPA 60 60 pmFPA *fpa = data->inFPA; // The FPA of interest 61 if (psListLength(data->headers) > 0 && fpa->hdu && pmFPAReadHeader(fpa, data->inFile)) { 61 if (psListLength(data->headers) > 0 && fpa->hdu) { 62 pmFPAReadHeader(fpa, data->inFile); 62 63 pmHDU *hdu = fpa->hdu; // HDU for headers 63 64 getMetadata(fpaResults, hdu->header, headersIter); 64 65 } 65 if (psListLength(data->concepts) > 0 && 66 pmConceptsReadFPA(fpa, PM_CONCEPT_SOURCE_ALL, false, config->database)) { 66 if (psListLength(data->concepts) > 0) { 67 pmFPAReadHeader(fpa, data->inFile); 68 pmConceptsReadFPA(fpa, PM_CONCEPT_SOURCE_ALL, false, config->database); 67 69 getMetadata(fpaResults, fpa->concepts, conceptsIter); 68 70 } … … 83 85 psMetadata *chipResults = psMetadataAlloc(); // Metadata to hold the chip-level results 84 86 85 if (psListLength(data->headers) > 0 && chip->hdu && pmChipReadHeader(chip, data->inFile)) { 87 if (psListLength(data->headers) > 0 && chip->hdu) { 88 pmChipReadHeader(chip, data->inFile); 86 89 pmHDU *hdu = chip->hdu; // HDU for headers 87 90 getMetadata(chipResults, hdu->header, headersIter); 88 91 } 89 if (psListLength(data->concepts) > 0 && 90 pmConceptsReadChip(chip, PM_CONCEPT_SOURCE_ALL, false, false, config->database)) { 92 if (psListLength(data->concepts) > 0) { 93 pmChipReadHeader(chip, data->inFile); 94 pmConceptsReadChip(chip, PM_CONCEPT_SOURCE_ALL, false, false, config->database); 91 95 getMetadata(chipResults, chip->concepts, conceptsIter); 92 96 } … … 107 111 psMetadata *cellResults = psMetadataAlloc(); // Metadata to hold the cell-level results 108 112 109 if (psListLength(data->headers) > 0 && cell->hdu && pmCellReadHeader(cell, data->inFile)) { 113 if (psListLength(data->headers) > 0 && cell->hdu) { 114 pmCellReadHeader(cell, data->inFile); 110 115 pmHDU *hdu = cell->hdu; // HDU for headers 111 116 getMetadata(cellResults, hdu->header, headersIter); 112 psMetadataAdd(chipResults, PS_LIST_TAIL, cellName, PS_DATA_METADATA, 113 "Results for cell", cellResults); 114 } 115 if (psListLength(data->concepts) > 0 && 116 pmConceptsReadCell(cell, PM_CONCEPT_SOURCE_ALL, false, config->database)) { 117 } 118 if (psListLength(data->concepts) > 0) { 119 pmCellReadHeader(cell, data->inFile); 120 pmConceptsReadCell(cell, PM_CONCEPT_SOURCE_ALL, false, config->database); 117 121 getMetadata(cellResults, cell->concepts, conceptsIter); 118 122 } … … 120 124 if (!data->doStats) { 121 125 // Nothing further to do --- don't want to waste our time reading the data 126 if (psListLength(cellResults->list) > 0) { 127 psMetadataAdd(chipResults, PS_LIST_TAIL, cellName, PS_DATA_METADATA, 128 "Results for cell", cellResults); 129 } 122 130 continue; 123 131 } … … 213 221 WRITE_STAT(PS_STAT_CLIPPED_STDEV, "CLIPPED_STDEV", clippedStdev); 214 222 215 // If we didn't add it before, add it now 216 if (!psMetadataLookup(chipResults, cellName)) { 217 psMetadataAdd(chipResults, PS_LIST_TAIL, cellName, PS_DATA_METADATA, 218 "Results for cell", cellResults); 219 } 223 // Add the cell results to the chip 224 psMetadataAdd(chipResults, PS_LIST_TAIL, cellName, PS_DATA_METADATA, 225 "Results for cell", cellResults); 220 226 221 227 psFree(cellResults);
Note:
See TracChangeset
for help on using the changeset viewer.
