next up previous contents index
Next: Graphics Interfaces Up: No Title Previous: Standard Interfaces

   
Table Interfaces


Module Version 1.0 (28-Feb-1991) Module TCA


Author:    ESO-IPG, Garching

Language:    C

Classification: Table (3-D) Interfaces

Source file: $MIDASHOME/$MIDVERS/libsrc/tbl/tca.c

Environment:

Comments:

This module contains the routines to handle the access to table elements, which can be arrays . Access to elements is done by column, row and index numbers; an array of elements is specified by column, row, index and length. The length is taken as the maximum possible when this argument is zero. element arrays in the table can be integer (I*1, i*2 or I*4), float, double precision or character string data types, as defined during the creation of the columns. Implicit conversion of the element value is done automatically if the input/output is done with a routine not corresponding to the data type.

The functions provided by this module are:

Main arguments used by the routines are:

col
sequential column number. It is an integer number provided by the system when a new column is created, or it is defined by the user for already existing columns.
index
starting position in the element array. The first element is numbered 1.
items
How many elements of the array are concerned. The value 0 stands for all
null
null flag. This value is 1 if the element is undefined, 0 otherwise.
row
sequential row number. It is an integer defining the row number in the table or the symbols LAST, FIRST, NEXT and PREVIOUS defined in the system file 'midas_def.h' in the directory 'MID_INCLUDE'. The sequence number is the physical sequence number (by default) or the sequence corresponding to the index of the reference column.
tid
table identifier. It is an integer number provided by the system when the table is created or opened.
value
element value. The type depends on the routine name. Implicit conversion is done if this type does not correspond to the column data type.

History:

[1.0] 14-Dec-1990: Creation (Francois Ochsenbein)


Function

TCAMAP
 

int TCAMAP(tid, row, col, addr)

int tid IN : table id
int row IN : row number
int col IN : column number
char **addr OUT: element adress


Function

TCAUNM
 

int TCAUNM(tid, address)

int tid IN : table id
char *address IN: column address


Function

TCAEDC
 

int TCAEDC(tid, abin, col, index, items, buffer)

int tid IN : table id
char *abin IN : values to edit
int col IN : column number
int index IN : index number
int items IN : how many
char *buffer OUT: edited value


Function

TCATRC
 

int TCATRC(tid, abin, col, index, items, buffer)

int tid IN : table id
char *abin OUT: value to edit
int col IN : column number
int index IN : index number
int items IN : how many
char *buffer IN : edited value


Function

TCARDC
 

int TCARDC(tid, row, col, index, items, value)

int tid IN : table id
int row IN : row number
int col IN : column number
int index IN : index number
int items IN : how many
char *value OUT: actual value


Function

TCARDD
 

int TCARDD(tid, row, col, index, items, value)

int tid IN : table id
int row IN : row number
int col IN : column number
int index IN : index number
int items IN : how many
double *value OUT: actual values


Function

TCARDI
 

int TCARDI(tid, row, col, index, items, value)

int tid IN : table id
int row IN : row number
int col IN : column number
int index IN : index number
int items IN : how many
int *value OUT: actual value


Function

TCARDR
 

int TCARDR(tid, row, col, index, items, value)

int tid IN : table id
int row IN : row number
int col IN : column number
int index IN : index number
int items IN : how many
float *value OUT: actual value


Function

TCADEL
 

int TCADEL(tid, row, col, index, items)

int tid IN : table id
int row IN : row number
int col IN : column number
int index IN : index number
int items IN : how many


Function

TCAWRC
 

int TCAWRC(tid, row, col, index, items, value)

int tid IN : table id
int row IN : row number
int col IN : column number
int index IN : index number
int items IN : how many
char *value IN : actual value


Function

TCAWRD
 

int TCAWRD(tid, row, col, index, items, value)

int tid IN : table id
int row IN : row number
int col IN : column number
int index IN : index number
int items IN : how many
double *value IN : actual value


Function

TCAWRI
 

int TCAWRI(tid, row, col, index, items, value)

int tid IN : table id
int row IN : row number
int col IN : column number
int index IN : index number
int items IN : how many
int *value IN : actual value


Function

TCAWRR
 

int TCAWRR(tid, row, col, index, items, value)

int tid IN : table id
int row IN : row number
int col IN : column number
int index IN : index number
int items IN : how many
float *value IN : actual value


Function

TCASRC
 

int TCASRC(tid, row, col, index, items, value, next)

int tid IN : table id
int row IN : starting row number
int col IN : column number
int index IN : index number
int items IN : how many items to compare
char *value IN : Comparison vector
int *next OUT: found row number


Function

TCASRD
 

int TCASRD(tid, row, col, index, items, value, next)

int tid IN : table id
int row IN : starting row number
int col IN : column number
int index IN : index number in col
int items IN : How many to compare
double *value IN : Comparison vector
int *next OUT: found row number


Function

TCASRI
 

int TCASRI(tid, row, col, index, items, value, next)

int tid IN : table id
int row IN : starting row number
int col IN : column number
int index IN : index number in col
int items IN : How many to compare
int *value IN : Comparison vector
int *next OUT: found row number


Function

TCASRR
 

int TCASRR(tid, row, col, index, items, value, next)

int tid IN : table id
int row IN : starting row number
int col IN : column number
int index IN : index number in col
int items IN : How many to compare
float *value IN : Comparison vector
int *next OUT: found row number



External references:

<tblsys.h><tbldef.h><midas_def.h><tblerr.h><atype.h><macrogen.h>
<math.h>



Module Version 3.4 (28-Feb-1991) Module TCC


Author:    J.D.Ponz IPG-ESO - Garching

Language:    C

Classification: table interface (Design 2.0)

Source file: $MIDASHOME/$MIDVERS/libsrc/tbl/tcc.c

Environment:

Comments:

This module contains the routines to handle columns in a table. Access to the table is done through the table identifier, returned by the routines TCTOPN and TCTINI. Access to a column is done through the column number, given by the routines TCCINI, TCCSER and TCLSER.

The following main functions are defined in this module:

Main arguments used by the routines are:

