ObitParser.h File Reference
Input utility parser. More...
#include "Obit.h"
#include "ObitFile.h"
#include "ObitErr.h"
#include "ObitInfoList.h"
Go to the source code of this file.
Detailed Description
Input utility parser.
This file contains utility functions for parsing program input parameters from an input text file and storing in an ObitInfoList. Order of the entries in the text file is arbitrary. A set of defined value names with default values are given to the parser. Supported types are:
- integers (as oint)
- boolean
- floats (as gdouble)
- character strings
To use do to following:
The text input file is a free form with keyword=value form. Comments are preceeded by # and an entire line may be a comment. An entry consists of a header line beginning with "$Key = ", followed by the name of the entry, a data type code and the dimensionality as a Fortran dimensionality, (n,m) = n x m array with elementson the n axis varying most rapidly. Values start on the second line of an entry and take as many lines as necessary with a list of blank separated values. Character strings are one per line. The type codes are:
- Str String, first element of dimension is number of characters in each string, Note: these are NOT NULL terminated.
- Int Integer as oint.
- Boo Boolean, 'T' = true, 'F' = false
- Flt Floating as gdouble, Example Input file
$Key = stringD Str (48)
somefile.fits # string input
$Key = integerD Int (1)
13
$Key = floatD Flt (2)
5.6789 3.478e5
$Key = BoolD Boo (1)
T
Function Documentation
|
|
Public: Parse text file to ObitInfoList.
- Parameters:
-
| infile | Name of the input text file to parse |
| list | ObitInfoList to accept values. |
| err | ObitErr for reporting errors. |
- Returns:
- return code, OBIT_IO_OK => OK
|
Generated on Fri Aug 31 22:13:07 2007 for Obit by
1.3.9.1