src/Basics/ParamSet.cc
// Input		pset    : Parameter set (this)
// 			filein  : Input filename
//                 Or   inp     : Input filestream
//			fflag   : Flag for fatal warnings.
//				     0 : No error messages
//				     1 : Non-fatal messages
//				  else : Messages, stop execution
// Output		int     : True if file filein or input stream
//				  inp has been scanned for parameters.
// Note				: Parameter set filled with parameters
//				  read from the input file filein
//				  or input file stream inp
Input          pset    : Parameter set (this)
filein  : Input filename
Or   inp     : Input filestream
fflag   : Flag for fatal warnings.
0 : No error messages
1 : Non-fatal messages
else : Messages, stop execution
Output         int     : True if file filein or input stream
inp has been scanned for parameters.
Note                           : Parameter set filled with parameters
read from the input file filein
or input file stream inp
Input pset : Parameter set ( this ) filein : Input filename Or inp : Input filestream fflag : Flag for fatal warnings . 0 : No error messages 1 : Non - fatal messages else : Messages stop execution Output int : True if file filein or input stream inp has been scanned for parameters . Note : Parameter set filled with parameters read from the input file filein or input file stream inp
bool ParameterSet::read(const string &filein, int fflag)
  {
  std::ifstream inp(filein.c_str());		
  if(!read(inp, fflag?1:0))			
    {
    if(fflag)					
      {						
      Perror(1,filein,1);			
      (fflag>1)?Pfatality(5):Perror(5,0);	
      }
    return false;
    }
  inp.close();					
  return true;					
  }
bool ParameterSet :: read ( const string & filein , int fflag ) { std :: ifstream inp ( filein . c_str ( ) ) ; if ( ! read ( inp , fflag ? 1 : 0 ) ) { if ( fflag ) { Perror ( 1 , filein , 1 ) ; ( fflag > 1 ) ? Pfatality ( 5 ) : Perror ( 5 , 0 ) ; } return false ; } inp . close ( ) ; return true ; }
Input          pset    : Parameter set (this)
filein  : Input filename
Or   inp     : Input filestream
fflag   : Flag for fatal warnings.
Input pset : Parameter set ( this ) filein : Input filename Or inp : Input filestream fflag : Flag for fatal warnings .
// Open filename for input // Use overloaded function //    Output any error messages //    as desired via fflag //      Problems with file //      Can't read pset // Close the input file // Return we succeeded