SDDFile.h

Classes

SDDFile -- a class for accessing unipops SDD data files (full description)

class SDDFile

Types

enum FileOption

Old = 1
New
existing table
NewNoReplace
create table
Scratch
create table (may not exist)
Update
scratch table
Delete
update existing table

Interface

Public Members
SDDFile()
SDDFile(const String& fileName, FileOption option = Old)
SDDFile(const SDDFile& other)
~SDDFile()
SDDFile& operator=(const SDDFile& other)
void attach(const String& fileName, FileOption option = Old)
SDDBootStrap& bootStrap()
const SDDIndex& index() const
SDDIndex& index()
const SDDIndexRep& index(uInt entry) const
SDDIndexRep& index(uInt entry)
uInt nvectors(uInt entry) const
Bool inUse(uInt entry) const
SDDHeader& header(uInt location)
Bool getData(Array<Float>& data, uInt location, uInt which=0)
Float time(uInt location, uInt which)
Float raOffset(uInt location, uInt which)
Float decOffset(uInt location, uInt which)
Float az(uInt location, uInt which)
Float el(uInt location, uInt which)
SDDHeader& header(uInt scan, uInt subscan)
Bool fullUpdate()
Bool incrementalUpdate()
Private Members
void seek(uInt record=0)
uInt fileMode(FileOption option) const
void loadLocation(uInt location)
void resetCache()
void init_nvectors()

Description

Review Status

Date Reviewed:
yyyy/mm/dd

Prerequisite

Etymology

Synopsis

Example

Motivation

Member Description

enum FileOption

These file options are straight out of Table. They should be made more general.

SDDFile()

creates the parts, but nothing is attached to any file

SDDFile(const String& fileName, FileOption option = Old)

open the indicated file, with the indicated options

SDDFile(const SDDFile& other)

Copy constructor

~SDDFile()

SDDFile& operator=(const SDDFile& other)

assignment operator

void attach(const String& fileName, FileOption option = Old)

attach to a file

SDDBootStrap& bootStrap()

return a reference to the BootStrap

const SDDIndex& index() const

return a reference to the Index

SDDIndex& index()

const SDDIndexRep& index(uInt entry) const

SDDIndexRep& index(uInt entry)

uInt nvectors(uInt entry) const

the number of vectors at a specific entry

Bool inUse(uInt entry) const

check if a specific index entry is in use

SDDHeader& header(uInt location)

return a reference to the Header at location i

Bool getData(Array<Float>& data, uInt location, uInt which=0)

get the data vector at the indicated location in the index If there is more than one vector at that location (for OTF and PZ data at the 12m), get the one indicated. If the arguments are invalid, getData returns False and does NOT alter the array argument

Float time(uInt location, uInt which)

The following are specific to OTF data they are the single values appropriate for a given location and vector for non-OTF rows, these return 0 for the offsets (time, raOffset, decOffset), and the header values for az and el

Float raOffset(uInt location, uInt which)

Float decOffset(uInt location, uInt which)

Float az(uInt location, uInt which)

Float el(uInt location, uInt which)

SDDHeader& header(uInt scan, uInt subscan)

return a reference to the header/data corresponding to scan & subscan

Bool fullUpdate()

update the bootstrap and index if the file on disk has changed this also needs to reset the rowMap and make sure the "current" values point at appropriate things. If the "current" values are no longer available, reset to the first thing that is available. The return values are the same as the SDDIndex functions they use

Bool incrementalUpdate()

void seek(uInt record=0)

uInt fileMode(FileOption option) const

void loadLocation(uInt location)

void resetCache()

void init_nvectors()