alen
array length. Integer number to define the number of items in a multiple column. In the case of character strings 'alen' defines the maximum length of the string.
colref
reference to the column by label or by number. It is a character string containing the ':label' if the column is referenced by label, or '#n' if the column is referenced by its sequential number.
column
sequential column number. It is an integer number provided by the system when a new column is created or defined by the user.
dtype
column data type. The system file 'midas_def.h' in 'MID_INCLUDE:' provides the symbols D_xx_FORMAT where 'xx' is 'I1', 'I2' or 'I4' for integer data, 'R4' for float, 'R8' for double precision and 'C' for character.
form
column format. Character string up to 6 characters. Display format associated to the column. The format is defined as in standard FORTRAN.
label
column label. Character string (up to 16 characters) provided by the use when the column is created. Valid characters are letters, digits and the underscore symbol '_'. In the current version labels are NOT case independent.
tid
table identifier. It is an integer number provided by the system when the table is created or opened.
unit
column unit. Character string (up to 16 characters) to define the units of the column.

History:

[1.0] 25-Mar-1987 Implementation JDP

[1.1] 20-Oct-1987 Modify calling sequence

[1.2] 23-Nov-1987 New SC calling sequence

[1.3] 11-Apr-1988 Include new routines without type conversion. Character string always ending with a ' 6#60'. New SC calling sequence.

[1.4] 26-Sep-1988 Modify calling sequence in TCCINI to include data types and array length.

[3.0] 01-Jul-1990 New Version with Arrays / Elementary IO Added TCCSEL routine (selection of Columns)

[3.1] 26-Sep-1990 Removed bug in TCCSRT

[3.2] 06-Dec-1990 Force New Version as soon as something modified.

[3.3] 18-Dec-1990 FO: Take into account the number of selected rows.

[3.4] 23-Feb-1991 Sort always writes NULL values at the end.


Function

TCCDEL
 

int TCCDEL(tid, column, ncol)

int tid IN: table id number
int column IN: column number
int *ncol OUT:actual number of columns


Function

TCCINI
 

int TCCINI(tid, dtype, alen, form, unit, label, column)

int tid IN: table id number
int dtype IN: column data type (Midas)
int alen IN: no. of array items
char *form IN: column form
char *unit IN: column unit
char *label IN: column label
int *column OUT:column number


Function

TCCMAP
 

int TCCMAP(tid, column, address)

int tid IN: table id number
int column IN: column number
char **address OUT:column address


Function

TCCSEL
 

int TCCSEL(tid, text, max_cols, cols, flags, found_cols)

int tid IN : table id
char *text IN : textual designation
int max_cols IN: Size of cols & flags arrays
int *cols OUT: column numbers
int *flags OUT: column flags (in brackets)
int *found_cols OUT: How many columns were found


Function

TCCSER
 

int TCCSER(tid, colref, column)

int tid IN : table id
char *colref IN : column reference
int *column OUT: column number


Function

TCCSRT
 

int TCCSRT(tid, nc, column, sortfl)

int tid IN : table id
int nc IN : number of columns
int column IN : column numbers
int sortfl IN : sort flag


Function

TCCUNM
 

int TCCUNM(tid, address)

int tid IN: table id number
char *address IN: column address



External references:

<tblsys.h><tbldef.h><tblerr.h><atype.h><macrogen.h>



Module Version 3.3 (24-Feb-1991) Module TCD


Author:    IPG-ESO Garching

Language:    C

Classification: table interface (Design version 2.0)

Source file: $MIDASHOME/$MIDVERS/libsrc/tbl/tcd.c

Environment:

Comments:

This module contains the routines to handle standard table descriptors:

Main arguments used by the routines are:

column
sequential column number. It is an integer number provided by the system when a new column is created or defined by the user.
dtype
column data type. The system file midas_def.h in MID_INCLUDE provides the symbols D_xx_FORMAT where 'xx' is 'I1','I2' or 'I4' for integers, 'R4' for float, 'R8' for double precision and 'C' for characters
form
column display format. It is a character string (up to 6 characters) defining a FORTRAN compatible format.
label
column label. Character string (up to 16 characters) defined by the user when the column is created. Valid characters are letters, digits and the underscore '_'. In the current version labels are NOT case independent.
row
sequential row number. It is an integer number defining the row number. The terms row and record are equivalent in this context.
tid
table identifier. It is an integer number provided by the system when the table is created or opened.
unit
column unit. It is a character string (up to 16 characters) to define the units of the column.

History:

[1.0] 25-Mar-1987 Implementation J.D. Ponz

[1.1] 25-Aug-1987 Include TCSPUT

[1.2] 20-Oct-1987 Calling sequence

[1.3] 23-Nov-1987 New SC calling sequence

[1.4] 11-Apr-1988 New SC calling sequence

[1.5] 11-Jan-1989 Include transposed file format

[1.6] 11-Jun-1989 New routines TCSCNT, TCDGET

[1.7] 14-Oct-1989 ibase = 1 in TCFSET ( not yet implemented)

[1.8] 02-Jan-1990 TCLSER modified (null terminator)

[3.0] 01-Jul-1990 New Version with Arrays / Elementary IO New entry points TCBGET / TCOSET / TCOGET

[3.1] 28-Oct-1990 Added TCFED (Edition bin -> char) and TCFDV (Conversion char->bin)

[3.2] 07-Dec-1990 Added TCVERS (Version)

[3.3] 18-Dec-1990 Selected rows are stored in TBLCONTR descriptor. Added TCSSET routine to write the descriptor.


Function

TCBGET
 

TCBGET(tid, column, dtype, items, bytes)

int tid IN : table ident
int column IN : column number
int *dtype OUT: data type
int *items OUT: array size
int *bytes OUT: storage required


Function

TCDGET
 

TCDGET(tid, store)

int tid IN : table id
int *store OUT: physical format on disk


Function

TCFGET
 

TCFGET(tid, column, form, len, dtype)

int tid IN : table ident
int column IN : column number
char *form OUT: column format
int *len OUT: field length
int *dtype OUT: data type


Function

TCFPUT
 

TCFPUT(tid, column, form)

int tid IN : table id
int column IN : column number
char *form IN : column format


Function

TCIGET
 

TCIGET(tid, column, row, nsort, allcol, allrow)

int tid IN : table id
int *column OUT: number of column
int *row OUT: number of rows
int *nsort OUT: sorted column
int *allcol OUT: number of allocated words per record
int *allrow OUT: number of allocated rows


Function

TCIPUT
 

TCIPUT(tid, column, row)

