cloudy  trunk
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Functions
cdgetlinelist.cpp File Reference
#include "cddefines.h"
#include "cddrive.h"
#include "lines.h"
#include "parser.h"
Include dependency graph for cdgetlinelist.cpp:

Go to the source code of this file.

Functions

long int cdGetLineList (const char chFile[], vector< string > &chLabels, vector< realnum > &wl)
 

Function Documentation

long int cdGetLineList ( const char  chFile[],
vector< string > &  chLabels,
vector< realnum > &  wl 
)
* 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 next two arguments are references to vectors holding the
* list of labels and wavelengths.  The routine will allocate the
* needed space, but the vectors are defined in the calling routine.  
* in the calling routine the two variable should be declared like this:
* vector<char*> chLabels;
* vector<realnum> wavelength;
* They would appear as follows in the call to the routine:
* chGetLineList("", chLabels , wavelength );
*
* cdGetLineList returns the number of lines it found in the file if it was successful,
* and -1 if it could not open the file.
* 

Definition at line 11 of file cdgetlinelist.cpp.

References AS_LOCAL_DATA_TRY, ASSERT, cdEXIT, LineID::chLabel, DEBUG_ENTRY, EXIT_FAILURE, FILENAME_PATH_LENGTH_2, fprintf(), ioQQQ, lgcdInitCalled, open_data(), read_whole_line(), Parser::setline(), and LineID::wave.

Referenced by lines_table(), and ParseSave().

Here is the call graph for this function: