LAL  7.5.0.1-08ee4f4
Module StreamVectorSequenceInput.c

Detailed Description

Reads the entire contents of an input stream into a vector sequence.

Author
Creighton, T. D.

Description

These routines read data from the I/O stream *stream until the end-of-input is reached. Each line is stored as a data vector, and the vectors are combined into a LAL vector sequence structure **sequence. Each line vector is padded with zeros to match the length of the longest line. The routine passes back a pointer to the new structure.

The routine LALCHARReadVectorSequence() essentially stores an image of the I/O stream as a sequence of lines padded with '\0' characters. However, it will skip over any empty lines, which occur, for instance, when the end-of-input or a null character '\0' occurs immediately following a newline character '
'
. The numeric routines will additionally skip blank lines, comment lines, or other input lines that have no parseable numbers in them. (As with the routines in StreamVectorInput.c, comment in sindicated by a # sign at the beginning of a line or a % sign anywhere in the line, signifying that the remainder of the line is to be ignored.) However, if an input line contains any parseable data, then the corresponding vector in the vector sequence will be allocated (and padded with zeros, if it is shorter than the longest line).

Algorithm

These functions first create a linked list of vectors, using the routines in StreamVectorInput.c to read them in. Once the list is complete, the longest vector length is determined, and the vector sequence is created and filled.

The numeric routines skip over blank, comment, or otherwise unparseable lines by catching and handling the LEN error code generated by the vector input routine. However, it is worth pointing out that the vector input routine will have generated an error message if the error reporting bit in lalDebugLevel was set. The vector sequence input routines will therefore generate a followup messages indicating that the preceding error was successfully dealt with. So you may see pairs of ABORT: and CONTINUE: error messages when reading files containing blank or comment lines.

Prototypes

void LALCHARReadVectorSequence (LALStatus *status, CHARVectorSequence **sequence, FILE *stream)
 
void LALI2ReadVectorSequence (LALStatus *status, INT2VectorSequence **sequence, FILE *stream)
 
void LALI4ReadVectorSequence (LALStatus *status, INT4VectorSequence **sequence, FILE *stream)
 
void LALI8ReadVectorSequence (LALStatus *status, INT8VectorSequence **sequence, FILE *stream)
 
void LALU2ReadVectorSequence (LALStatus *status, UINT2VectorSequence **sequence, FILE *stream)
 
void LALU4ReadVectorSequence (LALStatus *status, UINT4VectorSequence **sequence, FILE *stream)
 
void LALU8ReadVectorSequence (LALStatus *status, UINT8VectorSequence **sequence, FILE *stream)
 
void LALSReadVectorSequence (LALStatus *status, REAL4VectorSequence **sequence, FILE *stream)
 
void LALDReadVectorSequence (LALStatus *status, REAL8VectorSequence **sequence, FILE *stream)
 

Function Documentation

◆ LALCHARReadVectorSequence()

void LALCHARReadVectorSequence ( LALStatus status,
CHARVectorSequence **  sequence,
FILE *  stream 
)

Definition at line 46 of file StreamVectorSequenceInput.c.

◆ LALI2ReadVectorSequence()

void LALI2ReadVectorSequence ( LALStatus status,
INT2VectorSequence **  sequence,
FILE *  stream 
)

◆ LALI4ReadVectorSequence()

void LALI4ReadVectorSequence ( LALStatus status,
INT4VectorSequence **  sequence,
FILE *  stream 
)

◆ LALI8ReadVectorSequence()

void LALI8ReadVectorSequence ( LALStatus status,
INT8VectorSequence **  sequence,
FILE *  stream 
)

◆ LALU2ReadVectorSequence()

void LALU2ReadVectorSequence ( LALStatus status,
UINT2VectorSequence **  sequence,
FILE *  stream 
)

◆ LALU4ReadVectorSequence()

void LALU4ReadVectorSequence ( LALStatus status,
UINT4VectorSequence **  sequence,
FILE *  stream 
)

◆ LALU8ReadVectorSequence()

void LALU8ReadVectorSequence ( LALStatus status,
UINT8VectorSequence **  sequence,
FILE *  stream 
)

◆ LALSReadVectorSequence()

void LALSReadVectorSequence ( LALStatus status,
REAL4VectorSequence **  sequence,
FILE *  stream 
)

◆ LALDReadVectorSequence()

void LALDReadVectorSequence ( LALStatus status,
REAL8VectorSequence **  sequence,
FILE *  stream 
)