int tid IN : table id
int column IN: number of columns
int row IN: number of rows


Function

TCKGET
 

TCKGET(tid, column)

int tid IN : table id
int *column OUT: number of column


Function

TCKPUT
 

TCKPUT(tid, column)

int tid IN : table id
int column IN : column number


Function

TCLGET
 

TCLGET(tid, column, label)

int tid IN : table id
int column IN : column number
char *label OUT: label name


Function

TCLPUT
 

TCLPUT(tid, column, label)

int tid IN : table id
int column IN : column number
char *label IN : label name


Function

TCLSER
 

TCLSER(tid, label, column)

int tid IN : table id
char *label IN : label name
int *column OUT: column number


Function

TCOERR
 

TCOERR (tid, row, col, status, text)

int tid IN : table id
int row IN: row number
int col IN: column number
int status IN: Status
char *text IN: Text to add


Function

TCOGET
 

TCOGET(op_name, value)

char *op_name IN : Name of option
int *value OUT: Option's value


Function

TCOSET
 

TCOSET(op_name, value)

char *op_name IN : Name of option
int value IN : Option's value


Function

TCSGET
 

TCSGET(tid, row, value)

int tid IN : table id
int row IN : row number
int *value OUT: selection flag (TRUE if selected)


Function

TCSPUT
 

TCSPUT(tid, row, value)

int tid IN : table id
int row IN : row number
int *value IN: selection flag


Function

TCSCNT
 

TCSCNT(tid,count)

int tid IN : table id
int *count out: number of selected entries


Function

TCSINI
 

TCSINI(tid)

int tid IN : table id


Function

TCSINF
 

TCSINF(tid, line)

int tid IN : table id
char *line OUT: selection info


Function

TCSSET
 

TCSSET(tid, line)

int tid IN : table id
char *line IN : selection info


Function

TCUGET
 

TCUGET(tid, column, unit)

int tid IN : table id
int column IN : column number
char *unit OUT: unit name


Function

TCUPUT
 

TCUPUT(tid, column, unit)

int tid IN : table id
int column IN : column number
char *unit IN : unit name


Function

TCVERS
 

int TCVERS(tid)

int tid IN : table id



External references:

<tblsys.h><tbldef.h><macrogen.h><atype.h><midas_def.h>



Module Version 3.3 (28-Feb-1991) Module TCE


Author:    IPG-ESO Garching

Language:    C

Classification: table interface.

Source file: $MIDASHOME/$MIDVERS/libsrc/tbl/tce.c

Environment:

Comments:

This module contains the routines to handle table elements. Access to elements is done by column and row numbers. Elements in the table can be integer, float, double precision and character string data types, as defined during the creation of the columns. Implicit conversion of the element value is done automatically if the input/output is done with a routine not corresponding to the data type.

The functions provided by this module are:

Main arguments used by the routines are:

column
sequential column number. It is an integer number provided by the system when a new column is created, or it is defined by the user for already existing columns.
null
null flag. This value is 1 if the element is undefined, 0 otherwise.
row
sequential row number. It is an integer defining the row number in the table. The sequence number is the physical sequence number (by default) or the sequence corresponding to the index of the reference column.
tid
table identifier. It is an integer number provided by the system when the table is created or opened.
value
element value. The type depends on the routine name. Implicit conversion is done if this type does not correspond to the column data type. This variable is filled only if the value is defined.

In case of arrays, only the first element is returned for non-character data.

History:

[1.0] 25-Mar-1987 Implementation J.D. Ponz

[1.1] 21-Oct-1987 New calling sequence

[1.2] 11-Apr-1988 New calling sequence

[1.3] 26-Sep-1988 Use pointers for TCEWRx

[1.4] 16-Jan-1989 Include record file organization

[3.0] 01-Jul-1990 New Version with Arrays / Elementary IO

[3.1] 27-Sep-1990 Added TCEUNM

[3.2] 28-Oct-1990 Added TCEEDC (Edit, similar to TCERDC) and TCETRC (similar to TCEWRC)

[3.3] 18-Dec-1990 FO: Take into account the number of selected rows.


Function

TCEDEL
 

TCEDEL(tid, row, column)

int tid IN : table id
int row IN : row number
int column IN : column number


Function

TCEMAP
 

TCEMAP(tid, row, column, address, null)

int tid IN: table id number
int row IN: row number
int column IN: column number
char **address OUT: element adress
int *null OUT: 1 if element null


Function

TCEEDC
 

TCEEDC(tid, abin, column, buffer)

int tid IN : table id
char *abin IN : value to edit
int column IN : column number
char *buffer OUT: edited value


Function

TCERDC
 

TCERDC(tid, row, column, value, null)

int tid IN : table id
int row IN : row number
int column IN : column number
char *value OUT: actual value
int *null OUT: null flag


Function

TCERDD
 

TCERDD(tid,row,column,value,null)

int tid IN : table id
int row IN : row number
int column IN : column number
double *value OUT: actual value
int *null OUT: null flag


Function

TCERDI
 

TCERDI(tid,row,column,value,null)

int tid IN : table id
int row IN : row number
int column IN : column number
int *value OUT: actual value
int *null OUT: null flag


Function

TCERDR
 

TCERDR(tid,row,column,value,null)

int tid IN : table id
int row IN : row number
int column IN : column number
float *value OUT: actual value
int *null OUT: null flag


Function

TCETRC
 

TCETRC(tid, abin, column, buffer)

int tid IN : table id
char *abin OUT: value to edit
int column IN : column number
char *buffer IN : edited value


Function

TCEWRC
 

TCEWRC(tid,row,column,value)

int tid IN : table id
int row IN : row number
int column IN : column number
char *value IN : actual value


Function

TCEWRD
 

TCEWRD(tid,row,column,value)

int tid IN : table id
int row IN : row number
int column IN : column number
double *value IN : actual value


Function

TCEWRI
 

TCEWRI(tid,row,column,value)

int tid IN : table id
int row IN : row number
int column IN : column number
int *value IN : actual value


Function

TCEWRR
 

TCEWRR(tid,row,column,value)

int tid IN : table id
int row IN : row number
int column IN : column number
float *value IN : actual value


Function

TCESRC
 

TCESRC(tid, column, value, start, len, first, next)

