#include "Obit.h"
#include "ObitErr.h"
#include "ObitThread.h"
#include "ObitInfoList.h"
#include "ObitIO.h"
#include "ObitTableList.h"
#include "ObitHistory.h"
#include "ObitDef.h"
#include "ObitClassDef.h"
Go to the source code of this file.
Classes | |
| struct | ObitData |
| ObitData Class structure. More... | |
| struct | ObitDataClassInfo |
| ClassInfo Structure. More... | |
Defines | |
| #define | ObitDataUnref(in) ObitUnref (in) |
| Macro to unreference (and possibly destroy) an ObitData returns a ObitData*. | |
| #define | ObitDataRef(in) ObitRef (in) |
| Macro to reference (update reference count) an ObitData. | |
| #define | ObitDataIsA(in) ObitIsA (in, ObitDataGetClass()) |
| Macro to determine if an object is the member of this or a derived class. | |
| #define | ObitDataSetFITS(in, disk, file, err) |
| Convenience Macro to define ObitData I/O to a FITS file. | |
| #define | ObitDataSetAIPS(in, disk, cno, user, err) |
| Convenience Macro to define ObitData I/O to an AIPS file. | |
Typedefs | |
| typedef ObitData *(* | newObitDataScratchFP )(ObitData *in, ObitErr *err) |
| typedef void(* | ObitDataFullInstantiateFP )(ObitData *in, gboolean exist, ObitErr *err) |
| typedef void(* | ObitDataRenameFP )(ObitData *in, ObitErr *err) |
| typedef ObitData *(* | ObitDataZapFP )(ObitData *in, ObitErr *err) |
| typedef ObitData *(* | ObitDataCopyFP )(ObitData *in, ObitData *out, ObitErr *err) |
| typedef void(* | ObitDataCloneFP )(ObitData *in, ObitData *out, ObitErr *err) |
| typedef gboolean(* | ObitDataSameFP )(ObitData *in1, ObitData *in2, ObitErr *err) |
| typedef void(* | ObitDataSetupIOFP )(ObitData *in, ObitErr *err) |
| typedef ObitIOCode(* | ObitDataOpenFP )(ObitData *in, ObitIOAccess access, ObitErr *err) |
| Typedef for definition of class pointer structure. | |
| typedef ObitIOCode(* | ObitDataCloseFP )(ObitData *in, ObitErr *err) |
| typedef ObitIOCode(* | ObitDataIOSetFP )(ObitData *in, ObitErr *err) |
| typedef ObitTable *(* | newObitDataTableFP )(ObitData *in, ObitIOAccess access, gchar *tabType, glong *tabver, ObitErr *err) |
| typedef ObitHistory *(* | newObitDataHistoryFP )(ObitData *in, ObitIOAccess access, ObitErr *err) |
| typedef ObitIOCode(* | ObitDataZapTableFP )(ObitData *in, gchar *tabType, glong tabVer, ObitErr *err) |
| typedef ObitIOCode(* | ObitDataCopyTablesFP )(ObitData *in, ObitData *out, gchar **exclude, gchar **include, ObitErr *err) |
| typedef ObitIOCode(* | ObitDataUpdateTablesFP )(ObitData *in, ObitErr *err) |
| typedef void(* | ObitDataCopyTableFP )(ObitData *in, ObitData *out, gchar *tabType, glong *inver, glong *outver, ObitErr *err) |
| typedef void(* | ObitDataWriteKeywordFP )(ObitData *in, gchar *name, ObitInfoType type, gint32 *dim, gconstpointer data, ObitErr *err) |
| typedef void(* | ObitDataReadKeywordFP )(ObitData *in, gchar *name, ObitInfoType *type, gint32 *dim, gpointer data, ObitErr *err) |
Functions | |
| void | ObitDataClassInit (void) |
| Public: Class initializer. | |
| ObitData * | newObitData (gchar *name) |
| Public: Constructor. | |
| ObitData * | newObitDataScratch (ObitData *in, ObitErr *err) |
| Public: Copy Constructor for scratch file. | |
| void | ObitDataFullInstantiate (ObitData *in, gboolean exist, ObitErr *err) |
| Public: Fully instantiate. | |
| gconstpointer | ObitDataGetClass (void) |
| Public: ClassInfo pointer. | |
| void | ObitDataRename (ObitData *in, ObitErr *err) |
| Public: Rename underlying structures. | |
| ObitData * | ObitDataZap (ObitData *in, ObitErr *err) |
| Public: Delete underlying structures. | |
| ObitData * | ObitDataCopy (ObitData *in, ObitData *out, ObitErr *err) |
| Public: Copy (deep) constructor. | |
| void | ObitDataClone (ObitData *in, ObitData *out, ObitErr *err) |
| Public: Copy structure. | |
| gboolean | ObitDataSame (ObitData *in1, ObitData *in2, ObitErr *err) |
| Public: Do two ObitDatas have the same underlying structures?. | |
| void | ObitDataSetupIO (ObitData *in, ObitErr *err) |
| Public: Assign/Initialize IO member. | |
| ObitIOCode | ObitDataOpen (ObitData *in, ObitIOAccess access, ObitErr *err) |
| Public: Create ObitIO structures and open file. | |
| ObitIOCode | ObitDataClose (ObitData *in, ObitErr *err) |
| Public: Close file and become inactive. | |
| ObitIOCode | ObitDataIOSet (ObitData *in, ObitErr *err) |
| Public: Reset IO to start of file. | |
| ObitTable * | newObitDataTable (ObitData *in, ObitIOAccess access, gchar *tabType, glong *tabver, ObitErr *err) |
| Public: Return an associated Table. | |
| ObitHistory * | newObitDataHistory (ObitData *in, ObitIOAccess access, ObitErr *err) |
| Public: Return an associated History. | |
| ObitIOCode | ObitDataZapTable (ObitData *in, gchar *tabType, glong tabVer, ObitErr *err) |
| Public: Destroy an associated Table. | |
| ObitIOCode | ObitDataCopyTables (ObitData *in, ObitData *out, gchar **exclude, gchar **include, ObitErr *err) |
| Public: Copy associated Tables. | |
| ObitIOCode | ObitDataUpdateTables (ObitData *in, ObitErr *err) |
| Public: Update disk resident tables information. | |
| void | ObitDataCopyTable (ObitData *in, ObitData *out, gchar *tabType, glong *inver, glong *outver, ObitErr *err) |
| Public: Copy a given table from one ObitData to another. | |
| void | ObitDataWriteKeyword (ObitData *in, gchar *name, ObitInfoType type, gint32 *dim, gconstpointer data, ObitErr *err) |
| Public: Write header keyword. | |
| void | ObitDataReadKeyword (ObitData *in, gchar *name, ObitInfoType *type, gint32 *dim, gpointer data, ObitErr *err) |
| Public: Read header keyword. | |
This class is derived from the Obit class.
This class is the virtual base class for Obit data. The derived classes are data access objects which allow access to potentially, multiple data structures and present a uniform internal representation. There maybe (usually are) associated tables which either describe the data or contain calibration and/or editing information. These associated tables are listed in an ObitTableList member and the newObitDataTable function allows access to these tables. ObitData is a derived class from class Obit.
Generally ObitData objects will be of derived class but a generic ObitData will allow access to tables but not the main file data or descriptor.
A copy of a pointer to an ObitData should always be made using the Obit?Ref function which updates the reference count in the object. Then whenever freeing an ObitUV or changing a pointer, the function Obit?Unref will decrement the reference count and destroy the object when the reference count hits 0. There is no explicit destructor.
|
|
Macro to determine if an object is the member of this or a derived class. Returns TRUE if a member, else FALSE in = object to reference |
|
|
Macro to reference (update reference count) an ObitData. returns a ObitData*. in = object to reference |
|
|
Value: G_STMT_START{ \
in->info->dim[0]=1; in->info->dim[1]=1; in->info->dim[2]=1; \
in->info->dim[3]=1; in->info->dim[4]=1; \
in->info->work[0] = OBIT_IO_AIPS; \
ObitInfoListPut (in->info, "FileType", OBIT_int, \
in->info->dim, (gpointer)&in->info->work[0], err);\
in->info->dim[0] = 1; \
ObitInfoListPut (in->info, "Disk", OBIT_int, \
in->info->dim, (gpointer)&disk, err); \
ObitInfoListPut (in->info, "DISK", OBIT_int, \
in->info->dim, (gpointer)&disk, err); \
ObitInfoListPut (in->info, "CNO", OBIT_int, \
in->info->dim, (gpointer)&cno, err); \
ObitInfoListPut (in->info, "User", OBIT_int, \
in->info->dim, (gpointer)&user, err); \
}G_STMT_END
Sets values on ObitInfoList on input object. |
|
|
Value: G_STMT_START{ \
in->info->dim[0]=1; in->info->dim[1]=1; in->info->dim[2]=1; \
in->info->dim[3]=1; in->info->dim[4]=1; \
in->info->work[0] = OBIT_IO_FITS; \
ObitInfoListPut (in->info, "FileType", OBIT_int, \
in->info->dim, (gpointer)&in->info->work[0], err);\
in->info->dim[0] = 1; \
ObitInfoListPut (in->info, "Disk", OBIT_int, \
in->info->dim, (gpointer)&in->info->work[2], err); \
in->info->dim[0] = strlen(file); \
ObitInfoListPut (in->info, "FileName", OBIT_string, \
in->info->dim, (gpointer)file, err); \
}G_STMT_END
Sets values on ObitInfoList on input object. |
|
|
Macro to unreference (and possibly destroy) an ObitData returns a ObitData*. in = object to unreference |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Typedef for definition of class pointer structure.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Public: Constructor. A generic ObitData object allows access to tables byt not the main data Initializes class if needed on first call.
|
|
||||||||||||||||
|
Public: Return an associated History. If such an object exists, a reference to it is returned, else a new object is created and if access=OBIT_IO_WriteOnly entered in the ObitTableList if appropriate (AIPS)
|
|
||||||||||||
|
Public: Copy Constructor for scratch file. A scratch Data is more or less the same as a normal Data except that it is automatically deleted on the final unreference. The output will have the underlying files of the same type as in already allocated. Virtual - calls actual class member; not supported for Generic ObitData
|
|
||||||||||||||||||||||||
|
Public: Return an associated Table. If such an object exists, a reference to it is returned, else a new object is created and entered in the ObitTableList.
|
|
|
Public: Class initializer.
|
|
||||||||||||||||
|
Public: Copy structure. Virtual - calls actual class member; not supported for Generic ObitData
|
|
||||||||||||
|
Public: Close file and become inactive. Virtual - calls actual class member
|
|
||||||||||||||||
|
Public: Copy (deep) constructor. Copies are made of complex members including disk files; these will be copied applying whatever selection is associated with the input. Objects should be closed on input and will be closed on output. In order for the disk file structures to be copied, the output file must be sufficiently defined that it can be written. The copy will be attempted but no errors will be logged until both input and output have been successfully opened. If the contents of the data are copied, all associated tables are copied first. ObitInfoList and ObitThread members are only copied if the output object didn't previously exist. Parent class members are included but any derived class info is ignored. Virtual - calls actual class member; not supported for Generic ObitData
|
|
||||||||||||||||||||||||||||
|
Public: Copy a given table from one ObitData to another. Any previous data in the output table will be lost. |
|
||||||||||||||||||||||||
|
Public: Copy associated Tables.
|
|
||||||||||||||||
|
Public: Fully instantiate. If object has previously been opened, as demonstrated by the existance of its myIO member, this operation is a no-op. Virtual - calls actual class member; not supported for Generic ObitData
|
|
|
Public: ClassInfo pointer.
|
|
||||||||||||
|
Public: Reset IO to start of file.
|
|
||||||||||||||||
|
Public: Create ObitIO structures and open file. Virtual - calls actual class member Reads table list if in generic ObitData Object
|
|
||||||||||||||||||||||||||||
|
Public: Read header keyword.
|
|
||||||||||||
|
Public: Rename underlying structures. New name information depends on the underlying file type and is given on the info member. Not supported for Generic ObitData For FITS files:
|
|
||||||||||||||||
|
Public: Do two ObitDatas have the same underlying structures?. This test is done using values entered into the ObitInfoList in case the object has not yet been opened. Not supported for Generic ObitData
|
|
||||||||||||
|
Public: Assign/Initialize IO member. This is the principle place where the underlying file type is known. Virtual - calls actual class member; not supported for Generic ObitData
|
|
||||||||||||
|
Public: Update disk resident tables information.
|
|
||||||||||||||||||||||||||||
|
Public: Write header keyword.
|
|
||||||||||||
|
Public: Delete underlying structures. Virtual - calls actual class member; not supported for Generic ObitData
|
|
||||||||||||||||||||
|
Public: Destroy an associated Table. The table is removed from the ObitTableList but it is not updated. A call to ObitDataUpdateTables to update disk structures.
|
1.3.9.1