MeteoIODoc 2.11.0
mio::MeteoProcessor Class Reference

Detailed Description

A facade class that invokes the processing of the filters and the resampling.

Author
Thomas Egger
Date
2010-06-25

#include <MeteoProcessor.h>

Public Member Functions

 MeteoProcessor (const Config &cfg, const char &rank=1, const IOUtils::OperationMode &mode=IOUtils::STD)
 The default constructor - Set up a processing stack for each parameter The different stacks are created on the heap and pointers to the objects are stored in the map<string,ProcessingStack*> object processing_stack. More...
 
 ~MeteoProcessor ()
 The destructor - It is necessary because the ProcessingStack objects referenced in the map<string, ProcessingStack*> processing_stack have to be freed from the heap. More...
 
void process (std::vector< std::vector< MeteoData > > &ivec, std::vector< std::vector< MeteoData > > &ovec, const bool &second_pass=false)
 A function that executes all the filters for all meteo parameters configuered by the user. More...
 
bool resample (const Date &date, const std::string &stationHash, const std::vector< MeteoData > &ivec, MeteoData &md)
 
void resetResampling ()
 
void getWindowSize (ProcessingProperties &o_properties) const
 
const std::string toString () const
 

Static Public Member Functions

static std::set< std::string > initStationSet (const std::vector< std::pair< std::string, std::string > > &vecArgs, const std::string &keyword)
 built the set of station IDs that a filter should be applied to or excluded from More...
 
static std::vector< DateRangeinitTimeRestrictions (const std::vector< std::pair< std::string, std::string > > &vecArgs, const std::string &keyword, const std::string &where, const double &TZ)
 built the set of time ranges to apply a certain processing to More...
 

Constructor & Destructor Documentation

◆ MeteoProcessor()

mio::MeteoProcessor::MeteoProcessor ( const Config cfg,
const char &  rank = 1,
const IOUtils::OperationMode mode = IOUtils::STD 
)

The default constructor - Set up a processing stack for each parameter The different stacks are created on the heap and pointers to the objects are stored in the map<string,ProcessingStack*> object processing_stack.

Parameters
[in]cfgConfig object that holds the config of the filters in the [Filters] section
[in]rankin case of multiple TimeSeriesManager, rank in the stack? (default: 1)
[in]modespatial resampling operation mode (see IOUtils::OperationMode), default IOUtils::STD

◆ ~MeteoProcessor()

mio::MeteoProcessor::~MeteoProcessor ( )

The destructor - It is necessary because the ProcessingStack objects referenced in the map<string, ProcessingStack*> processing_stack have to be freed from the heap.

Member Function Documentation

◆ getWindowSize()

void mio::MeteoProcessor::getWindowSize ( ProcessingProperties o_properties) const

◆ initStationSet()

std::set< std::string > mio::MeteoProcessor::initStationSet ( const std::vector< std::pair< std::string, std::string > > &  vecArgs,
const std::string &  keyword 
)
static

built the set of station IDs that a filter should be applied to or excluded from

Parameters
[in]vecArgsAll filter arguments
[in]keywordArgument keyword (ex. EXCLUDE or ONLY)
Returns
set of station IDs provided in argument by the provided keyword

◆ initTimeRestrictions()

std::vector< DateRange > mio::MeteoProcessor::initTimeRestrictions ( const std::vector< std::pair< std::string, std::string > > &  vecArgs,
const std::string &  keyword,
const std::string &  where,
const double &  TZ 
)
static

built the set of time ranges to apply a certain processing to

Parameters
[in]vecArgsAll filter arguments
[in]keywordArgument keyword (ex. WHEN)
[in]whereinformative string to describe which component it is in case of error messages (ex. "Filter Min")
[in]TZtime zone to use when building Date objects
Returns
set of time ranges to apply the processing to

◆ process()

void mio::MeteoProcessor::process ( std::vector< std::vector< MeteoData > > &  ivec,
std::vector< std::vector< MeteoData > > &  ovec,
const bool &  second_pass = false 
)

A function that executes all the filters for all meteo parameters configuered by the user.

Parameters
[in]ivecThe raw sequence of MeteoData objects for all stations
[in]ovecThe filtered output of MeteoData object for all stations
[in]second_passWhether this is the second pass (check only filters)

◆ resample()

bool mio::MeteoProcessor::resample ( const Date date,
const std::string &  stationHash,
const std::vector< MeteoData > &  ivec,
MeteoData md 
)
inline

◆ resetResampling()

void mio::MeteoProcessor::resetResampling ( )
inline

◆ toString()

const std::string mio::MeteoProcessor::toString ( ) const

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