int tid IN : table id
int column IN : column number
char *value IN : value to search
int start IN : starting position in field
int len IN : how many bytes to compare
int first IN : starting row
int *next OUT: found row number, -1 if not found


Function

TCESRD
 

TCESRD(tid,column,value,verror,first,next)

int tid IN : table id
int column IN : column number
double value IN : value to search
double verror IN : tolerance
int first IN : starting row number
int *next OUT: found row number, -1 if not found


Function

TCESRI
 

TCESRI(tid, column, value, verror, first, next)

int tid IN : table id
int column IN : column number
int value IN : value to search
int verror IN : tolerance
int first IN : starting row number
int *next OUT: found row number, -1 if not found


Function

TCESRR
 

TCESRR(tid, column, value, verror, first, next)

int tid IN : table id
int column IN : column number
float value IN : value to search
float verror IN : tolerance
int first IN : starting row number
int *next OUT: found row number, -1 if not found


Function

TCEUNM
 

TCEUNM(tid, address)

int tid IN: table id number
char *address IN: column address



External references:

<tblsys.h><tbldef.h><midas_def.h><tblerr.h><atype.h><macrogen.h>
<math.h>



Module Version 3.0 (24-Feb-1991) Module TCM


Author:    J.D.Ponz IPG-ESO Garching

Language:    C

Classification: table interface (Design 2.0)

Source file: $MIDASHOME/$MIDVERS/libsrc/tbl/tcm.c

Environment:

Comments:This module contains the routines handling the table structure as a matrix. The following operations can be performed:

- Allocate memory for the matrix (TCMALL)

- Release memory associated to the matrix (TCMFRE)

- Copy (selected) table entries into the matrix, with implicit type conversion (TCMGET)

- Copy the matrix into the (selected entries of the) table (TCMPUT)

- Obtain the bit pattern used for the representation of NULL values in memory (TCMNUL). History:

[1.0] 25-Mar-1988 Implementation JDP

[3.0] 01-Jul-1990 New Version with Arrays / Elementary IO


Function

TCMALL
 

TCMALL(type, ncol, nrow, pointer)

char *type IN: column type
int ncol IN: number of columns
int nrow IN: number of rows
int *pointer OUT: pointer to the allocated matrix


Function

TCMFRE
 

TCMFRE(pointer)

int *pointer IN: pointer to the allocated matrix


Function

TCMGET
 

TCMGET(tid, pointer, nac, nar)

int tid IN : table id
int *pointer IN : pointer to the allocated matrix
int *nac OUT: actual number of columns
int *nar OUT: actual number of rows


Function

TCMPUT
 

TCMPUT(tid, pointer, nac, nar)

int tid IN : table id
int *pointer IN : pointer to the allocated matrix
int nac IN : actual number of columns
int nar IN : actual number of rows


Function

TCMCON
 

TCMCON(tblsel, tdtrue, tdfalse)

float *tblsel OUT: selection flag on
double *tdtrue OUT: double precision true
double *tdfalse OUT: double precision false


Function

TCMNUL
 

TCMNUL(inull, rnull, dnull)

int *inull OUT: integer null value
float *rnull OUT: float null value
double *dnull OUT: double null value



External references:

<tblsys.h><tbldef.h><tblerr.h>



Module Version 3.2 (24-Feb-1991) Module TCR


Author:    IPG-ESO Garching

Language:    C

Classification: table interface (old table system)

Source file: $MIDASHOME/$MIDVERS/libsrc/tbl/tcr.c

Environment:

Comments:

This module contains the routines to handle table rows. Access to elements is done by column and row numbers. Elements in the table can be integer, float, double precision and character string data types, as defined during the creation of the columns. Implicit conversion of the element value is done automatically if the input/output is done with a routine not corresponding to the data type.

The functions provided by this module are:

Main arguments used by the routines are:

column
sequential column number. Integer array defining the set of columns to be considered.
null
null flag. It is an array with a value TRUE if the corresponding element is undefined, FALSE otherwise.
row
sequential row number. The sequence number is the physical sequence number (by default) or the sequence corresponding to the index of the reference column.
tid
table identifier. It is an integer number provided by the system when the table is created or opened.
value
row values. The type depends on the routine name. Implicit conversion is done if this type does not correspond to the column data type.

History:

[1.0] 25-Mar-1987 Implementation J.D. Ponz

[1.1] 21-Oct-1987 Modification of the calling sequence

[1.2] 11-Apr-1988 Modification of the calling sequence

[1.3] 11-Jan-1989 Include record file organization

[1.4] 16-Oct-1989 indexing (ifirst-1)

[3.0] 01-Jul-1990 New Version with Arrays / Elementary IO Added Routine TCRSEL

[3.1] 27-Sep-1990 Added TCRMAP TCRUMP

[3.2] 18-Dec-1990: Take into account the number of selected rows.


Function

TCRDEL
 

TCRDEL(tid, row)

int tid IN : table id
int row IN : row number


Function

TCRRDC
 

TCRRDC(tid, row, nc, column, value, null)

int tid IN : table id
int row IN : row number
int nc IN : number of cols.
int *column IN : column numbers
char *value OUT: buffer for actual value
int *null OUT: null flag


Function

TCRRDD
 

TCRRDD(tid, row, nc, column, value, null)

int tid IN : table id
int row IN : row number
int nc IN : number of cols.
int *column IN : column numbers
double *value OUT: buffer for actual values
int *null OUT: buffer for null flags


Function

TCRRDI
 

TCRRDI(tid, row, nc, column, value, null)

int tid IN : table id
int row IN : row number
int nc IN : number of cols.
int *column IN : column numbers
int *value OUT: buffer for actual values
int *null OUT: buffer for null flags


Function

TCRRDR
 

TCRRDR(tid, row, nc, column, value, null)

int tid IN : table id
int row IN : row number
int nc IN : number of cols.
int *column IN : column numbers
float value OUT: buffer for actual values
int null OUT: buffer for null flags


Function

TCRSEL
 

TCRSEL(tid, text, max_ranges, lower_bounds, upper_bounds, found_ranges)

int tid IN : table id
char *text IN : textual designation
int max_ranges IN: Size of lower& upper bound arrays
int *lower_bounds OUT: lower bounds of found ranges
int *upper_bounds OUT: upper bounds of found ranges
int *found_ranges OUT: How many ranges were found


Function

TCRWRC
 

