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

ObitHistory.c File Reference

ObitHistory class function definitions. More...

#include <sys/types.h>
#include <time.h>
#include "Obit.h"
#include "ObitFileFITS.h"
#include "ObitIOHistory.h"
#include "ObitIOHistoryFITS.h"
#include "ObitIOHistoryAIPS.h"
#include "ObitHistory.h"

Functions

void ObitHistoryInit (gpointer in)
 Private: Initialize newly instantiated object.
void ObitHistoryClear (gpointer in)
 Private: Deallocate members.
ObitHistorynewObitHistory (gchar *name)
 Public: Default constructor.
ObitHistorynewObitHistoryValue (gchar *name, ObitInfoList *info, ObitErr *err)
 Public: Constructor from object infoList.
gconstpointer ObitHistoryGetClass (void)
 Public: ClassInfo pointer.
ObitHistoryObitHistoryZap (ObitHistory *in, ObitErr *err)
 Public: Delete underlying structures.
ObitHistoryObitHistoryCopy (ObitHistory *in, ObitHistory *out, ObitErr *err)
 Public: Deep copy.
ObitIOCode ObitHistoryCopyHeader (ObitHistory *in, ObitHistory *out, ObitErr *err)
 Public: Copy history from header (FITS).
ObitIOCode ObitHistoryCopy2Header (ObitHistory *in, ObitHistory *out, ObitErr *err)
 Public: Copy history to header (FITS).
ObitIOCode ObitHistoryHeader2Header (ObitHistory *in, ObitHistory *out, ObitErr *err)
 Public: Copy history from header (FITS) to header (FITS).
ObitIOCode ObitHistoryOpen (ObitHistory *in, ObitIOAccess access, ObitErr *err)
 Public: Create ObitIO structures and open file.
ObitIOCode ObitHistoryClose (ObitHistory *in, ObitErr *err)
 Public: Close file and become inactive.
ObitIOCode ObitHistoryReadRec (ObitHistory *in, glong recno, gchar hiCard[73], ObitErr *err)
 Public: Read specified Record.
ObitIOCode ObitHistoryWriteRec (ObitHistory *in, glong recno, gchar hiCard[73], ObitErr *err)
 Public: Write specified Record.
ObitIOCode ObitHistoryTimeStamp (ObitHistory *in, gchar *label, ObitErr *err)
 Public: Add time stamp and label.
gint ObitHistoryNumRec (ObitHistory *in)
 Public: Tell number of history records.
ObitIOCode ObitHistoryCopyInfoList (ObitHistory *out, gchar *pgmName, gchar *list[], ObitInfoList *info, ObitErr *err)
 Public: Copy a list of values from an InfoList to a History.
void ObitHistoryClassInit (void)
 Public: Class initializer.


Detailed Description

ObitHistory class function definitions.

This class is derived from the Obit base class.


Function Documentation

ObitHistory* newObitHistory gchar *  name  ) 
 

Public: Default constructor.

Initializes class if needed on first call.

Parameters:
name An optional name for the object.
Returns:
the new object.

ObitHistory* newObitHistoryValue gchar *  name,
ObitInfoList info,
ObitErr err
 

Public: Constructor from object infoList.

Parameters:
name An optional name for the object.
info Parent object list defining the underlying file e.g. FileType, disk, name for FITS, disk, user, cno for AIPS.
err Error stack, returns if not empty.
Returns:
the new object.

void ObitHistoryClassInit void   ) 
 

Public: Class initializer.

void ObitHistoryClear gpointer  inn  ) 
 

Private: Deallocate members.

Does (recursive) deallocation of parent class members. For some reason this wasn't build into the GType class.

Parameters:
inn Pointer to the object to deallocate. Actually it should be an ObitHistory* cast to an Obit*.

ObitIOCode ObitHistoryClose ObitHistory in,
ObitErr err
 

Public: Close file and become inactive.

Parameters:
in Pointer to object to be closed.
err ObitErr for reporting errors.
Returns:
error code, OBIT_IO_OK=> OK

ObitHistory* ObitHistoryCopy ObitHistory in,
ObitHistory out,
ObitErr err
 

Public: Deep copy.

Both objects should be filly defined.

Parameters:
in The object to copy, if underlying structures don't exist, it merely returns without writing the out History.
out An existing object pointer for output
err Error stack, returns if not empty.
Returns:
pointer to the new object.

