Main Page | Class List | Directories | File List | Class Members | File Members

ObitData.h

Go to the documentation of this file.
00001 /* $Id: ObitData.h,v 1.8 2007/08/31 17:24:48 bcotton Exp $       */
00002 /*--------------------------------------------------------------------*/
00003 /*;  Copyright (C) 2005,2007                                          */
00004 /*;  Associated Universities, Inc. Washington DC, USA.                */
00005 /*;                                                                   */
00006 /*;  This program is free software; you can redistribute it and/or    */
00007 /*;  modify it under the terms of the GNU General Public License as   */
00008 /*;  published by the Free Software Foundation; either version 2 of   */
00009 /*;  the License, or (at your option) any later version.              */
00010 /*;                                                                   */
00011 /*;  This program is distributed in the hope that it will be useful,  */
00012 /*;  but WITHOUT ANY WARRANTY; without even the implied warranty of   */
00013 /*;  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    */
00014 /*;  GNU General Public License for more details.                     */
00015 /*;                                                                   */
00016 /*;  You should have received a copy of the GNU General Public        */
00017 /*;  License along with this program; if not, write to the Free       */
00018 /*;  Software Foundation, Inc., 675 Massachusetts Ave, Cambridge,     */
00019 /*;  MA 02139, USA.                                                   */
00020 /*;                                                                   */
00021 /*;Correspondence about this software should be addressed as follows: */
00022 /*;         Internet email: bcotton@nrao.edu.                         */
00023 /*;         Postal address: William Cotton                            */
00024 /*;                         National Radio Astronomy Observatory      */
00025 /*;                         520 Edgemont Road                         */
00026 /*;                         Charlottesville, VA 22903-2475 USA        */
00027 /*--------------------------------------------------------------------*/
00028 #ifndef OBITDATA_H 
00029 #define OBITDATA_H 
00030 
00031 #include "Obit.h"
00032 #include "ObitErr.h"
00033 #include "ObitThread.h"
00034 #include "ObitInfoList.h"
00035 #include "ObitIO.h"
00036 #include "ObitTableList.h"
00037 #include "ObitHistory.h"
00038 
00039 /*-------- Obit: Software for the recently deceased ------------------*/
00114 /*--------------Class definitions-------------------------------------*/
00116 typedef struct {
00117 #include "ObitDataDef.h"   /* this class definition */
00118 } ObitData;
00119 
00120 /*----------------- Macroes ---------------------------*/
00126 #define ObitDataUnref(in) ObitUnref (in)
00127 
00133 #define ObitDataRef(in) ObitRef (in)
00134 
00141 #define ObitDataIsA(in) ObitIsA (in, ObitDataGetClass())
00142 
00151 #define ObitDataSetFITS(in,disk,file,err)  G_STMT_START{       \
00152        in->info->dim[0]=1; in->info->dim[1]=1; in->info->dim[2]=1;  \
00153        in->info->dim[3]=1; in->info->dim[4]=1;                      \
00154        in->info->work[0] = OBIT_IO_FITS;                            \
00155        ObitInfoListPut (in->info, "FileType", OBIT_int,             \
00156                   in->info->dim, (gpointer)&in->info->work[0], err);\
00157        in->info->dim[0] = 1;                                        \
00158        ObitInfoListPut (in->info, "Disk", OBIT_int,                 \
00159                  in->info->dim, (gpointer)&in->info->work[2], err); \
00160        in->info->dim[0] = strlen(file);                             \
00161        ObitInfoListPut (in->info, "FileName", OBIT_string,          \
00162                  in->info->dim, (gpointer)file, err);               \
00163      }G_STMT_END  
00164 
00174 #define ObitDataSetAIPS(in,disk,cno,user,err)  G_STMT_START{   \
00175        in->info->dim[0]=1; in->info->dim[1]=1; in->info->dim[2]=1;  \
00176        in->info->dim[3]=1; in->info->dim[4]=1;                      \
00177        in->info->work[0] = OBIT_IO_AIPS;                            \
00178        ObitInfoListPut (in->info, "FileType", OBIT_int,             \
00179                   in->info->dim, (gpointer)&in->info->work[0], err);\
00180        in->info->dim[0] = 1;                                        \
00181        ObitInfoListPut (in->info, "Disk", OBIT_int,                 \
00182                  in->info->dim, (gpointer)&disk, err);              \
00183        ObitInfoListPut (in->info, "DISK", OBIT_int,                 \
00184                  in->info->dim, (gpointer)&disk, err);              \
00185        ObitInfoListPut (in->info, "CNO", OBIT_int,                  \
00186                  in->info->dim, (gpointer)&cno, err);               \
00187        ObitInfoListPut (in->info, "User", OBIT_int,                 \
00188                  in->info->dim, (gpointer)&user, err);              \
00189      }G_STMT_END   
00190 
00191 
00192 /*---------------Public functions---------------------------*/
00194 void ObitDataClassInit (void);
00195 
00197 ObitData* newObitData (gchar* name);
00198 
00200 ObitData* newObitDataScratch (ObitData *in, ObitErr *err);
00201 typedef ObitData* (*newObitDataScratchFP) (ObitData *in, ObitErr *err);
00202 
00204 void ObitDataFullInstantiate (ObitData *in, gboolean exist, ObitErr *err);
00205 typedef void (*ObitDataFullInstantiateFP) (ObitData *in, gboolean exist, 
00206                                            ObitErr *err);
00207 
00209 gconstpointer ObitDataGetClass (void);
00210 
00212 void ObitDataRename  (ObitData *in, ObitErr *err);
00213 typedef void (*ObitDataRenameFP) (ObitData *in, ObitErr *err);
00214 
00216 ObitData* ObitDataZap  (ObitData *in, ObitErr *err);
00217 typedef ObitData* (*ObitDataZapFP) (ObitData *in, ObitErr *err);
00218 
00220 ObitData* ObitDataCopy  (ObitData *in, ObitData *out, 
00221                      ObitErr *err);
00222 typedef ObitData* (*ObitDataCopyFP) (ObitData *in, ObitData *out, 
00223                                      ObitErr *err);
00224 
00226 void ObitDataClone (ObitData *in, ObitData *out, ObitErr *err);
00227 typedef void (*ObitDataCloneFP) (ObitData *in, ObitData *out, 
00228                                  ObitErr *err);
00229 
00231 gboolean ObitDataSame (ObitData *in1, ObitData *in2, ObitErr *err );
00232 typedef gboolean (*ObitDataSameFP) (ObitData *in1, ObitData *in2, 
00233                                   ObitErr *err);
00234 
00236 void ObitDataSetupIO (ObitData *in, ObitErr *err );
00237 typedef void (*ObitDataSetupIOFP) (ObitData *in, ObitErr *err);
00238 
00240 ObitIOCode ObitDataOpen (ObitData *in, ObitIOAccess access, 
00241                          ObitErr *err);
00243 typedef ObitIOCode (*ObitDataOpenFP) (ObitData *in, ObitIOAccess access, 
00244                                       ObitErr *err);
00245 
00247 ObitIOCode ObitDataClose (ObitData *in, ObitErr *err);
00248 typedef ObitIOCode (*ObitDataCloseFP) (ObitData *in, ObitErr *err);
00249 
00251 ObitIOCode ObitDataIOSet (ObitData *in, ObitErr *err);
00252 typedef ObitIOCode (*ObitDataIOSetFP) (ObitData *in, ObitErr *err);
00253 
00255 ObitTable* newObitDataTable (ObitData *in, ObitIOAccess access, 
00256                              gchar *tabType, glong *tabver, ObitErr *err);
00257 typedef ObitTable* (*newObitDataTableFP) (ObitData *in, ObitIOAccess access, 
00258                                           gchar *tabType, glong *tabver, 
00259                                           ObitErr *err);
00260 
00262 ObitHistory* newObitDataHistory (ObitData *in, ObitIOAccess access, ObitErr *err);
00263 typedef ObitHistory* (*newObitDataHistoryFP) (ObitData *in, ObitIOAccess access, 
00264                                               ObitErr *err);
00265 
00267 ObitIOCode ObitDataZapTable (ObitData *in, gchar *tabType, glong tabVer, 
00268                            ObitErr *err);
00269 typedef ObitIOCode (*ObitDataZapTableFP) (ObitData *in, gchar *tabType, 
00270                                           glong tabVer, ObitErr *err);
00271 
00273 ObitIOCode ObitDataCopyTables (ObitData *in, ObitData *out, 
00274                                gchar **exclude, gchar **include, 
00275                                ObitErr *err);
00276 typedef ObitIOCode 
00277 (*ObitDataCopyTablesFP) (ObitData *in, ObitData *out, 
00278                          gchar **exclude, gchar **include, 
00279                          ObitErr *err);
00280 
00282 ObitIOCode ObitDataUpdateTables (ObitData *in, ObitErr *err);
00283 typedef ObitIOCode (*ObitDataUpdateTablesFP) (ObitData *in, ObitErr *err);
00284 
00286 void ObitDataCopyTable (ObitData *in, ObitData *out, gchar *tabType, 
00287                         glong *inver, glong *outver, ObitErr *err);
00288 typedef void (*ObitDataCopyTableFP) (ObitData *in, ObitData *out, 
00289                                      gchar *tabType, 
00290                                      glong *inver, glong *outver, ObitErr *err);
00291 
00293 void ObitDataWriteKeyword (ObitData *in, 
00294                            gchar* name, ObitInfoType type, gint32 *dim, 
00295                            gconstpointer data, ObitErr *err);
00296 typedef void 
00297 (*ObitDataWriteKeywordFP) (ObitData *in, 
00298                            gchar* name, ObitInfoType type, gint32 *dim, 
00299                            gconstpointer data, ObitErr *err);
00300 
00302 void ObitDataReadKeyword (ObitData *in, 
00303                           gchar* name, ObitInfoType *type, gint32 *dim, 
00304                           gpointer data, ObitErr *err);
00305 typedef void 
00306 (*ObitDataReadKeywordFP) (ObitData *in, 
00307                           gchar* name, ObitInfoType *type, gint32 *dim, 
00308                           gpointer data, ObitErr *err);
00309 
00310 /*----------- ClassInfo Structure -------------------------------------*/
00311 
00317 typedef struct  {
00318 #include "ObitDataClassDef.h"
00319 } ObitDataClassInfo; 
00320 
00321 #endif /* OBITDATA_H */ 

Generated on Fri Aug 31 22:13:04 2007 for Obit by  doxygen 1.3.9.1