casa::BLParameterParser Class Reference

#include <BLParameterParser.h>

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

List of all members.

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.
string get_file_name ()
 Returns the name of file that stores.
std::vector< size_t > get_function_types ()
 Returns a list of baseline type in the file.
uint16_t get_max_order (size_t const bltype)
 Returns the maximum fit order of specified baseline type to construct BaselineContext.

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

Protected Attributes

string blparam_file_
 Member variables.
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  )  [inline, protected]

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:

Reimplemented in casa::BLTableParser.

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.

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:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1