MeteoIODoc 20250905.f67af007
 
Loading...
Searching...
No Matches
ProcessingStack.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-3.0-or-later
2/***********************************************************************************/
3/* Copyright 2009 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 PROCESSINGSTACK_H
20#define PROCESSINGSTACK_H
21
23#include <meteoio/Config.h>
24#include <vector>
25#include <string>
26
27namespace mio {
28
36 public:
40 ProcessingStack(const Config& cfg, const std::string& param_name);
41 virtual ~ProcessingStack() {for (size_t ii=0; ii<filter_stack.size(); ii++) delete filter_stack[ii];}
42
43 void process(const std::vector< std::vector<MeteoData> >& ivec,
44 std::vector< std::vector<MeteoData> >& ovec, const bool& second_pass=false);
45 void getWindowSize(ProcessingProperties& o_properties) const;
46 const std::string toString() const;
47
48 static const std::string filter_section, filter_pattern, arg_pattern;
49
50 private:
51 virtual bool applyFilter(const size_t& param, const size_t& jj, const std::vector<MeteoData>& ivec, std::vector<MeteoData> &ovec);
52 virtual bool filterStation(std::vector<MeteoData> ivec, std::vector< std::vector<MeteoData> >& ovec, const bool& second_pass, const size_t& stat_idx);
53
54 std::vector<ProcessingBlock*> filter_stack; //for now: strictly linear chain of processing blocks
55 const std::string param_name;
56 bool data_qa_logs;
57};
58
59} //end namespace
60
61#endif
A class that reads a key/value file. These files (typically named *.ini) follow the INI file format s...
Definition Config.h:79
Definition ProcessingBlock.h:36
This builds and runs through a filter stack for filtering a given parameter.
Definition ProcessingStack.h:35
void getWindowSize(ProcessingProperties &o_properties) const
Definition ProcessingStack.cc:48
const std::string toString() const
Definition ProcessingStack.cc:248
void process(const std::vector< std::vector< MeteoData > > &ivec, std::vector< std::vector< MeteoData > > &ovec, const bool &second_pass=false)
Definition ProcessingStack.cc:233
virtual ~ProcessingStack()
Definition ProcessingStack.h:41
static const std::string filter_section
Definition ProcessingStack.h:48
static const std::string arg_pattern
Definition ProcessingStack.h:48
static const std::string filter_pattern
Definition ProcessingStack.h:48
Definition Config.cc:34