IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 209


Ignore:
Timestamp:
Mar 10, 2004, 4:03:31 PM (22 years ago)
Author:
Paul Price
Message:

Expanded out the array declarations.
Added psCellPos, which is a psOTAPos.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/archive/pslib/include/psPosition.h

    r198 r209  
    3939/***********************************************************************************************************/
    4040
    41 /** A position on a detector */
     41/** A position on an OTA */
    4242typedef struct {
    4343    int chip;                           //!< Chip number
     
    5959/***********************************************************************************************************/
    6060
     61/** A position on a cell */
     62typedef psOTAPos psCellPos;             //!< Same thing as for an OTA.
     63#define psCellPosAlloc() psOTAPosAlloc() //!< Constructor
     64#define psCellPosFree(C) psOTAPosFree(C) //!< Destructor
     65
     66/***********************************************************************************************************/
     67
    6168/** An array of detector positions */
    62 PS_DECLARE_ARRAY_TYPE(psOTAPos);
    63 PS_CREATE_ARRAY_TYPE(psOTAPos);
     69typedef struct {
     70    enum psType type;                   //!< Type of data.  THIS STRUCT ELEMENT MUST BE FIRST IN THE STRUCT!
     71    int size;                           //!< Total number of elements available
     72    int n;                              //!< Number of elements in use
     73    psOTAPos *arr;                      //!< The array data
     74} psOTAPosArray;
     75
     76/** Constructor */
     77psOTAPosArray *psOTAPosArrayAlloc(int s, //!< Total number of elements to make available
     78                                  int n //!< Number of elements that will be used
     79    );
     80/** Reallocator */
     81psOTAPosArray *psOTAPosArrayRealloc(psOTAPosArray *myArray, //!< Array to reallocate
     82                                    int s       //!< Total number of elements to make available
     83    );
     84/** Destructor */
     85void psOTAPosArrayFree(psOTAPosArray *restrict myArray //!< Array to free
     86    );
    6487
    6588/***********************************************************************************************************/
     
    88111
    89112/** An array of sky positions */
    90 PS_DECLARE_ARRAY_TYPE(psSkyPos);
    91 PS_CREATE_ARRAY_TYPE(psSkyPos);
     113typedef struct {
     114    enum psType type;                   //!< Type of data.  THIS STRUCT ELEMENT MUST BE FIRST IN THE STRUCT!
     115    int size;                           //!< Total number of elements available
     116    int n;                              //!< Number of elements in use
     117    psSkyPos *arr;                      //!< The array data
     118} psSkyPosArray;
     119
     120/** Constructor */
     121psSkyPosArray *psSkyPosArrayAlloc(int s, //!< Total number of elements to make available
     122                                  int n //!< Number of elements that will be used
     123    );
     124/** Reallocator */
     125psSkyPosArray *psSkyPosArrayRealloc(psSkyPosArray *myArray, //!< Array to reallocate
     126                                    int s       //!< Total number of elements to make available
     127    );
     128/** Destructor */
     129void psSkyPosArrayFree(psSkyPosArray *restrict myArray //!< Array to free
     130    );
    92131
    93132/***********************************************************************************************************/
Note: See TracChangeset for help on using the changeset viewer.