MeteoIODoc 20240411.d3bdb3cb
FilterMinMaxConditional.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-3.0-or-later
2/***********************************************************************************/
3/* Copyright 2019 Avalanche Warning Service Tyrol LWD-TIROL */
4/***********************************************************************************/
5/* This file is part of MeteoIO.
6 MeteoIO is free software: you can redistribute it and/or modify
7 it under the terms of the GNU Lesser General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10
11 MeteoIO is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public License
17 along with MeteoIO. If not, see <http://www.gnu.org/licenses/>.
18*/
19
20#ifndef FILTERMINMAXCONDITIONAL_H
21#define FILTERMINMAXCONDITIONAL_H
22
24#include <string>
25#include <vector>
26
27namespace mio {
28
76 public:
77 FilterMinMaxConditional(const std::vector< std::pair<std::string, std::string> >& vecArgs,
78 const std::string& name, const Config& cfg);
79
80 virtual void process(const unsigned int& param, const std::vector<MeteoData>& ivec,
81 std::vector<MeteoData>& ovec);
82
83 private:
84 bool assert_condition(const double& condition_value);
85 void parse_args(const std::vector< std::pair<std::string, std::string> >& vecArgs);
86
87 double min_val, max_val;
88 double min_soft, max_soft;
89 double nodata_reset;
90 bool is_soft;
91 std::string condition_param, condition_operator;
92 double condition_compare;
93 bool ignore_missing_param;
94};
95
96} //namespace
97
98#endif
A class that reads a key/value file. These files (typically named *.ini) follow the INI file format s...
Definition: Config.h:79
Applies a min/max filter if a second parameter matches a comparison.
Definition: FilterMinMaxConditional.h:75
virtual void process(const unsigned int &param, const std::vector< MeteoData > &ivec, std::vector< MeteoData > &ovec)
Definition: FilterMinMaxConditional.cc:36
FilterMinMaxConditional(const std::vector< std::pair< std::string, std::string > > &vecArgs, const std::string &name, const Config &cfg)
Definition: FilterMinMaxConditional.cc:26
The base class for all filters that provides the interface and a few helper methods.
Definition: ProcessingBlock.h:67
Definition: Config.cc:31