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

ObitHistory.h

Go to the documentation of this file.
00001 /* $Id: ObitHistory.h,v 1.7 2007/08/31 17:24:48 bcotton Exp $     */
00002 /*--------------------------------------------------------------------*/
00003 /*;  Copyright (C) 2004-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 OBITTABLEHISTORY_H 
00029 #define OBITTABLEHISTORY_H 
00030 #include "Obit.h"
00031 #include "ObitErr.h"
00032 #include "ObitThread.h"
00033 #include "ObitInfoList.h"
00034 #include "ObitIOHistory.h"
00035 
00036 /*-------- Obit: Software for the recently deceased ------------------*/
00122 /*--------------Class definitions-------------------------------------*/
00124 typedef struct {
00125 #include "ObitHistoryDef.h"   /* this class definition */
00126 } ObitHistory;
00127 
00128 /*----------------- Macroes ---------------------------*/
00134 #define ObitHistoryUnref(in) ObitUnref (in)
00135 
00141 #define ObitHistoryRef(in) ObitRef (in)
00142 
00149 #define ObitHistoryIsA(in) ObitIsA (in, ObitHistoryGetClass())
00150 
00159 #define ObitHistorySetFITS(in,disk,file,err) G_STMT_START{ \
00160        in->info->dim[0]=1; in->info->dim[1]=1; in->info->dim[2]=1;  \
00161        in->info->dim[3]=1; in->info->dim[4]=1;                      \
00162        in->info->work[0] = OBIT_IO_FITS;                            \
00163        in->info->work[2] = disk;                                    \
00164        in->info->dim[0] = 1;                                        \
00165        ObitInfoListPut (in->info, "Disk", OBIT_int,                 \
00166                  in->info->dim, (gpointer)&in->info->work[2], err); \
00167        ObitInfoListPut (in->info, "FileType", OBIT_int,             \
00168                   in->info->dim, (gpointer)&in->info->work[0], err);\
00169        in->info->dim[0] = strlen(file);                             \
00170        ObitInfoListPut (in->info, "FileName", OBIT_string,          \
00171                  in->info->dim, (gpointer)file, err);               \
00172      }G_STMT_END  
00173 
00183 #define ObitHistorySetAIPS(in,disk,cno,user,err)  G_STMT_START{  \
00184        in->info->dim[0]=1; in->info->dim[1]=1; in->info->dim[2]=1;  \
00185        in->info->dim[3]=1; in->info->dim[4]=1;                      \
00186        in->info->work[0] = OBIT_IO_AIPS;                            \
00187        ObitInfoListPut (in->info, "FileType", OBIT_int,             \
00188                   in->info->dim, (gpointer)&in->info->work[0], err);\
00189        in->info->dim[0] = 1;                                        \
00190        ObitInfoListPut (in->info, "Disk", OBIT_int,                 \
00191                  in->info->dim, (gpointer)&disk, err);              \
00192        ObitInfoListPut (in->info, "CNO", OBIT_int,                  \
00193                  in->info->dim, (gpointer)&cno, err);               \
00194        ObitInfoListPut (in->info, "User", OBIT_int,                 \
00195                  in->info->dim, (gpointer)&user, err);              \
00196      }G_STMT_END   
00197 
00198 
00199 /*---------------Public functions---------------------------*/
00201 void ObitHistoryClassInit (void);
00202 
00204 ObitHistory* newObitHistory (gchar* name);
00205 
00207 gconstpointer ObitHistoryGetClass (void);
00208 
00210 ObitHistory* 
00211 newObitHistoryValue (gchar* name, ObitInfoList *info, ObitErr *err);
00212 
00214 ObitHistory* ObitHistoryZap (ObitHistory *in, ObitErr *err);
00215 typedef ObitHistory*(*ObitHistoryZapFP) (ObitHistory *in, ObitErr *err);
00216 
00218 ObitHistory* ObitHistoryCopy  (ObitHistory *in, ObitHistory *out, 
00219                                          ObitErr *err);
00220 
00222 ObitIOCode ObitHistoryCopyHeader  (ObitHistory *in, ObitHistory *out, 
00223                                         ObitErr *err);
00224 
00226 ObitIOCode ObitHistoryCopy2Header  (ObitHistory *in, ObitHistory *out, 
00227                                          ObitErr *err);
00228 
00230 ObitIOCode ObitHistoryHeader2Header  (ObitHistory *in, ObitHistory *out, 
00231                                       ObitErr *err);
00232 
00234 ObitIOCode ObitHistoryOpen (ObitHistory *in, ObitIOAccess access, 
00235                             ObitErr *err);
00236 typedef ObitIOCode(*ObitHistoryOpenFP) (ObitHistory *in, ObitIOAccess access,
00237                                         ObitErr *err);
00238 
00240 ObitIOCode ObitHistoryClose (ObitHistory *in, ObitErr *err);
00241 typedef ObitIOCode(*ObitHistoryCloseFP) (ObitHistory *in,  ObitErr *err);
00242 
00244 ObitIOCode 
00245 ObitHistoryReadRec (ObitHistory *in, glong recno, gchar hiCard[73],
00246                     ObitErr *err);
00247 
00249 ObitIOCode 
00250 ObitHistoryWriteRec (ObitHistory *in, glong rowno, gchar hiCard[73], 
00251                      ObitErr *err);
00252 
00254 ObitIOCode 
00255 ObitHistoryTimeStamp (ObitHistory *in, gchar *label,
00256                               ObitErr *err);
00257 
00259 ObitIOCode 
00260 ObitHistoryCopyInfoList (ObitHistory *out, gchar *pgmName, gchar *list[], 
00261                          ObitInfoList *info, ObitErr *err);
00262 
00264 gint ObitHistoryNumRec (ObitHistory *in);
00265 
00266 /*----------- ClassInfo Structure -----------------------------------*/
00272 typedef struct  {
00273 #include "ObitHistoryClassDef.h"
00274 } ObitHistoryClassInfo; 
00275 
00276 #endif /* OBITTABLEHISTORY_H */ 

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