Changeset 15973
- Timestamp:
- Jan 2, 2008, 10:33:41 AM (18 years ago)
- Location:
- trunk/psModules/src/camera
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/camera/pmFPA.c
r14933 r15973 271 271 } 272 272 273 bool psMemCheckReadout(psPtr ptr) 274 { 275 PS_ASSERT_PTR(ptr, false); 276 return ( psMemGetDeallocator(ptr) == (psFreeFunc) readoutFree); 277 } 278 279 273 280 pmCell *pmCellAlloc( 274 281 pmChip *chip, 275 const char *name 276 ) 282 const char *name) 277 283 { 278 284 pmCell *tmpCell = (pmCell *) psAlloc(sizeof(pmCell)); … … 301 307 } 302 308 309 bool psMemCheckCell(psPtr ptr) 310 { 311 PS_ASSERT_PTR(ptr, false); 312 return ( psMemGetDeallocator(ptr) == (psFreeFunc) cellFree); 313 } 314 315 303 316 pmChip *pmChipAlloc( 304 317 pmFPA *fpa, … … 334 347 } 335 348 349 bool psMemCheckChip(psPtr ptr) 350 { 351 PS_ASSERT_PTR(ptr, false); 352 return ( psMemGetDeallocator(ptr) == (psFreeFunc) chipFree); 353 } 354 336 355 pmFPA *pmFPAAlloc(const psMetadata *camera) 337 356 { … … 347 366 348 367 tmpFPA->analysis = psMetadataAlloc(); 349 tmpFPA->camera = psMemIncrRefCounter((psPtr) camera);368 tmpFPA->camera = psMemIncrRefCounter((psPtr) camera); 350 369 tmpFPA->chips = psArrayAlloc(0); 351 370 tmpFPA->hdu = NULL; … … 357 376 return tmpFPA; 358 377 } 378 379 bool psMemCheckFPA(psPtr ptr) 380 { 381 PS_ASSERT_PTR(ptr, false); 382 return ( psMemGetDeallocator(ptr) == (psFreeFunc) FPAFree); 383 } 384 359 385 360 386 // Check a cell to ensure that all component readouts have the parent pointer set correctly … … 402 428 psBool pmFPACheckParents(pmFPA *fpa) 403 429 { 404 PS_ASSERT_PTR_NON_NULL(fpa, true);430 PS_ASSERT_PTR_NON_NULL(fpa, false); 405 431 406 432 bool flag = true; -
trunk/psModules/src/camera/pmFPA.h
r14954 r15973 6 6 * @author Eugene Magnier, IfA 7 7 * 8 * @version $Revision: 1.1 8$ $Name: not supported by cvs2svn $9 * @date $Date: 200 7-09-21 01:31:51$8 * @version $Revision: 1.19 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2008-01-02 20:32:25 $ 10 10 * Copyright 2005-2006 Institute for Astronomy, University of Hawaii 11 11 */ … … 144 144 145 145 /// Free all readouts within a cell 146 void pmCellFreeReadouts(pmCell *cell ///< Cell for which to free readouts 147 ); 146 void pmCellFreeReadouts(pmCell *cell); ///< Cell for which to free readouts 148 147 149 148 /// Free all cells within a chip 150 void pmChipFreeCells(pmChip *chip ///< Chip for which to free cells 151 ); 149 void pmChipFreeCells(pmChip *chip); ///< Chip for which to free cells 152 150 153 151 /// Free all data within a readout 154 void pmReadoutFreeData(pmReadout *readout ///< Readout for which to free data 155 ); 152 void pmReadoutFreeData(pmReadout *readout); ///< Readout for which to free data 156 153 157 154 /// Free all data within a cell (all readouts as well as metadata) 158 void pmCellFreeData(pmCell *cell ///< Cell for which to free data 159 ); 155 void pmCellFreeData(pmCell *cell); ///< Cell for which to free data 160 156 161 157 /// Free all data within a chip (all cells as well as metadata) 162 void pmChipFreeData(pmChip *chip ///< Chip for which to free data 163 ); 158 void pmChipFreeData(pmChip *chip); ///< Chip for which to free data 164 159 165 160 /// Free all data within an FPA (all chips as well as metadata) 166 void pmFPAFreeData(pmFPA *fpa ///< FPA for which to free data 167 ); 161 void pmFPAFreeData(pmFPA *fpa); ///< FPA for which to free data 168 162 169 163 /// Allocate a readout associated with a cell 170 pmReadout *pmReadoutAlloc(pmCell *cell ///< Parent cell, or NULL171 );164 pmReadout *pmReadoutAlloc(pmCell *cell); ///< Parent cell, or NULL 165 bool psMemCheckReadout(psPtr ptr); 172 166 173 167 /// Allocate a cell associated with a chip … … 175 169 /// The name is used to set CELL.NAME within the concepts. 176 170 pmCell *pmCellAlloc(pmChip *chip, ///< Parent chip, or NULL 177 const char *name ///< Name of cell, for CELL.NAME 178 ); 171 const char *name); ///< Name of cell, for CELL.NAME 172 bool psMemCheckCell(psPtr ptr); 173 179 174 180 175 /// Allocate a chip associated with an FPA … … 182 177 /// The name is used to set CHIP.NAME within the concepts 183 178 pmChip *pmChipAlloc(pmFPA *fpa, ///< Parent FPA, or NULL 184 const char *name ///< Name of chip, for CHIP.NAME 185 ); 179 const char *name); ///< Name of chip, for CHIP.NAME 180 bool psMemCheckChip(psPtr ptr); 181 186 182 187 183 /// Allocate an FPA 188 pmFPA *pmFPAAlloc(const psMetadata *camera ///< Camera configuration (to store in FPA) 189 ); 190 184 pmFPA *pmFPAAlloc(const psMetadata *camera); ///< Camera configuration (to store in FPA) 185 bool psMemCheckFPA(psPtr ptr); 191 186 192 187 /// Check parent links within an FPA … … 194 189 /// Iterates through the FPA to verify that the "parent" links in the chip, cell and readout are set 195 190 /// correctly. If there are any incorrect links, they are fixed, and the function returns false. 196 bool pmFPACheckParents(pmFPA *fpa ///< FPA to check197 ); 191 bool pmFPACheckParents(pmFPA *fpa); ///< FPA to check 192 198 193 /// @} 199 194 #endif // #ifndef PM_FPA_H -
trunk/psModules/src/camera/pmHDU.c
r15477 r15973 73 73 return hdu; 74 74 } 75 76 bool psMemCheckHDU(psPtr ptr) 77 { 78 PS_ASSERT_PTR(ptr, false); 79 return ( psMemGetDeallocator(ptr) == (psFreeFunc) hduFree); 80 } 81 75 82 76 83 bool pmHDUReadHeader(pmHDU *hdu, psFits *fits) -
trunk/psModules/src/camera/pmHDU.h
r11253 r15973 4 4 * @author Paul Price, IfA 5 5 * 6 * @version $Revision: 1. 7$ $Name: not supported by cvs2svn $7 * @date $Date: 200 7-01-24 02:54:14$6 * @version $Revision: 1.8 $ $Name: not supported by cvs2svn $ 7 * @date $Date: 2008-01-02 20:33:41 $ 8 8 * Copyright 2005-2006 Institute for Astronomy, University of Hawaii 9 9 */ … … 33 33 34 34 /// Allocator for pmHDU 35 pmHDU *pmHDUAlloc(const char *extname ///< Extension name, or NULL for PHU36 );35 pmHDU *pmHDUAlloc(const char *extname); ///< Extension name, or NULL for PHU 36 bool psMemCheckHDU(psPtr ptr); 37 37 38 38 /// Read the HDU header only
Note:
See TracChangeset
for help on using the changeset viewer.