ObitIOCode ObitHistoryCopy2Header ObitHistory in,
ObitHistory out,
ObitErr err
 

Public: Copy history to header (FITS).

Both objects should be filly defined.

Parameters:
in The object to copy
out Output object for HISTORY header entries.
err Error stack, returns if not empty.
Returns:
pointer to the new object.

ObitIOCode ObitHistoryCopyHeader ObitHistory in,
ObitHistory out,
ObitErr err
 

Public: Copy history from header (FITS).

Parameters:
in The object to copy
out An existing object pointer for output
err Error stack, returns if not empty.
Returns:
pointer to the new object.

ObitIOCode ObitHistoryCopyInfoList ObitHistory out,
gchar *  pgmName,
gchar *  list[],
ObitInfoList info,
ObitErr err
 

Public: Copy a list of values from an InfoList to a History.

Parameters:
out Output object for HISTORY header entries.
list NULL terminated list of entries in info
info ObitInfoList with values to copy
err Error stack, returns if not empty.
Returns:
pointer to the new object.

gconstpointer ObitHistoryGetClass void   ) 
 

Public: ClassInfo pointer.

Returns:
pointer to the class structure.

ObitIOCode ObitHistoryHeader2Header ObitHistory in,
ObitHistory out,
ObitErr err
 

Public: Copy history from header (FITS) to header (FITS).

Both objects should be filly defined.

Parameters:
in The object to copy
out Output object for HISTORY header entries.
err Error stack, returns if not empty.
Returns:
pointer to the new object.

void ObitHistoryInit gpointer  inn  ) 
 

Private: Initialize newly instantiated object.

Parent classes portions are (recursively) initialized first

Parameters:
inn Pointer to the object to initialize.

gint ObitHistoryNumRec ObitHistory in  ) 
 

Public: Tell number of history records.

Parameters:
in Pointer to open object to be tested
Returns:
number of records, <0 => problem

ObitIOCode ObitHistoryOpen ObitHistory in,
ObitIOAccess  access,
ObitErr err
 

Public: Create ObitIO structures and open file.

The image descriptor is read if OBIT_IO_ReadOnly or OBIT_IO_ReadWrite and written to disk if opened OBIT_IO_WriteOnly. After the file has been opened the member, buffer is initialized for reading/storing the table unless member bufferSize is <0. If the requested version ("Ver" in InfoList) is 0 then the highest numbered table of the same type is opened on Read or Read/Write, or a new table is created on on Write. The file etc. info should have been stored in the ObitInfoList:

  • "FileType" OBIT_int scalar = OBIT_IO_FITS or OBIT_IO_AIPS for file type (see class documentation for details).
    Parameters:
    in Pointer to object to be opened.
    access access (OBIT_IO_ReadOnly,OBIT_IO_ReadWrite, or OBIT_IO_WriteOnly). If OBIT_IO_WriteOnly any existing data in the output file will be lost.
    err ObitErr for reporting errors.
    Returns:
    return code, OBIT_IO_OK=> OK

ObitIOCode ObitHistoryReadRec ObitHistory in,
glong  recno,
gchar  hiCard[73],
ObitErr err
 

Public: Read specified Record.

Parameters:
in Pointer to object to be read.
recno Record number to read, -1 = next;
hiCard Char array to accept line
err ObitErr for reporting errors.
Returns:
return code, OBIT_IO_OK => OK

ObitIOCode ObitHistoryTimeStamp ObitHistory in,
gchar *  label,
ObitErr err
 

Public: Add time stamp and label.

Parameters:
in Pointer to object to be written.
label Label string for record
err ObitErr for reporting errors.
Returns:
return code, OBIT_IO_OK => OK

ObitIOCode ObitHistoryWriteRec ObitHistory in,
glong  recno,
gchar  hiCard[73],
ObitErr err
 

Public: Write specified Record.

Parameters:
in Pointer to object to be written.
rowno Record number to write, -1 = next;
err ObitErr for reporting errors.
Returns:
return code, OBIT_IO_OK => OK

ObitHistory* ObitHistoryZap ObitHistory in,
ObitErr err
 

Public: Delete underlying structures.

Parameters:
in Pointer to object to be zapped.
err ObitErr for reporting errors.
Returns:
pointer for input object, NULL if deletion successful


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