TCRWRC(tid, row, nc, column, value)

int tid IN : table id
int row IN : row number
int nc IN : number of cols.
int *column IN : column numbers
char *value IN : values to write


Function

TCRWRD
 

TCRWRD(tid, row, nc, column, value)

int tid IN : table id
int row IN : row number
int nc IN : number of cols.
int *column IN : column numbers
double *value IN : array with values


Function

TCRWRI
 

TCRWRI(tid, row, nc, column, value)

int tid IN : table id
int row IN : row number
int nc IN : number of cols.
int *column IN : column numbers
int *value IN : data array


Function

TCRWRR
 

TCRWRR(tid, row, nc, column, value)

int tid IN : table id
int row IN : row number
int nc IN : number of cols.
int *column IN : column numbers
float *value IN : data array



External references:

<tblsys.h><tbldef.h><tblerr.h><atype.h><macrogen.h><math.h>



Module Version 3.6 (25-Feb-1991) Module TCT


Author:    IPG-ESO Garching

Language:    C

Classification: table interface

Source file: $MIDASHOME/$MIDVERS/libsrc/tbl/tct.c

Environment:

Comments:

This module contains the routines to handle tables as a whole. Table initialization and open table functions return the table identification tid, used by other table routines.

Tables are physically stored on disk in two different formats: by records, corresponding to the natural way of storing sequentially the rows, and transposed, where all the values of a single variable - column - are stored together. It is the responsibility of the user to decide the physical format when initializing the table file.

The functions provided by this module are:

Main arguments used by the routines are:

allcol
number of words per record allocated physically in the table file.
allrow
number of records (rows) allocated physically in the table file.
mode
file opening mode. There are several modes to open a table: F_I_MODE input (TBTOPN), F_O_MODE output (TBTINI), F_IO_MODE input/output (TBTOPN), F_X_MODE scratch (TBTINI), F_D_MODE descriptors only (TBTOPN). These symbols are provided in the file 'midas_def.h' in the directory 'MID_INCLUDE'.

The access mode may be forced to mapping with the F_MAP_FORCE option, or to elementary i/o mode with the F_EIO_FORCE option. The default is EIO mode for tables larger than TBL_EIO_LIMIT bytes, a configuration parameter which may be changed with TCOSET

name
table file name. It is a character string defining the file name of the table as follows: '[path_name]table_name[.ext]', where 'path_name' is the directory path name, defaulted to the working directory, 'table_name' is the name of the file and 'ext' is the file extension, defaulted to 'tbl'.
storage
physical file format. Defined as F_RECORD if the table is stored by records, or F_TRANS for transposed format. These symbols are provided in the file 'midas_def.h' in the directory 'MID_INCLUDE'.
tid
table identifier. It is an integer number provided by the system when the table is created or opened.

History:

[1.0] 25-Mar-1987 Definition J.D. Ponz

[1.1] 21-Oct-1987 Modification of calling sequence

[1.2] 23-Nov-1987 New SC calling sequence

[1.3] 11-Apr-1988 New SC calling sequence

[3.0] 01-Jul-1990 New Version with Arrays / Elementary IO

[3.1] 27-Sep-1990 Added TCTFLU TCTMAP

[3.2] 17-Oct-1990 Added TCTID (Find ID from Name)

[3.3] 29-Oct-1990 Corrected bug in transformation old fmt=>new

[3.4] 06-Dec-1990 Keep Number identical to SC routines. Force change for new NULL values

[3.5] 18-Dec-1990: Added descriptor containaing number of selected rows.

[3.6] 24-Feb-1991: Always close the table, even in read-only mode


Function

TCTCLO
 

int TCTCLO(tid)

int tid IN : table id


Function

TCTCRV
 

int TCTCRV(name, refer_name, mode)

char *name IN : Name of view to create
char *refer_name IN : Name of related table
int mode IN : creation mode (future)


Function

TCTUNM
 

int TCTUNM(tid)

int tid IN : table id


Function

TCTID
 

int TCTID(name)

char *name IN: Name to look for


Function

TCTINI
 

int TCTINI(name, storage, mode, allcol, allrow, tid)

char *name IN : table name
int storage IN : physical structure on disk
int mode IN : openning mode
int allcol IN : number of words per record alloc.
int allrow IN : number of rows allocated
int *tid MOD: table identifier (try to keep it)


Function

TCTMAP
 

int TCTMAP(tid, addr)

int tid IN : table id
char **addr OUT: Where table Mapped


Function

TCTOPN
 

int TCTOPN(name,mode,tid)

char *name IN : table name
int mode IN : openning mode
int *tid MOD: table identifier (try to keep it)



External references:

<tblsys.h><tbldef.h><midas_def.h><tblerr.h><macrogen.h>



Module Version [1.00] (26-Apr-1989) Module TBC


Author:    J.D.Ponz ESO - Garching

Language:    F77

Classification: table interfaces.

Source file: MID_DISK:['MIDASHOME'.'MIDVERS'.LIBSRC.FTOC]TBC.FOR

Environment:

Comments:Contains layer between FORTRAN TB interfaces and the TZ interfaces. Version using the length of character strings as an explicit argument. Module related to table columns. History:

[[1.00]] 880408: created


Subroutine

TBCDEL
 

TBCDEL(TID, COLUMN, NC, STATUS)

INTEGER TID IN : table identifier
INTEGER COLUMN IN : column number
INTEGER NC OUT: actual number of columns
INTEGER STATUS OUT: status


Subroutine

TBCINI
 

TBCINI(TID, TYP, ALEN, FORM, UNIT, LABEL, COLUMN, STATUS)

INTEGER TID IN : table identifier
INTEGER TYP IN : column type
INTEGER ALEN IN : no. of items
CHARACTER*(*) FORM IN : column format
CHARACTER*(*) UNIT IN : column unit
CHARACTER*(*) LABEL IN : column label
INTEGER COLUMN OUT: column number
INTEGER STATUS OUT: status


Subroutine

TBCMAP
 

TBCMAP(TID, COLUMN, ADDRES, STATUS)

INTEGER TID IN : table identifier
INTEGER COLUMN IN : column number
INTEGER ADDRES OUT: column address
INTEGER STATUS OUT: status


Subroutine

TBCSER
 

TBCSER(TID, COLREF, COLUMN, STATUS)

