SOLARPROP  1.0
 All Classes Functions Variables
Public Member Functions
FileHelper Class Reference

File Handler to read and write text files. More...

#include <fileHelper.h>

List of all members.

Public Member Functions

 FileHelper ()
 Constructor.
 ~FileHelper ()
 Destructor.
template<typename T1 , typename T2 >
std::map< T1, T2 > readFile (std::string, int, int)
 Read input file and store result in a map.
void writeText (std::string, const std::vector< double > &, const std::vector< std::vector< double >> &, int)
 Text output to a given file name.
std::string checkFormat (std::string)
 Routine to open a file and to check if the format is FITS or not.
std::map< std::pair< int, int >
, double > 
readNeutronMonitorData (std::string)
 Read neutron monitor data from file and put data in a map.

Detailed Description

File Handler to read and write text files.


Member Function Documentation

std::string FileHelper::checkFormat ( std::string  input)

Routine to open a file and to check if the format is FITS or not.

Parameters:
inputFile name of the input file
Returns:
String with the file format
template<typename T1 , typename T2 >
template std::map< double, double > FileHelper::readFile< double, double > ( std::string  ,
int  ,
int   
)

Read input file and store result in a map.

Parameters:
inputFile name of the input file
firstNumber of the first column to be imported
secondNumber of the second column to be imported
Returns:
Map of the columns from the input file
std::map< std::pair< int, int >, double > FileHelper::readNeutronMonitorData ( std::string  input)

Read neutron monitor data from file and put data in a map.

Parameters:
inputFile name for input file
Returns:
Map with data for each year and month
void FileHelper::writeText ( std::string  output,
const std::vector< double > &  ekin,
const std::vector< std::vector< double >> &  flux,
int  j 
)

Text output to a given file name.

Parameters:
outputFile name of the output file
ekinVector with kinetic energy
fluxVector with CR flux
jCR species which should be in the output

The documentation for this class was generated from the following files: