Commit 3b6d873128ebd85b2a7d6fc87bc74ddf0e9750d0
1 parent
74f4d2f6
Exists in
master
and in
69 other branches
starting us
Showing
7 changed files
with
355 additions
and
0 deletions
Show diff stats
... | ... | @@ -0,0 +1,26 @@ |
1 | +/* | |
2 | + * To change this license header, choose License Headers in Project Properties. | |
3 | + * To change this template file, choose Tools | Templates | |
4 | + * and open the template in the editor. | |
5 | + */ | |
6 | +#include <iostream> | |
7 | +#include "ServicesServer.hh" | |
8 | +#include "PluginManager.hh" | |
9 | +#include "DataFilteringProcess.hh" | |
10 | + | |
11 | + | |
12 | +using namespace AMDA::Parameters; | |
13 | + | |
14 | +/** | |
15 | + Retrieve the Plugin version we're going to expect | |
16 | +*/ | |
17 | +extern "C" const char* getPluginVersion() | |
18 | +{ | |
19 | + return "(Version)"; | |
20 | +} | |
21 | + | |
22 | +extern "C" void registerPlugin(AMDA::Plugins::PluginManager & pm){ | |
23 | + ProcessFactory factFilter = boost::factory<DataFilteringProcess*>(); | |
24 | + ServicesServer::getInstance()->addProcessFactory("filter", factFilter ); | |
25 | + ServicesServer::getInstance()->linkProcessWithPlugin("filter", pm.getCurrentPluginPath()); | |
26 | +} | ... | ... |
... | ... | @@ -0,0 +1,38 @@ |
1 | + | |
2 | +PROJECT(dataFiltring) | |
3 | + | |
4 | +set(LIBRARY_OUTPUT_PATH ${PLUGIN_OUTPUT_PATH}) | |
5 | + | |
6 | +include_directories( | |
7 | + ${CMAKE_HOME_DIRECTORY}/src/InternLib/ | |
8 | + ${CMAKE_HOME_DIRECTORY}/src/Common/ | |
9 | + ${CMAKE_HOME_DIRECTORY}/src/Parameters/ | |
10 | + ${CMAKE_HOME_DIRECTORY}/src/Plugins/ | |
11 | + ${CMAKE_HOME_DIRECTORY}/src/helpers/ | |
12 | + ${CMAKE_HOME_DIRECTORY}/src/TimeTableCatalog/ | |
13 | + ${CMAKE_HOME_DIRECTORY}/src/Info/ | |
14 | + ${LOG4CXX_INCLUDE_DIR} | |
15 | + ${Boost_INCLUDE_DIR} | |
16 | + ${GEOPACKINCLUDE_DIRS} | |
17 | +) | |
18 | + | |
19 | +#Library configuration | |
20 | +file( | |
21 | + GLOB_RECURSE | |
22 | + source_files | |
23 | + ./* | |
24 | +) | |
25 | + | |
26 | +ADD_LIBRARY( dataFiltring SHARED ${source_files} ) | |
27 | + | |
28 | + | |
29 | +target_link_libraries( | |
30 | + dataFiltring | |
31 | + ${LOG4CXX_LIBRARIES} | |
32 | + ${GEOPACKLIBRARIES} | |
33 | + Parameters | |
34 | + InternLib | |
35 | + TimeTableCatalog | |
36 | + TimeUtil | |
37 | + Info | |
38 | +) | ... | ... |
... | ... | @@ -0,0 +1,35 @@ |
1 | +/* | |
2 | + * To change this license header, choose License Headers in Project Properties. | |
3 | + * To change this template file, choose Tools | Templates | |
4 | + * and open the template in the editor. | |
5 | + */ | |
6 | + | |
7 | +/* | |
8 | + * File: DataFiltering.hh | |
9 | + * Author: hacene | |
10 | + * | |
11 | + * Created on April 30, 2021, 4:28 PM | |
12 | + */ | |
13 | + | |
14 | +#ifndef DATAFILTERING_HH | |
15 | +#define DATAFILTERING_HH | |
16 | + | |
17 | +#include "Parameter.hh" | |
18 | +#include "ParamData.hh" | |
19 | +#include "DataTypeMath.hh" | |
20 | +#include "Operation.hh" | |
21 | + | |
22 | +namespace AMDA { | |
23 | + namespace Parameters { | |
24 | + namesapace DataFiltering{ | |
25 | + template <typename ElemType> | |
26 | + class DataFiltering : public Operation{ | |
27 | + | |
28 | + }; | |
29 | + } | |
30 | + } | |
31 | + } | |
32 | + | |
33 | + | |
34 | +#endif /* DATAFILTERING_HH */ | |
35 | + | ... | ... |
... | ... | @@ -0,0 +1,187 @@ |
1 | +/* | |
2 | + * To change this license header, choose License Headers in Project Properties. | |
3 | + * To change this template file, choose Tools | Templates | |
4 | + * and open the template in the editor. | |
5 | + */ | |
6 | + | |
7 | +/* | |
8 | + * File: DataFilteringCreator.hh | |
9 | + * Author: hacene | |
10 | + * | |
11 | + * Created on April 30, 2021, 4:12 PM | |
12 | + */ | |
13 | + | |
14 | +#ifndef DATAFILTERINGCREATOR_HH | |
15 | +#define DATAFILTERINGCREATOR_HH | |
16 | + | |
17 | +#include "ParamData.hh" | |
18 | +#include "VisitorOfParamData.hh" | |
19 | +#include "DataFiltering.hh" | |
20 | + | |
21 | +namespace AMDA { | |
22 | + namespace Parameters { | |
23 | + | |
24 | + class DataFilteringCreator : public VisitorOfParamData { | |
25 | + public: | |
26 | + | |
27 | + DataFilteringCreator(Process& pProcess, ParamData& paramInput, int level) : | |
28 | + _process(pProcess), | |
29 | + _paramData(paramInput), | |
30 | + _level(level), | |
31 | + _type(processType) { | |
32 | + _paramData.accept(*this); | |
33 | + } | |
34 | + | |
35 | + /** | |
36 | + * @overload VisitorOfParamData::visit(ParamDataScalaireShort *) | |
37 | + */ | |
38 | + void visit(ParamDataScalaireShort *) { | |
39 | + | |
40 | + } | |
41 | + | |
42 | + /** | |
43 | + * @overload VisitorOfParamData::visit(ParamDataScalaireFloat *) | |
44 | + */ | |
45 | + void visit(ParamDataScalaireFloat *) { | |
46 | + createOperation<float>(); | |
47 | + } | |
48 | + | |
49 | + /** | |
50 | + * @overload VisitorOfParamData::visit(ParamDataScalaireDouble *) | |
51 | + */ | |
52 | + void visit(ParamDataScalaireDouble *) { | |
53 | + createOperation<double>(); | |
54 | + } | |
55 | + | |
56 | + /** | |
57 | + * @overload VisitorOfParamData::visit(ParamDataScalaireLongDouble *) | |
58 | + */ | |
59 | + void visit(ParamDataScalaireLongDouble *) { | |
60 | + createOperation<long double>(); | |
61 | + } | |
62 | + | |
63 | + /** | |
64 | + * @overload VisitorOfParamData::visit(ParamDataScalaireInt *) | |
65 | + */ | |
66 | + void visit(ParamDataScalaireInt *) { | |
67 | + createOperation<int>(); | |
68 | + } | |
69 | + | |
70 | + /** | |
71 | + * @overload VisitorOfParamData::visit(ParamDataLogicalData *) | |
72 | + */ | |
73 | + void visit(ParamDataLogicalData *) { | |
74 | + BOOST_THROW_EXCEPTION(AMDA::AMDA_exception() << AMDA::errno_code(AMDA_ERROR_UNKNOWN) << AMDA::ex_msg("Tsyganenko96Creator operation not supported")); | |
75 | + } | |
76 | + | |
77 | + /** | |
78 | + * @overload VisitorOfParamData::visit(ParamDataTab1DShort *) | |
79 | + */ | |
80 | + void visit(ParamDataTab1DShort *) { | |
81 | + create1DOperation<short>(); | |
82 | + } | |
83 | + | |
84 | + /** | |
85 | + * @overload VisitorOfParamData::visit(ParamDataTab1DFloat *) | |
86 | + */ | |
87 | + void visit(ParamDataTab1DFloat *) { | |
88 | + create1DOperation<float>(); | |
89 | + } | |
90 | + | |
91 | + /** | |
92 | + * @overload VisitorOfParamData::visit(ParamDataTab1DDouble *) | |
93 | + */ | |
94 | + void visit(ParamDataTab1DDouble *) { | |
95 | + create1DOperation<double>(); | |
96 | + } | |
97 | + | |
98 | + /** | |
99 | + * @overload VisitorOfParamData::visit(ParamDataTab1DLongDouble *) | |
100 | + */ | |
101 | + void visit(ParamDataTab1DLongDouble *) { | |
102 | + create1DOperation<long double>(); | |
103 | + } | |
104 | + | |
105 | + /** | |
106 | + * @overload VisitorOfParamData::visit(ParamDataTab1DInt *) | |
107 | + */ | |
108 | + void visit(ParamDataTab1DInt *) { | |
109 | + create1DOperation<int>(); | |
110 | + } | |
111 | + | |
112 | + /** | |
113 | + * @overload VisitorOfParamData::visit(ParamDataTab1DLogicalData *) | |
114 | + */ | |
115 | + void visit(ParamDataTab1DLogicalData *) { | |
116 | + BOOST_THROW_EXCEPTION(AMDA::AMDA_exception() << AMDA::errno_code(AMDA_ERROR_UNKNOWN) << AMDA::ex_msg("Tsyganenko96Creator operation not supported")); | |
117 | + } | |
118 | + | |
119 | + /** | |
120 | + * @overload VisitorOfParamData::visit(ParamDataTab2DShort *) | |
121 | + */ | |
122 | + void visit(ParamDataTab2DShort *) { | |
123 | + BOOST_THROW_EXCEPTION(AMDA::AMDA_exception() << AMDA::errno_code(AMDA_ERROR_UNKNOWN) << AMDA::ex_msg("Tsyganenko96Creator operation not supported")); | |
124 | + } | |
125 | + | |
126 | + /** | |
127 | + * @overload VisitorOfParamData::visit(ParamDataTab2DFloat *) | |
128 | + */ | |
129 | + void visit(ParamDataTab2DFloat *) { | |
130 | + BOOST_THROW_EXCEPTION(AMDA::AMDA_exception() << AMDA::errno_code(AMDA_ERROR_UNKNOWN) << AMDA::ex_msg("Tsyganenko96Creator operation not supported")); | |
131 | + } | |
132 | + | |
133 | + /** | |
134 | + * @overload VisitorOfParamData::visit(ParamDataTab2DDouble *) | |
135 | + */ | |
136 | + void visit(ParamDataTab2DDouble *) { | |
137 | + BOOST_THROW_EXCEPTION(AMDA::AMDA_exception() << AMDA::errno_code(AMDA_ERROR_UNKNOWN) << AMDA::ex_msg("Tsyganenko96Creator operation not supported")); | |
138 | + } | |
139 | + | |
140 | + /** | |
141 | + * @overload VisitorOfParamData::visit(ParamDataTab2DLongDouble *) | |
142 | + */ | |
143 | + void visit(ParamDataTab2DLongDouble *) { | |
144 | + BOOST_THROW_EXCEPTION(AMDA::AMDA_exception() << AMDA::errno_code(AMDA_ERROR_UNKNOWN) << AMDA::ex_msg("Tsyganenko96Creator operation not supported")); | |
145 | + } | |
146 | + | |
147 | + /** | |
148 | + * @overload VisitorOfParamData::visit(ParamDataTab2DInt *) | |
149 | + */ | |
150 | + void visit(ParamDataTab2DInt *) { | |
151 | + BOOST_THROW_EXCEPTION(AMDA::AMDA_exception() << AMDA::errno_code(AMDA_ERROR_UNKNOWN) << AMDA::ex_msg("Tsyganenko96Creator operation not supported")); | |
152 | + } | |
153 | + | |
154 | + /** | |
155 | + * @overload VisitorOfParamData::visit(ParamDataTab2DLogicalData *) | |
156 | + */ | |
157 | + void visit(ParamDataTab2DLogicalData *) { | |
158 | + BOOST_THROW_EXCEPTION(AMDA::AMDA_exception() << AMDA::errno_code(AMDA_ERROR_UNKNOWN) << AMDA::ex_msg("Tsyganenko96Creator operation not supported")); | |
159 | + } | |
160 | + | |
161 | + /** | |
162 | + * @brief get the Tsyganenko96 parameterized operation. | |
163 | + */ | |
164 | + Operation * getOperation() const { | |
165 | + return _operation; | |
166 | + } | |
167 | + private: | |
168 | + | |
169 | + template <typename Type> | |
170 | + void createOperation() { | |
171 | + _operation = new Shue::ShueDst<Type>(_process, dynamic_cast<ParamDataSpec<std::vector<Type> >&> (_paramData), _paramImfInput, _paramPswInput, _inGSE, _model98); | |
172 | + } | |
173 | + void create1DOperation() { | |
174 | + _operation = new Shue::ShueDst<Type>(_process, dynamic_cast<ParamDataSpec<std::vector<Type> >&> (_paramData), _paramImfInput, _paramPswInput, _inGSE, _model98); | |
175 | + } | |
176 | + | |
177 | + Process &_process; | |
178 | + ParamData &_paramData; | |
179 | + int _level; | |
180 | + Operation* _operation; | |
181 | + }; | |
182 | + | |
183 | + } | |
184 | +} | |
185 | + | |
186 | +#endif /* DATAFILTERINGCREATOR_HH */ | |
187 | + | ... | ... |
... | ... | @@ -0,0 +1,32 @@ |
1 | +/* | |
2 | + * To change this license header, choose License Headers in Project Properties. | |
3 | + * To change this template file, choose Tools | Templates | |
4 | + * and open the template in the editor. | |
5 | + */ | |
6 | + | |
7 | +/* | |
8 | + * File: DataFilteringProcess.cc | |
9 | + * Author: hacene | |
10 | + * | |
11 | + * Created on April 30, 2021, 3:42 PM | |
12 | + */ | |
13 | + | |
14 | +#include "DataFilteringProcess.hh" | |
15 | + | |
16 | +DataFilteringProcess::DataFilteringProcess(Parameter ¶meter) : SingleParamProcess_CRTP(parameter) { | |
17 | + } | |
18 | + | |
19 | + | |
20 | +DataFilteringProcess::DataFilteringProcess(const DataFilteringProcess& orig, Parameter ¶meter) | |
21 | + : SingleParamProcess_CRTP(pProcess,parameter) { | |
22 | + } | |
23 | + | |
24 | +DataFilteringProcess::~DataFilteringProcess() { | |
25 | +} | |
26 | + | |
27 | +TimeStamp ProcessSumIntoTableIndexes::init() { | |
28 | + TimeStamp timeStamp = _parameterInput->init( this, _timeIntervalList); | |
29 | + _paramInput = _parameterInput->getParamData(this).get(); | |
30 | + | |
31 | + | |
32 | +} | ... | ... |
... | ... | @@ -0,0 +1,36 @@ |
1 | +/* | |
2 | + * To change this license header, choose License Headers in Project Properties. | |
3 | + * To change this template file, choose Tools | Templates | |
4 | + * and open the template in the editor. | |
5 | + */ | |
6 | + | |
7 | +/* | |
8 | + * File: DataFilteringProcess.hh | |
9 | + * Author: hacene | |
10 | + * | |
11 | + * Created on April 30, 2021, 3:42 PM | |
12 | + */ | |
13 | + | |
14 | +#ifndef DataFilteringPROCESS_HH | |
15 | +#define DataFilteringPROCESS_HH | |
16 | + | |
17 | +namespace AMDA { | |
18 | + namespace Parameters { | |
19 | + | |
20 | + class DataFilteringProcess : public SingleParamProcess_CRTP<DataFilteringProcess> { | |
21 | + public: | |
22 | + DataFilteringProcess(Parameter ¶meter); | |
23 | + DataFilteringProcess(const DataFilteringProcess& orig, Parameter ¶meter); | |
24 | + virtual ~DataFilteringProcess(); | |
25 | + | |
26 | + /** | |
27 | + * @overload Process::init() | |
28 | + */ | |
29 | + TimeStamp init(); | |
30 | + | |
31 | + }; | |
32 | + | |
33 | + } | |
34 | +} | |
35 | +#endif /* DataFilteringPROCESS_HH */ | |
36 | + | ... | ... |