19#ifndef WINDOWEDFILTER_H
20#define WINDOWEDFILTER_H
43 virtual void process(
const unsigned int& param,
const std::vector<MeteoData>& ivec,
44 std::vector<MeteoData>& ovec) = 0;
47 WindowedFilter(
const std::vector< std::pair<std::string, std::string> >& vecArgs,
const std::string& name,
const Config& cfg,
const bool& skipWindowParams=
false);
49 void setWindowFParams(
const std::vector< std::pair<std::string, std::string> >& vecArgs);
50 const std::vector<const MeteoData*>&
get_window(
const size_t& index,
51 const std::vector<MeteoData>& ivec);
52 bool get_window_specs(
const size_t& index,
const std::vector<MeteoData>& ivec,
53 size_t& start,
size_t& end)
const;
61 std::vector<const MeteoData*> vec_window;
A class that reads a key/value file. These files (typically named *.ini) follow the INI file format s...
Definition: Config.h:79
A class to handle timestamps. This class handles conversion between different time display formats (I...
Definition: Date.h:87
The base class for all filters that provides the interface and a few helper methods.
Definition: ProcessingBlock.h:67
Definition: WindowedFilter.h:35
bool is_soft
Definition: WindowedFilter.h:64
WindowedFilter(const std::vector< std::pair< std::string, std::string > > &vecArgs, const std::string &name, const Config &cfg, const bool &skipWindowParams=false)
Construct a WindowedFilter Object. This is for filters that require a certain window of data.
Definition: WindowedFilter.cc:34
Centering
Definition: WindowedFilter.h:37
@ left
left centered window
Definition: WindowedFilter.h:38
@ center
centered window
Definition: WindowedFilter.h:39
@ right
right centered window
Definition: WindowedFilter.h:40
virtual void process(const unsigned int ¶m, const std::vector< MeteoData > &ivec, std::vector< MeteoData > &ovec)=0
void setWindowFParams(const std::vector< std::pair< std::string, std::string > > &vecArgs)
Parse the arguments in order to retrieve the user parameters for the data window. The following param...
Definition: WindowedFilter.cc:51
bool get_window_specs(const size_t &index, const std::vector< MeteoData > &ivec, size_t &start, size_t &end) const
A function that computes the start and end for a window for the 'index' element from ivec The princip...
Definition: WindowedFilter.cc:142
size_t last_start
Definition: WindowedFilter.h:58
Centering centering
This is filled in the constructor by calling setWindowFParams.
Definition: WindowedFilter.h:56
size_t last_end
Definition: WindowedFilter.h:58
size_t min_data_points
This is filled in the constructor by calling setWindowFParams.
Definition: WindowedFilter.h:57
Duration min_time_span
This is filled in the constructor by calling setWindowFParams.
Definition: WindowedFilter.h:55
const std::vector< const MeteoData * > & get_window(const size_t &index, const std::vector< MeteoData > &ivec)
A function that cuts out the desired window for the 'index' element within ivec, the window elements ...
Definition: WindowedFilter.cc:92