Cloudy
Spectral Synthesis Code for Astrophysics
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
cdgetlinelist.cpp File Reference
#include "cddefines.h"
#include "cddrive.h"
#include "lines.h"
#include "parser.h"
Include dependency graph for cdgetlinelist.cpp:

Functions

long int cdGetLineList (const string &chFile, vector< LineID > &lineids)
 

Function Documentation

long int cdGetLineList ( const string &  chFile,
vector< LineID > &  lineids 
)
* cdGetLineList will read in a list of emission line labels and wavelengths
* from a file.  I use it for generating LOC grids.  
* Two files (cdGetLineList and cdGetLineList) are included in the main data 
* distribution and have list of strong emission lines for high and low density gas.
* other files can be created by the user.
*
* The first argument is the name of the file to read.
* It it is void ("") then the routine will open LineList_BLR.dat 
*
* The second argument is a list of line identifications The routine will
* allocate the needed space, but the vector is defined in the calling
* routine. like this:
* vector<LineID> lineids;
* They would appear as follows in the call to the routine:
* chGetLineList("", lineids);
*
* cdGetLineList returns the number of lines it found in the file if it was successful,
* and -1 if it could not open the file.
* 

References AS_TRY, cdEXIT, DataParser::checkEOL(), DEBUG_ENTRY, ES_STARS_AND_BLANKS, EXIT_FAILURE, fprintf(), DataParser::getline(), DataParser::getLineID(), DataParser::isOpen(), lgcdInitCalled, and DataParser::lgEODMarker().

Referenced by lines_table().

Here is the call graph for this function: