Changeset 6813
- Timestamp:
- Apr 7, 2006, 2:26:41 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/rel10_ifa/psModules/src/astrom/pmFPAConstruct.c
r6804 r6813 207 207 } 208 208 } 209 psFree(keywordsIter); 210 psFree(keywords); 209 211 psTrace(__func__, 5, "Looking up %s in the CONTENTS.\n", contentsKey); 210 212 const char *content = psMetadataLookupStr(&mdok, contents, contentsKey); … … 444 446 445 447 // Need to look up what chip we have. 446 const char *chipName = phuNameFromHeader("CHIP.NAME", formatSpec, phu);448 psString chipName = phuNameFromHeader("CHIP.NAME", formatSpec, phu); 447 449 psTrace(__func__, 5, "This is chip %s\n", chipName); 448 450 int chipNum = pmFPAFindChip(fpa, chipName); // Chip number … … 463 465 level = PM_FPA_LEVEL_CELL; 464 466 // Need to look up what cell we have. 465 const char *cellName = phuNameFromHeader("CELL.NAME", formatSpec, phu);467 psString cellName = phuNameFromHeader("CELL.NAME", formatSpec, phu); 466 468 int cellNum = pmChipFindCell(chip, cellName); // Cell number 467 469 if (cellNum == -1) { … … 472 474 cell = chip->cells->data[cellNum]; 473 475 view->cell = cellNum; 476 psFree(cellName); 474 477 } else { 475 478 psError(PS_ERR_IO, true, "PHU is not FPA, CHIP or CELL.\n"); … … 477 480 return NULL; 478 481 } 482 psFree(chipName); 479 483 480 484 processContents(fpa, chip, cell, phdu, level, content, format); … … 493 497 } else { 494 498 // Get the chip 495 const char *chipName = phuNameFromHeader("CHIP.NAME", formatSpec, phu); // Name of the chip499 psString chipName = phuNameFromHeader("CHIP.NAME", formatSpec, phu); // Name of the chip 496 500 int chipNum = pmFPAFindChip(fpa, chipName); // Chip number 497 501 if (chipNum == -1) { … … 506 510 addHDUtoChip(chip, phdu); 507 511 } else if (strcasecmp(phuType, "CELL") == 0) { 508 const char *cellName = phuNameFromHeader("CELL.NAME", formatSpec, phu); // Name of the cell512 psString cellName = phuNameFromHeader("CELL.NAME", formatSpec, phu); // Name of the cell 509 513 int cellNum = pmChipFindCell(chip, cellName); // Cell number 510 514 if (cellNum == -1) { … … 515 519 cell = chip->cells->data[cellNum]; // The specified cell 516 520 view->cell = cellNum; 521 psFree(cellName); 517 522 518 523 addHDUtoCell(cell, phdu); … … 522 527 return NULL; 523 528 } 529 psFree(chipName); 524 530 } 525 531 psFree(phdu);
Note:
See TracChangeset
for help on using the changeset viewer.
