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

ObitIO.c File Reference

ObitIO class function definitions. More...

#include "ObitIO.h"
#include "ObitMem.h"

Functions

void ObitIOInit (gpointer in)
 Private: Initialize newly instantiated object.
void ObitIOClear (gpointer in)
 Private: Deallocate members.
ObitIOnewObitIO (gchar *name, ObitInfoList *info, ObitErr *err)
 Public: Constructor.
gconstpointer ObitIOGetClass (void)
 Public: ClassInfo pointer.
gboolean ObitIOSame (ObitIO *in, ObitInfoList *in1, ObitInfoList *in2, ObitErr *err)
 Public: Are underlying structures the same.
void ObitIOZap (ObitIO *in, ObitErr *err)
 Public: Delete underlying structures.
void ObitIORename (ObitIO *in, ObitInfoList *info, ObitErr *err)
 Public: Rename underlying structures.
ObitIOObitIOCopy (ObitIO *in, ObitIO *out, ObitErr *err)
 Public: Copy constructor.
ObitIOCode ObitIOOpen (ObitIO *in, ObitIOAccess access, ObitInfoList *info, ObitErr *err)
 Public: Open.
ObitIOCode ObitIOClose (ObitIO *in, ObitErr *err)
 Public: Close.
ObitIOCode ObitIOSet (ObitIO *in, ObitInfoList *info, ObitErr *err)
 Public: Init I/O.
ObitIOCode ObitIORead (ObitIO *in, gfloat *data, ObitErr *err)
 Public: Read.
ObitIOCode ObitIOReadRow (ObitIO *in, glong rowno, gfloat *data, ObitErr *err)
 Public: Read Row.
ObitIOCode ObitIOReadSelect (ObitIO *in, gfloat *data, ObitErr *err)
 Public: Read with selection.
ObitIOCode ObitIOReadRowSelect (ObitIO *in, glong rowno, gfloat *data, ObitErr *err)
 Public: Read Row with selection.
ObitIOCode ObitIOWrite (ObitIO *in, gfloat *data, ObitErr *err)
 Public: Write.
ObitIOCode ObitIOWriteRow (ObitIO *in, glong rowno, gfloat *data, ObitErr *err)
 Public: Write Row.
ObitIOCode ObitIOReadDescriptor (ObitIO *in, ObitErr *err)
 Public: Read Descriptor.
ObitIOCode ObitIOWriteDescriptor (ObitIO *in, ObitErr *err)
 Public: Write Descriptor.
ObitIOCode ObitIOFlush (ObitIO *in, ObitErr *err)
 Public: Flush.
void ObitIOCreateBuffer (gfloat **data, glong *size, ObitIO *in, ObitInfoList *info, ObitErr *err)
 Public: Create buffer.
void ObitIOFreeBuffer (gfloat *buffer)
 Public: Destroy buffer.
ObitnewObitIOTable (ObitIO *in, ObitIOAccess access, gchar *tabType, glong *tabVer, ObitErr *err)
 Public: Create an associated Table Typed as base class to avoid problems.
ObitIOCode ObitIOUpdateTables (ObitIO *in, ObitInfoList *info, ObitErr *err)
 Public: Update disk resident tables information.
void ObitIOClassInit (void)
 Public: Class initializer.


Detailed Description

ObitIO class function definitions.

This is a virtual base class and should never be directly instantiated. Derived classes provide an I/O interface to various underlying disk structures.


Function Documentation

ObitIO* newObitIO gchar *  name,
ObitInfoList info,
ObitErr err
 

Public: Constructor.

Initializes class if needed on first call.

Returns:
the new object.

Obit* newObitIOTable ObitIO in,
ObitIOAccess  access,
gchar *  tabType,
glong *  tabVer,
ObitErr err
 

Public: Create an associated Table Typed as base class to avoid problems.

If such an object exists, a reference to it is returned, else a new object is created and entered in the ObitTableList. Returned object is typed an Obit to prevent circular definitions between the ObitTable and the ObitIO classes.

Parameters:
in Pointer to object with associated tables. This MUST have been opened before this call.
access access (OBIT_IO_ReadOnly,OBIT_IO_ReadWrite, or OBIT_IO_WriteOnly). This is used to determine defaulted version number and a different value may be used for the actual Open.
tabType The table type (e.g. "AIPS CC").
tabVer Desired version number, may be zero in which case the highest extant version is returned for read and the highest+1 for write.
err ObitErr for reporting errors.
Returns:
pointer to created ObitTable, NULL on failure.

void ObitIOClassInit void   ) 
 

Public: Class initializer.

void ObitIOClear gpointer  inn  ) 
 

Private: Deallocate members.

Does (recursive) deallocation of parent class members.

Parameters:
inn Pointer to the object to deallocate.

ObitIOCode ObitIOClose ObitIO in,
ObitErr err
 

Public: Close.

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

ObitIO* ObitIOCopy ObitIO in,
ObitIO out,
ObitErr err
 

Public: Copy constructor.

The result will have pointers to the more complex members. Parent class members are included but any derived class info is ignored.

Parameters:
in The object to copy
out An existing object pointer for output or NULL if none exists.
err Obit error stack object.
Returns:
pointer to the new object.

void ObitIOCreateBuffer gfloat **  data,
glong *  size,
ObitIO in,
ObitInfoList info,
ObitErr err
 

Public: Create buffer.

Parameters:
data (output) pointer to data array
size (output) size of data array in floats.
in Pointer to object to be accessed.
info ObitInfoList with instructions
err ObitErr for reporting errors.

ObitIOCode ObitIOFlush ObitIO in,
ObitErr err
 

