Changeset 6582 for branches/rel10_ifa/psModules/src/astrom/pmConceptsRead.c
- Timestamp:
- Mar 13, 2006, 11:50:51 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/rel10_ifa/psModules/src/astrom/pmConceptsRead.c
r6580 r6582 187 187 if (cell) { 188 188 pmHDU *hdu = pmHDUGetLowest(NULL, NULL, cell); // The HDU at the lowest level 189 if (! hdu) { 190 return false; 191 } 189 192 psMetadata *cameraFormat = hdu->format; // The camera format 190 193 psMetadata *cellConfig = cell->config; // The camera configuration for this cell … … 197 200 psMetadataItem *value = NULL; // The value of the concept 198 201 if (conceptItem) { 199 // Check the SOURCE 200 psString nameSource = NULL; // String with the concept name and ".SOURCE" added 201 psStringAppend(&nameSource, "%s.SOURCE", name); 202 bool mdok = true; // Status of MD lookup 203 psString source = psMetadataLookupStr(&mdok, cell->config, nameSource); // The source 204 if (mdok && strlen(source) > 0 && strcasecmp(source, "VALUE") == 0) { 205 value = psMemIncrRefCounter(conceptItem); 206 conceptParse(spec, value, cameraFormat, target, NULL, NULL, cell); 207 } else if (source && (strlen(source) == 0 || strcasecmp(source, "HEADER") != 0)) { 208 // We leave "HEADER" to pmConceptsReadFromHeader 209 psError(PS_ERR_IO, true, "%s isn't HEADER or VALUE --- can't read %s\n", source, name); 210 continue; 202 if (conceptItem->type == PS_DATA_STRING) { 203 // Check the SOURCE 204 psString nameSource = NULL; // String with the concept name and ".SOURCE" added 205 psStringAppend(&nameSource, "%s.SOURCE", name); 206 bool mdok = true; // Status of MD lookup 207 psString source = psMetadataLookupStr(&mdok, cell->config, nameSource); // The source 208 if (mdok && strlen(source) > 0 && strcasecmp(source, "VALUE") == 0) { 209 value = psMemIncrRefCounter(conceptItem); 210 conceptParse(spec, value, cameraFormat, target, NULL, NULL, cell); 211 } else if (source && (strlen(source) == 0 || strcasecmp(source, "HEADER") != 0)) { 212 // We leave "HEADER" to pmConceptsReadFromHeader 213 psError(PS_ERR_IO, true, "%s isn't HEADER or VALUE --- can't read %s\n", source, 214 name); 215 continue; 216 } 217 } else { 218 // Another type --- should be OK 219 conceptParse(spec, conceptItem, cameraFormat, target, NULL, NULL, cell); 211 220 } 212 221 } … … 227 236 { 228 237 pmHDU *hdu = pmHDUGetLowest(fpa, chip, cell); // The HDU at the lowest level 238 if (!hdu) { 239 return false; 240 } 229 241 psMetadata *cameraFormat = hdu->format; // The camera format 230 242 bool mdok = true; // Status of MD lookup … … 256 268 { 257 269 pmHDU *hdu = pmHDUGetLowest(fpa, chip, cell); // The HDU at the lowest level 270 if (!hdu) { 271 return false; 272 } 258 273 psMetadata *cameraFormat = hdu->format; // The camera format 259 274 bool mdok = true; // Status of MD lookup … … 324 339 { 325 340 pmHDU *hdu = pmHDUGetLowest(fpa, chip, cell); // The HDU at the lowest level 341 if (!hdu) { 342 return false; 343 } 326 344 psMetadata *cameraFormat = hdu->format; // The camera format 327 345 bool mdok = true; // Status of MD lookup
Note:
See TracChangeset
for help on using the changeset viewer.
