MeteoIODoc 20241222.207bde49
ProcAdd.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-3.0-or-later
2/***********************************************************************************/
3/* Copyright 2012 WSL Institute for Snow and Avalanche Research SLF-DAVOS */
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#ifndef PROCADD_H
20#define PROCADD_H
21
23#include <vector>
24#include <string>
25
26namespace mio {
27
86class ProcAdd : public ProcessingBlock {
87 public:
88 ProcAdd(const std::vector< std::pair<std::string, std::string> >& vecArgs, const std::string& name, const Config& cfg);
89
90 virtual void process(const unsigned int& param, const std::vector<MeteoData>& ivec,
91 std::vector<MeteoData>& ovec);
92
93 protected:
94 void parse_args(const std::vector< std::pair<std::string, std::string> >& vecArgs);
95 virtual void uniform_noise(const unsigned int& param, std::vector<MeteoData>& ovec) const;
96 virtual void normal_noise(const unsigned int& param, std::vector<MeteoData>& ovec) const;
97
98 std::vector<double> vecCorrections;
99 std::string root_path;
102};
103
104} //end namespace
105
106#endif
A class that reads a key/value file. These files (typically named *.ini) follow the INI file format s...
Definition: Config.h:79
Add an offset to the values.
Definition: ProcAdd.h:86
char distribution
Definition: ProcAdd.h:101
char type
Definition: ProcAdd.h:101
double correction
Definition: ProcAdd.h:100
char period
Definition: ProcAdd.h:101
void parse_args(const std::vector< std::pair< std::string, std::string > > &vecArgs)
Definition: ProcAdd.cc:106
std::vector< double > vecCorrections
Definition: ProcAdd.h:98
virtual void uniform_noise(const unsigned int &param, std::vector< MeteoData > &ovec) const
Definition: ProcAdd.cc:86
ProcAdd(const std::vector< std::pair< std::string, std::string > > &vecArgs, const std::string &name, const Config &cfg)
Definition: ProcAdd.cc:30
virtual void normal_noise(const unsigned int &param, std::vector< MeteoData > &ovec) const
Definition: ProcAdd.cc:96
virtual void process(const unsigned int &param, const std::vector< MeteoData > &ivec, std::vector< MeteoData > &ovec)
Definition: ProcAdd.cc:37
std::string root_path
Definition: ProcAdd.h:99
double range
Definition: ProcAdd.h:100
The base class for all filters that provides the interface and a few helper methods.
Definition: ProcessingBlock.h:67
Definition: Config.cc:31