INTEGER TID IN : table identifier
CHARACTER*(*) COLREF IN : column reference
INTEGER COLUMN OUT: column number
INTEGER STATUS OUT: status


Subroutine

TBCSRT
 

TBCSRT(TID, NC, COLUMN, SFLAG, STATUS)

INTEGER TID IN : table identifier
INTEGER NC IN : number of columns to sort
INTEGER COLUMN(NC) IN : column numbers
INTEGER SFLAG(NC) IN : sort flag (>0 asc., <0 desc.)
INTEGER STATUS OUT: status


External references:

MID_DISK:['MIDASHOME'.'MIDVERS'.INCL]ST_DEF.INC
MID_DISK:['MIDASHOME'.'MIDVERS'.INCL]ST_DAT.INC



Module Version [1.00] (26-Apr-1989) Module TBD


Author:    J.D.Ponz ESO - Garching

Language:    F77

Classification: table interfaces.

Source file: MID_DISK:['MIDASHOME'.'MIDVERS'.LIBSRC.FTOC]TBD.FOR

Environment:

Comments:Contains layer between FORTRAN TB interfaces and the TZ interfaces. Version including the length of characters as explicit argument in the calling sequence. Module related to table descriptors. History:

[[1.00]] 880408: created


Subroutine

TBFGET
 

TBFGET(TID, COLUMN, FORM, LFIELD, TYP, STATUS)

INTEGER TID IN : table identifier
INTEGER COLUMN IN : column number
CHARACTER*(*) FORM OUT: column format
INTEGER LFIELD OUT: field length
INTEGER TYP OUT: column type
INTEGER STATUS OUT: status


Subroutine

TBFPUT
 

TBFPUT(TID, COLUMN, FORM, STATUS)

INTEGER TID IN : table identifier
INTEGER COLUMN IN : column number
CHARACTER*(*) FORM IN : column format
INTEGER STATUS OUT: status


Subroutine

TBIGET
 

TBIGET(TID, COLUMN, ROW, NSC, ACOL, AROW, STATUS)

INTEGER TID IN : table identifier
INTEGER COLUMN OUT: number of defined columns
INTEGER ROW OUT: number of defined rows
INTEGER NSC OUT: sorted column
INTEGER ACOL OUT: number of words allocated per row
INTEGER AROW OUT: number of rows allocated
INTEGER STATUS OUT: status


Subroutine

TBIPUT
 

TBIPUT(TID, COLUMN, ROW, STATUS)

INTEGER TID IN : table identifier
INTEGER COLUMN IN : number of defined columns
INTEGER ROW IN : number of defined rows
INTEGER STATUS OUT: status


Subroutine

TBKGET
 

TBKGET(TID, COLUMN, STATUS)

INTEGER TID IN : table identifier
INTEGER COLUMN OUT: index of reference column
INTEGER STATUS OUT: status


Subroutine

TBKPUT
 

TBKPUT(TID, COLUMN, STATUS)

INTEGER TID IN : table identifier
INTEGER COLUMN IN : index of reference column
INTEGER STATUS OUT: status


Subroutine

TBLGET
 

TBLGET(TID, COLUMN, LABEL, STATUS)

INTEGER TID IN : table identifier
INTEGER COLUMN IN : column number
CHARACTER*(*) LABEL OUT: column label
INTEGER STATUS OUT: status


Subroutine

TBLPUT
 

TBLPUT(TID, COLUMN, LABEL, STATUS)

INTEGER TID IN : table identifier
INTEGER COLUMN IN : column number
CHARACTER*(*) LABEL IN : column label
INTEGER STATUS OUT: status


Subroutine

TBLSER
 

TBLSER(TID, LABEL, COLUMN, STATUS)

INTEGER TID IN : table identifier
CHARACTER*(*) LABEL IN : column label
INTEGER COLUMN OUT: column number
INTEGER STATUS OUT: status


Subroutine

TBSGET
 

TBSGET(TID, ROW, VALUE, STATUS)

INTEGER TID IN : table identifier
INTEGER ROW IN : row number
LOGICAL VALUE OUT: selection flag
INTEGER STATUS OUT: status


Subroutine

TBSPUT
 

TBSPUT(TID, ROW, VALUE, STATUS)

INTEGER TID IN : table identifier
INTEGER ROW IN : row number
LOGICAL VALUE IN : selection flag
INTEGER STATUS OUT: status


Subroutine

TBSINI
 

TBSINI(TID, STATUS)

INTEGER TID IN : table identifier
INTEGER STATUS OUT: status


Subroutine

TBUGET
 

TBUGET(TID, COLUMN, UNIT, STATUS)

INTEGER TID IN : table identifier
INTEGER COLUMN IN : column number
CHARACTER*(*) UNIT OUT: column unit
INTEGER STATUS OUT: status


Subroutine

TBUPUT
 

TBUPUT(TID, COLUMN, UNIT, STATUS)

INTEGER TID IN : table identifier
INTEGER COLUMN IN : column number
CHARACTER*(*) UNIT IN : column unit
INTEGER STATUS OUT: status


External references:

MID_DISK:['MIDASHOME'.'MIDVERS'.INCL]ST_DEF.INC
MID_DISK:['MIDASHOME'.'MIDVERS'.INCL]ST_DAT.INC



Module Version [1.02] (26-Apr-1989) Module TBE


Author:    J.D.Ponz ESO - Garching

Language:    F77

Classification: table interfaces.

Source file: MID_DISK:['MIDASHOME'.'MIDVERS'.LIBSRC.FTOC]TBE.FOR

Environment:

Comments:Contains layer between FORTRAN TB interfaces and the TZ interfaces. Version including the length of characters as explicit argument in the calling sequence. Module related to table elements. History:

[[1.00]] 880408: created

[[1.01]] 881012: temporary names for tbesrX

[[1.02]] 890112: Include routines TBESRx


Subroutine

TBEGET
 

TBEGET(TID, TYPE, ROW, COLUMN, VALUE, NULL, STATUS)

INTEGER TID IN : table identifier
CHARACTER*(*) TYPE IN : data type
INTEGER ROW IN : row number
INTEGER COLUMN IN : column number
INTEGER VALUE(1) OUT: table element
LOGICAL NULL OUT: null flag
INTEGER STATUS OUT: status


Subroutine

TBEPUT
 

