casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
casa::BLParameterParser Class Reference

#include <BLParameterParser.h>

Inheritance diagram for casa::BLParameterParser:
casa::BLTableParser

Public Member Functions

 BLParameterParser (string const file_name)
 
 ~BLParameterParser ()
 
bool GetFitParameter (size_t const rowid, size_t const polid, BLParameterSet &bl_param)
 Returns false if there is no fitting parameters for the row and pol. More...
 
string get_file_name ()
 Returns the name of file that stores. More...
 
std::vector< size_t > get_function_types ()
 Returns a list of baseline type in the file. More...
 
uint16_t get_max_order (size_t const bltype)
 Returns the maximum fit order of specified baseline type to construct BaselineContext. More...
 

Protected Types

enum  BLParameters {
  BLParameters_kRow,
  BLParameters_kPol,
  BLParameters_kMask,
  BLParameters_kNumIteration,
  BLParameters_kClipThreshold,
  BLParameters_kLineFinder,
  BLParameters_kLFThreshold,
  BLParameters_kLeftEdge,
  BLParameters_kRightEdge,
  BLParameters_kChanAverageLim,
  BLParameters_kBaselineType,
  BLParameters_kOrder,
  BLParameters_kNPiece,
  BLParameters_kNWave,
  BLParameters_kNumElements
}
 The enum for columns in fitting parameter file. More...
 

Protected Member Functions

void initialize ()
 private: More...
 
void Clearup ()
 
void parse (string const file_name)
 parse a file More...
 
void SplitLine (string const &linestr, char const separator, std::vector< string > &strvec)
 split string by separator character More...
 
void ConvertLineToParam (string const &linestr, size_t &rowid, size_t &polid, BLParameterSet &paramset)
 convert a line of string to a BLParameterSet data structure More...
 
uint16_t GetTypeOrder (BLParameterSet const &bl_param)
 Returns order or npiece in BLParameterSet structure depending on datatype. More...
 
template<typename DataType >
DataType ConvertString (string const &svalue)
 

Protected Attributes

string blparam_file_
 Member variables. More...
 
std::map< const std::pair
< size_t, size_t >
, BLParameterSet * > 
bl_parameters_
 
std::vector< size_t > baseline_types_
 
uint16_t max_orders_ [BaselineType_kNumElements]
 

Detailed Description

Definition at line 111 of file BLParameterParser.h.

Member Enumeration Documentation

The enum for columns in fitting parameter file.

Enumerator
BLParameters_kRow 
BLParameters_kPol 
BLParameters_kMask 
BLParameters_kNumIteration 
BLParameters_kClipThreshold 
BLParameters_kLineFinder 
BLParameters_kLFThreshold 
BLParameters_kLeftEdge 
BLParameters_kRightEdge 
BLParameters_kChanAverageLim 
BLParameters_kBaselineType 
BLParameters_kOrder 
BLParameters_kNPiece 
BLParameters_kNWave 
BLParameters_kNumElements 

Definition at line 151 of file BLParameterParser.h.

Constructor & Destructor Documentation

casa::BLParameterParser::BLParameterParser ( string const  file_name)
explicit
casa::BLParameterParser::~BLParameterParser ( )

Member Function Documentation

void casa::BLParameterParser::Clearup ( )
protected
void casa::BLParameterParser::ConvertLineToParam ( string const &  linestr,
size_t &  rowid,
size_t &  polid,
BLParameterSet paramset 
)
protected

convert a line of string to a BLParameterSet data structure

template<typename DataType >
DataType casa::BLParameterParser::ConvertString ( string const &  svalue)
inlineprotected

Definition at line 170 of file BLParameterParser.h.

string casa::BLParameterParser::get_file_name ( )
inline

Returns the name of file that stores.

Definition at line 124 of file BLParameterParser.h.

References blparam_file_.

std::vector<size_t> casa::BLParameterParser::get_function_types ( )
inline

Returns a list of baseline type in the file.

Definition at line 126 of file BLParameterParser.h.

References baseline_types_.

uint16_t casa::BLParameterParser::get_max_order ( size_t const  bltype)

Returns the maximum fit order of specified baseline type to construct BaselineContext.

bool casa::BLParameterParser::GetFitParameter ( size_t const  rowid,
size_t const  polid,
BLParameterSet bl_param 
)

Returns false if there is no fitting parameters for the row and pol.

Else, returns a baseline fitting parameter of a certain row and pol IDs in MS

uint16_t casa::BLParameterParser::GetTypeOrder ( BLParameterSet const &  bl_param)
protected

Returns order or npiece in BLParameterSet structure depending on datatype.

void casa::BLParameterParser::initialize ( )
protected

private:

void casa::BLParameterParser::parse ( string const  file_name)
protected

parse a file

void casa::BLParameterParser::SplitLine ( string const &  linestr,
char const  separator,
std::vector< string > &  strvec 
)
protected

split string by separator character

Member Data Documentation

std::vector<size_t> casa::BLParameterParser::baseline_types_
protected

Definition at line 148 of file BLParameterParser.h.

Referenced by get_function_types().

std::map<const std::pair<size_t, size_t>, BLParameterSet*> casa::BLParameterParser::bl_parameters_
protected

Definition at line 147 of file BLParameterParser.h.

string casa::BLParameterParser::blparam_file_
protected

Member variables.

Definition at line 146 of file BLParameterParser.h.

Referenced by get_file_name().

uint16_t casa::BLParameterParser::max_orders_[BaselineType_kNumElements]
protected

Definition at line 149 of file BLParameterParser.h.


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