Public: Flush.

Parameters:
in Pointer to object to be accessed.
err ObitErr for reporting errors.
Returns:
return code, 0=> OK

void ObitIOFreeBuffer gfloat *  buffer  ) 
 

Public: Destroy buffer.

Parameters:
buffer Pointer to buffer to destroy.

gconstpointer ObitIOGetClass void   ) 
 

Public: ClassInfo pointer.

Initializes class if needed on first call.

Returns:
pointer to the class structure.

void ObitIOInit gpointer  inn  ) 
 

Private: Initialize newly instantiated object.

Does (recursive) initialization of base class members before this class.

Parameters:
inn Pointer to the object to initialize.

ObitIOCode ObitIOOpen ObitIO in,
ObitIOAccess  access,
ObitInfoList info,
ObitErr err
 

Public: Open.

The file and selection info member should have been stored in the ObitInfoList prior to calling. See derived classes for details.

Parameters:
in Pointer to object to be opened.
access access (OBIT_IO_ReadOnly,OBIT_IO_ReadWrite)
info ObitInfoList with instructions for opening
err ObitErr for reporting errors.
Returns:
return code, 0=> OK

ObitIOCode ObitIORead ObitIO in,
gfloat *  data,
ObitErr err
 

Public: Read.

Parameters:
in Pointer to object to be read.
data pointer to buffer to write results.
err ObitErr for reporting errors.
Returns:
return code, 0=> OK

ObitIOCode ObitIOReadDescriptor ObitIO in,
ObitErr err
 

Public: Read Descriptor.

Parameters:
in Pointer to object with ObitImageDescto be read.
err ObitErr for reporting errors.
Returns:
return code, 0=> OK

ObitIOCode ObitIOReadRow ObitIO in,
glong  rowno,
gfloat *  data,
ObitErr err
 

Public: Read Row.

Parameters:
in Pointer to object to be read.
rowno Starting row number (1-rel) -1=> next.
data pointer to buffer to write results.
err ObitErr for reporting errors.
Returns:
return code, 0=> OK

ObitIOCode ObitIOReadRowSelect ObitIO in,
glong  rowno,
gfloat *  data,
ObitErr err
 

Public: Read Row with selection.

Parameters:
in Pointer to object to be read.
rowno Starting row number (1-rel) -1=> next.
data pointer to buffer to write results.
err ObitErr for reporting errors.
Returns:
return code, 0=> OK

ObitIOCode ObitIOReadSelect ObitIO in,
gfloat *  data,
ObitErr err
 

Public: Read with selection.

Parameters:
in Pointer to object to be read.
data pointer to buffer to write results.
err ObitErr for reporting errors.
Returns:
return code, 0=> OK

void ObitIORename ObitIO in,
ObitInfoList info,
ObitErr err
 

Public: Rename underlying structures.

New name information depends on the underlying file type and is given on the info member.

Parameters:
in Pointer to object to be zapped.
info Associated ObitInfoList For FITS files:
  • "newFileName" OBIT_string (?,1,1) New Name of disk file.
For AIPS:
  • "newName" OBIT_string (12,1,1) New AIPS Name absent or Blank = don't change
  • "newClass" OBIT_string (6,1,1) New AIPS Class absent or Blank = don't changeO
  • "newSeq" OBIT_int (1,1,1) New AIPS Sequence 0 => unique value
err ObitErr for reporting errors.

gboolean ObitIOSame ObitIO in,
ObitInfoList in1,
ObitInfoList in2,
ObitErr err
 

Public: Are underlying structures the same.

This test is done using values entered into the ObitInfoList in case the object has not yet been opened.

Parameters:
in1 ObitInfoList for first object to be tested
in2 ObitInfoList for second object to be tested
err ObitErr for reporting errors.
Returns:
TRUE if to objects have the same underlying structures else FALSE

ObitIOCode ObitIOSet ObitIO in,
ObitInfoList info,
ObitErr err
 

Public: Init I/O.

Parameters:
in Pointer to object to be accessed.
info ObitInfoList with instructions
err ObitErr for reporting errors.
Returns:
return code, 0=> OK

ObitIOCode ObitIOUpdateTables ObitIO in,
ObitInfoList info,
ObitErr err
 

Public: Update disk resident tables information.

Parameters:
in Pointer to object to be updated.
info ObitInfoList of parent object.
err ObitErr for reporting errors.
Returns:
return code, OBIT_IO_OK=> OK

ObitIOCode ObitIOWrite ObitIO in,
gfloat *  data,
ObitErr err
 

Public: Write.

Writes row in->myDesc->row + 1; plane in->myDesc->plane + 1

Parameters:
in Pointer to object to be written.
data pointer to buffer containing input data.
err ObitErr for reporting errors.
Returns:
return code, 0=> OK

ObitIOCode ObitIOWriteDescriptor ObitIO in,
ObitErr err
 

Public: Write Descriptor.

Parameters:
in Pointer to object with ObitImageDesc to be written.
err ObitErr for reporting errors.
Returns:
return code, 0=> OK

ObitIOCode ObitIOWriteRow ObitIO in,
glong  rowno,
gfloat *  data,
ObitErr err
 

Public: Write Row.

Writes row in->myDesc->row + 1; plane in->myDesc->plane + 1

Parameters:
in Pointer to object to be written.
rowno Starting row number (1-rel) -1=> next.
data pointer to buffer containing input data.
err ObitErr for reporting errors.
Returns:
return code, 0=> OK

void ObitIOZap ObitIO in,
ObitErr err
 

Public: Delete underlying structures.

Parameters:
in Pointer to object to be zapped.
err ObitErr for reporting errors.


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