TBEPUT(TID, TYPE, ROW, COLUMN, VALUE, STATUS)

INTEGER TID IN : table identifier
CHARACTER*(*) TYPE IN : argument type
INTEGER ROW IN : row number
INTEGER COLUMN IN : column number
INTEGER VALUE(1) IN : table element
INTEGER STATUS OUT: status


Subroutine

TBEDEL
 

TBEDEL(TID, ROW, COLUMN, STATUS)

INTEGER TID IN : table identifier
INTEGER ROW IN : row number
INTEGER COLUMN IN : column number
INTEGER STATUS OUT: status


Subroutine

TBERDC
 

TBERDC(TID, ROW, COLUMN, VALUE, NULL, STATUS)

INTEGER TID IN : table identifier
INTEGER ROW IN : row number
INTEGER COLUMN IN : column number
CHARACTER*(*) VALUE OUT: table element
LOGICAL NULL OUT: null flag
INTEGER STATUS OUT: status


Subroutine

TBERDD
 

TBERDD(TID, ROW, COLUMN, VALUE, NULL, STATUS)

INTEGER TID IN : table identifier
INTEGER ROW IN : row number
INTEGER COLUMN IN : column number
DOUBLE PRECISION VALUE OUT: table element
LOGICAL NULL OUT: null flag
INTEGER STATUS OUT: status


Subroutine

TBERDI
 

TBERDI(TID, ROW, COLUMN, VALUE, NULL, STATUS)

INTEGER TID IN : table identifier
INTEGER ROW IN : row number
INTEGER COLUMN IN : column number
INTEGER VALUE OUT: table element
LOGICAL NULL OUT: null flag
INTEGER STATUS OUT: status


Subroutine

TBERDR
 

TBERDR(TID, ROW, COLUMN, VALUE, NULL, STATUS)

INTEGER TID IN : table identifier
INTEGER ROW IN : row number
INTEGER COLUMN IN : column number
REAL VALUE OUT: table element
LOGICAL NULL OUT: null flag
INTEGER STATUS OUT: status


Subroutine

TBEWRC
 

TBEWRC(TID, ROW, COLUMN, VALUE, STATUS)

INTEGER TID IN : table identifier
INTEGER ROW IN : row number
INTEGER COLUMN IN : column number
CHARACTER*(*) VALUE IN : table element
INTEGER STATUS OUT: status


Subroutine

TBEWRD
 

TBEWRD(TID, ROW, COLUMN, VALUE, STATUS)

INTEGER TID IN : table identifier
INTEGER ROW IN : row number
INTEGER COLUMN IN : column number
DOUBLE PRECISION VALUE IN : table element
INTEGER STATUS OUT: status


Subroutine

TBEWRI
 

TBEWRI(TID, ROW, COLUMN, VALUE, STATUS)

INTEGER TID IN : table identifier
INTEGER ROW IN : row number
INTEGER COLUMN IN : column number
INTEGER VALUE IN : table element
INTEGER STATUS OUT: status


Subroutine

TBEWRR
 

TBEWRR(TID, ROW, COLUMN, VALUE, STATUS)

INTEGER TID IN : table identifier
INTEGER ROW IN : row number
INTEGER COLUMN IN : column number
REAL VALUE IN : table element
INTEGER STATUS OUT: status


Subroutine

TBESRC
 

TBESRC(TID, COLUMN, VALUE, START, NB, FIRST, NEXT, STATUS)

INTEGER TID IN : table identifier
INTEGER COLUMN IN : column number
CHARACTER*(*) VALUE IN : string of characters
INTEGER START IN : starting field position
INTEGER NB IN : number of bytes in the field
INTEGER FIRST IN : row number to start searching
INTEGER NEXT OUT: row number of the element found
INTEGER STATUS OUT: status


Subroutine

TBESRD
 

TBESRD(TID, COLUMN, VALUE, ERROR, FIRST, NEXT, STATUS)

INTEGER TID IN : table identifier
INTEGER COLUMN IN : column number
DOUBLE PRECISION VALUE IN : value to search
DOUBLE PRECISION ERROR IN : tolerance in the search
INTEGER FIRST IN : row number to start searching
INTEGER NEXT OUT: row number of the element found
INTEGER STATUS OUT: status


Subroutine

TBESRI
 

TBESRI(TID, COLUMN, VALUE, ERROR, FIRST, NEXT, STATUS)

INTEGER TID IN : table identifier
INTEGER COLUMN IN : column number
INTEGER VALUE IN : value to search
INTEGER ERROR IN : error in the search
INTEGER FIRST IN : row number to start searching
INTEGER NEXT OUT: row number of the element found
INTEGER STATUS OUT: status


Subroutine

TBESRR
 

TBESRR(TID, COLUMN, VALUE, ERROR, FIRST, NEXT, STATUS)

INTEGER TID IN : table identifier
INTEGER COLUMN IN : column number
REAL VALUE IN : value to search
REAL ERROR IN : error in the search
INTEGER FIRST IN : row number to start searching
INTEGER NEXT OUT: row number of the element found
INTEGER STATUS OUT: status



Module Version [1.00] (26-Apr-1989) Module TBM


Author:    J.D.Ponz ESO - Garching

Language:    F77

Classification: table interfaces.

Source file: MID_DISK:['MIDASHOME'.'MIDVERS'.LIBSRC.FTOC]TBM.FOR

Environment:

Comments:Contains layer between FORTRAN TB interfaces and the TZ interfaces. Version including the length of characters as explicit argument in the calling sequence. Module related to memory mapping in the context of tables. History:

[[1.00]] 880408: created


Subroutine

TBMCON
 

TBMCON(TBLSEL, TDTRUE, TDFALS)

REAL TBLSEL OUT: selection flag
DOUBLE PRECISION TDTRUE OUT: double precision true
DOUBLE PRECISION TDFALS OUT: double precision false


Subroutine

TBMNUL
 

TBMNUL(TINULL, TRNULL, TDNULL)

INTEGER TINULL OUT: integer null
REAL TRNULL OUT: real null
DOUBLE PRECISION TDNULL OUT: double precision null



Module Version [1.00] (26-Apr-1989) Module TBR


Author:    J.D.Ponz ESO - Garching

Language:    F77

Classification: table interfaces.

Source file: MID_DISK:['MIDASHOME'.'MIDVERS'.LIBSRC.FTOC]TBR.FOR

Environment:

Comments:Contains layer between FORTRAN TB interfaces and the TZ interfaces. Version including the length of characters as explicit argument in the calling sequence. Module related to table rows. History:

[[1.00]] 880408: created


Subroutine

TBRGET
 

TBRGET(TID, TYPE, ROW, NC, COLUMN, VALUE, NULL, STATUS)

INTEGER TID IN : table identifier
CHARACTER*(*) TYPE IN : data type
INTEGER ROW IN : row number
INTEGER NC IN : number of columns
INTEGER COLUMN(NC) IN : column number
INTEGER VALUE(1) OUT: table element
LOGICAL NULL(NC) OUT: null flag
INTEGER STATUS OUT: status


Subroutine

TBRPUT
 

TBRPUT(TID, TYPE, ROW, NC, COLUMN, VALUE, STATUS)

INTEGER TID IN : table identifier
CHARACTER*(*) TYPE IN : argument type
INTEGER ROW IN : row number
INTEGER NC IN : number of columns
INTEGER COLUMN(NC) IN : column number
INTEGER VALUE(1) IN : table element
INTEGER STATUS OUT: status


Subroutine

TBRDEL
 

TBRDEL(TID, ROW, STATUS)

INTEGER TID IN : table identifier
INTEGER ROW IN : row number
INTEGER STATUS OUT: status


Subroutine

TBRRDC
 

TBRRDC(TID, ROW, NC, COLUMN, VALUE, NULL, STATUS)

INTEGER TID IN : table identifier
INTEGER ROW IN : row number
INTEGER NC IN : number of columns
INTEGER COLUMN(NC) IN : column index
CHARACTER*(*) VALUE OUT: table row
LOGICAL NULL(NC) OUT: null flag
INTEGER STATUS OUT: status


Subroutine

TBRRDD
 

TBRRDD(TID, ROW, NC, COLUMN, VALUE, NULL, STATUS)

INTEGER TID IN : table identifier
INTEGER ROW IN : row number
INTEGER NC IN : number of columns
INTEGER COLUMN(NC) IN : column index
DOUBLE PRECISION VALUE(NC) OUT: table row
LOGICAL NULL(NC) OUT: null flag
INTEGER STATUS OUT: status


Subroutine

TBRRDI
 

TBRRDI(TID, ROW, NC, COLUMN, VALUE, NULL, STATUS)

INTEGER TID IN : table identifier
INTEGER ROW IN : row number
INTEGER NC IN : number of columns
INTEGER COLUMN(NC) IN : column index
INTEGER VALUE(NC) OUT: table row
LOGICAL NULL(NC) OUT: null flag
INTEGER STATUS OUT: status


Subroutine

TBRRDR
 

TBRRDR(TID, ROW, NC, COLUMN, VALUE, NULL, STATUS)

INTEGER TID IN : table identifier
INTEGER ROW IN : row number
INTEGER NC IN : number of columns
INTEGER COLUMN(NC) IN : column index
REAL VALUE(NC) OUT: table row
LOGICAL NULL(NC) OUT: null flag
INTEGER STATUS OUT: status


Subroutine

TBRWRC
 

TBRWRC(TID, ROW, NC, COLUMN, VALUE, STATUS)

INTEGER TID IN : table identifier
INTEGER ROW IN : row number
INTEGER NC IN : number of columns
INTEGER COLUMN(NC) IN : column index
CHARACTER*(*) VALUE IN : table row
INTEGER STATUS OUT: status


Subroutine

TBRWRD
 

TBRWRD(TID, ROW, NC, COLUMN, VALUE, STATUS)

INTEGER TID IN : table identifier
INTEGER ROW IN : row number
INTEGER NC IN : number of columns
INTEGER COLUMN(NC) IN : column index
DOUBLE PRECISION VALUE(NC) IN : table row
INTEGER STATUS OUT: status


Subroutine

TBRWRI
 

TBRWRI(TID, ROW, NC, COLUMN, VALUE, STATUS)

INTEGER TID IN : table identifier
INTEGER ROW IN : row number
INTEGER NC IN : number of columns
INTEGER COLUMN(NC) IN : column index
INTEGER VALUE(NC) IN : table row
INTEGER STATUS OUT: status


Subroutine

TBRWRR
 

TBRWRR(TID, ROW, NC, COLUMN, VALUE, STATUS)

INTEGER TID IN : table identifier
INTEGER ROW IN : row number
INTEGER NC IN : number of columns
INTEGER COLUMN(NC) IN : column index
REAL VALUE(NC) IN : table row
INTEGER STATUS OUT: status



Module Version [1.00] (26-Apr-1989) Module TBT


Author:    J.D.Ponz ESO - Garching

Language:    F77

Classification: table interfaces.

Source file: MID_DISK:['MIDASHOME'.'MIDVERS'.LIBSRC.FTOC]TBT.FOR

Environment:

Comments:Contains layer between FORTRAN TB interfaces and the TZ interfaces. Version using the length of character strings as an explicit argument. Module related to the table handling. History:

[[1.00]] 880408: created


Subroutine

TBTCLO
 

TBTCLO(TID, STATUS)

INTEGER TID IN : table identifier
INTEGER STATUS OUT: status


Subroutine

TBTINI
 

TBTINI(NAME, STORE, MODE, ACOL, AROW, TID, STATUS)

CHARACTER*(*) NAME IN : table name
INTEGER STORE IN : physical structure on disk (0/1)
INTEGER MODE IN : opening mode
INTEGER ACOL IN : number of words per row
INTEGER AROW IN : number of rows
INTEGER TID OUT: table identifier
INTEGER STATUS OUT: status


Subroutine

TBTOPN
 

TBTOPN(NAME, MODE, TID, STATUS)

CHARACTER*(*) NAME IN : table name
INTEGER MODE IN : opening mode
INTEGER TID OUT: table identifier
INTEGER STATUS OUT: status


External references:

MID_DISK:['MIDASHOME'.'MIDVERS'.INCL]ST_DEF.INC
MID_DISK:['MIDASHOME'.'MIDVERS'.INCL]ST_DAT.INC



next up previous contents index
Next: Graphics Interfaces Up: No Title Previous: Standard Interfaces
Send comments to web@eso.org
Last update: 1998-10-23