Commit 5f604c87c456ea64f7d14ee4f3b3e31cd81dee21
Exists in
master
and in
85 other branches
Merge branch 'master' into rm_6616
Showing
12 changed files
with
118 additions
and
17 deletions
Show diff stats
CMakeLists.txt
... | ... | @@ -10,6 +10,16 @@ set(EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/build/${CMAKE_BUILD_TYPE}/bin/) |
10 | 10 | set(LIBRARY_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/build/${CMAKE_BUILD_TYPE}/lib/) |
11 | 11 | set(PLUGIN_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/build/${CMAKE_BUILD_TYPE}/plugin/) |
12 | 12 | |
13 | +find_program(LSB_RELEASE_EXEC lsb_release) | |
14 | +execute_process(COMMAND ${LSB_RELEASE_EXEC} -is | |
15 | + OUTPUT_VARIABLE LSB_RELEASE_ID_SHORT | |
16 | + OUTPUT_STRIP_TRAILING_WHITESPACE | |
17 | +) | |
18 | + | |
19 | +if (${LSB_RELEASE_ID_SHORT} MATCHES "Fedora") | |
20 | + set(OPTION_SUP "${OPTION_SUP} -I/usr/include/tirpc -Wno-deprecated-copy") | |
21 | +endif() | |
22 | + | |
13 | 23 | set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${OPTION_SUP} -std=c++0x -fPIC -Wall -Wextra -ggdb -DLINUX -Dlinux -D_REENTRANT -malign-double -pthread") |
14 | 24 | set(CMAKE_C_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${OPTION_SUP} -fPIC -Wall -ggdb -DLINUX -fPIC -Dlinux -D_REENTRANT -malign-double -pthread") |
15 | 25 | |
... | ... | @@ -117,7 +127,7 @@ add_subdirectory(src/XMLRequest) |
117 | 127 | add_subdirectory(src/SpiceKernel) |
118 | 128 | add_subdirectory(src/amdaXMLRequestorTool) |
119 | 129 | add_subdirectory(src/amdaParameterGenerator) |
120 | -add_subdirectory(src/expressionParser) | |
130 | +#add_subdirectory(src/expressionParser) | |
121 | 131 | add_subdirectory(src/amdaParameterInfo) |
122 | 132 | add_subdirectory(src/amdaGetErrorMsg) |
123 | 133 | add_subdirectory(src/PostProcessing) | ... | ... |
src/ExternLib/StatisticProcesses/MinMaxMeanStatisticProcess.cc
... | ... | @@ -14,7 +14,7 @@ namespace AMDA { |
14 | 14 | namespace Statistic { |
15 | 15 | namespace MinMaxMean { |
16 | 16 | |
17 | -MinStatisticProcess::MinStatisticProcess(AMDA::Parameters::Parameter ¶meter, int index) : | |
17 | +MinStatisticProcess::MinStatisticProcess(AMDA::Parameters::Parameter ¶meter, const int& index) : | |
18 | 18 | AMDA::Parameters::StatisticProcess(parameter, false, index) |
19 | 19 | { |
20 | 20 | } |
... | ... | @@ -35,7 +35,7 @@ std::string MinStatisticProcess::getUCD(void) |
35 | 35 | return "stat.min"; |
36 | 36 | } |
37 | 37 | |
38 | -MaxStatisticProcess::MaxStatisticProcess(AMDA::Parameters::Parameter ¶meter, int index) : | |
38 | +MaxStatisticProcess::MaxStatisticProcess(AMDA::Parameters::Parameter ¶meter, const int& index) : | |
39 | 39 | AMDA::Parameters::StatisticProcess(parameter, false, index) |
40 | 40 | { |
41 | 41 | } |
... | ... | @@ -56,7 +56,7 @@ std::string MaxStatisticProcess::getUCD(void) |
56 | 56 | return "stat.max"; |
57 | 57 | } |
58 | 58 | |
59 | -MeanStatisticProcess::MeanStatisticProcess(AMDA::Parameters::Parameter ¶meter, int index) : | |
59 | +MeanStatisticProcess::MeanStatisticProcess(AMDA::Parameters::Parameter ¶meter, const int& index) : | |
60 | 60 | AMDA::Parameters::StatisticProcess(parameter, false,index) |
61 | 61 | { |
62 | 62 | } | ... | ... |
src/ExternLib/StatisticProcesses/MinMaxMeanStatisticProcess.hh
... | ... | @@ -24,7 +24,7 @@ public: |
24 | 24 | /* |
25 | 25 | * @brief constructor |
26 | 26 | */ |
27 | - MinStatisticProcess(AMDA::Parameters::Parameter ¶meter, int index); | |
27 | + MinStatisticProcess(AMDA::Parameters::Parameter ¶meter, const int& index); | |
28 | 28 | |
29 | 29 | /* |
30 | 30 | * @brief destructor |
... | ... | @@ -52,7 +52,7 @@ public: |
52 | 52 | /* |
53 | 53 | * @brief constructor |
54 | 54 | */ |
55 | - MaxStatisticProcess(AMDA::Parameters::Parameter ¶meter, int index); | |
55 | + MaxStatisticProcess(AMDA::Parameters::Parameter ¶meter, const int& index); | |
56 | 56 | |
57 | 57 | /* |
58 | 58 | * @brief destructor |
... | ... | @@ -80,7 +80,7 @@ public: |
80 | 80 | /* |
81 | 81 | * @brief constructor |
82 | 82 | */ |
83 | - MeanStatisticProcess(AMDA::Parameters::Parameter ¶meter, int index); | |
83 | + MeanStatisticProcess(AMDA::Parameters::Parameter ¶meter, const int& index); | |
84 | 84 | |
85 | 85 | /* |
86 | 86 | * @brief destructor | ... | ... |
src/ExternLib/StatisticProcesses/MinVarStatisticProcess.cc
... | ... | @@ -14,7 +14,7 @@ namespace AMDA { |
14 | 14 | namespace Statistic { |
15 | 15 | namespace MinVar { |
16 | 16 | |
17 | -MinVarStatisticProcess::MinVarStatisticProcess(AMDA::Parameters::Parameter ¶meter, int index) : | |
17 | +MinVarStatisticProcess::MinVarStatisticProcess(AMDA::Parameters::Parameter ¶meter, const int& index) : | |
18 | 18 | AMDA::Parameters::StatisticProcess(parameter,true, index) |
19 | 19 | { |
20 | 20 | } | ... | ... |
src/ExternLib/StatisticProcesses/MinVarStatisticProcess.hh
src/ExternLib/mex_imah_calculate/mex_imah_calculate.cc
... | ... | @@ -10,7 +10,7 @@ namespace Parameters { |
10 | 10 | float samplingTime = 0.1209; |
11 | 11 | float GeffH, GeffG; |
12 | 12 | |
13 | - for(unsigned int i = 0; i < Hsp.getDim1Size(); ++i) { // Different elevations number | |
13 | + for(int i = 0; i < Hsp.getDim1Size(); ++i) { // Different elevations number | |
14 | 14 | std::vector<float> imaHVector = Hsp[i]; |
15 | 15 | std::vector<float> imaGVector = Gsp[i]; |
16 | 16 | for (unsigned int iEn = 0; iEn < 96; iEn++) {// 96 Energy Steps |
... | ... | @@ -99,4 +99,4 @@ namespace Parameters { |
99 | 99 | return Gl; |
100 | 100 | } |
101 | 101 | } |
102 | -} | |
103 | 102 | \ No newline at end of file |
103 | +} | ... | ... |
src/ExternLib/sum_into_table_indexes/SumIntoTableIndexes.hh
src/ParamGetImpl/DDServerInterface/ParamGetDDBase.cc
... | ... | @@ -148,8 +148,17 @@ namespace AMDA { |
148 | 148 | LOG4CXX_DEBUG(gLogger, "updateTimeInParamData data->VarNumber = " << data->VarNumber); |
149 | 149 | //ParamData is created, add data |
150 | 150 | //The capacity must be == at Data |
151 | + double t = 0.; | |
151 | 152 | for (int index = 0; index < data->VarNumber; index++) { |
152 | - double t = DD_Time2Double((char *) data->Variables[index]); | |
153 | + if (data->type == DD_CHAR) { | |
154 | + t = DD_Time2Double((char *) data->Variables[index]); | |
155 | + } | |
156 | + else if (data->type == DD_DOUBLE) { | |
157 | + t = *((double*)data->Variables[index]); | |
158 | + } | |
159 | + else { | |
160 | + BOOST_THROW_EXCEPTION(AMDA::AMDA_exception() << AMDA::ex_msg("Unknown time type")); | |
161 | + } | |
153 | 162 | _paramData->getTimeList().push_back(t); |
154 | 163 | } |
155 | 164 | } | ... | ... |
src/ParamOutputImpl/Plot/PanelPlotOutput.cc
... | ... | @@ -2817,7 +2817,7 @@ void PanelPlotOutput::createParameters(std::list<std::string>& usedParametersId_ |
2817 | 2817 | |
2818 | 2818 | if (usedMinParam == nullptr) |
2819 | 2819 | { |
2820 | - LOG4CXX_ERROR(gLogger, "PanelPlotOutput::createParameters - Cannot create parameter from expression " << minExpr); | |
2820 | + LOG4CXX_ERROR(gLogger, "PanelPlotOutput::createParameters - Cannot create parameter from expression " << minExpr.str()); | |
2821 | 2821 | continue; |
2822 | 2822 | } |
2823 | 2823 | |
... | ... | @@ -2838,7 +2838,7 @@ void PanelPlotOutput::createParameters(std::list<std::string>& usedParametersId_ |
2838 | 2838 | |
2839 | 2839 | if (usedMaxParam == nullptr) |
2840 | 2840 | { |
2841 | - LOG4CXX_ERROR(gLogger, "PanelPlotOutput::createParameters - Cannot create parameter from expression " << maxExpr); | |
2841 | + LOG4CXX_ERROR(gLogger, "PanelPlotOutput::createParameters - Cannot create parameter from expression " << maxExpr.str()); | |
2842 | 2842 | continue; |
2843 | 2843 | } |
2844 | 2844 | ... | ... |
src/ParamOutputImpl/Plot/TimeAxis.cc
... | ... | @@ -162,7 +162,14 @@ std::string getPlTimeFormat(std::string userFormat, double startTime, |
162 | 162 | return "%j/%H:%M"; |
163 | 163 | } |
164 | 164 | return "%j/%y"; |
165 | - } else { | |
165 | + } else if(userFormat == "DD/MM/YYYY" ){ | |
166 | + if (!std::isnan(numberOfMajorTicks) | |
167 | + && interval / TimeAxis::SECONDS_IN_DAY | |
168 | + < numberOfMajorTicks) { | |
169 | + return "%d/%H:%M"; | |
170 | + } | |
171 | + return "%d/%m/%Y"; | |
172 | + }else { | |
166 | 173 | if (!std::isnan(numberOfMajorTicks) |
167 | 174 | && interval / TimeAxis::SECONDS_IN_DAY |
168 | 175 | < numberOfMajorTicks) { | ... | ... |
src/Parameters/DataTypeMath.hh
... | ... | @@ -1363,5 +1363,80 @@ std::vector<Type> total(const AMDA::Parameters::Tab2DData<Type>& a,int mode) |
1363 | 1363 | } |
1364 | 1364 | |
1365 | 1365 | |
1366 | +template <typename Type1, typename Type2> | |
1367 | +std::vector<Type1> operator +(AMDA::Parameters::TabRow<Type1> a, AMDA::Parameters::TabRow<Type2> b) { | |
1368 | + std::vector<Type1> av(a); | |
1369 | + std::vector<Type1> bv(b); | |
1370 | + return av+bv; | |
1371 | +} | |
1372 | + | |
1373 | +template <typename Type1, typename Type2> | |
1374 | +std::vector<Type1> operator +(std::vector<Type1> a, AMDA::Parameters::TabRow<Type2> b) { | |
1375 | + std::vector<Type2> bv(b); | |
1376 | + return a+bv; | |
1377 | +} | |
1378 | + | |
1379 | +template <typename Type1, typename Type2> | |
1380 | +std::vector<Type1> operator +(AMDA::Parameters::TabRow<Type1> a, std::vector<Type2> b) { | |
1381 | + std::vector<Type1> av(a); | |
1382 | + return av+b; | |
1383 | +} | |
1384 | + | |
1385 | +template <typename Type1, typename Type2> | |
1386 | +std::vector<Type1> operator *(AMDA::Parameters::TabRow<Type1> a, AMDA::Parameters::TabRow<Type2> b) { | |
1387 | + std::vector<Type1> av(a); | |
1388 | + std::vector<Type1> bv(b); | |
1389 | + return av*bv; | |
1390 | +} | |
1391 | + | |
1392 | +template <typename Type1, typename Type2> | |
1393 | +std::vector<Type1> operator *(std::vector<Type1> a, AMDA::Parameters::TabRow<Type2> b) { | |
1394 | + std::vector<Type2> bv(b); | |
1395 | + return a*bv; | |
1396 | +} | |
1397 | + | |
1398 | +template <typename Type1, typename Type2> | |
1399 | +std::vector<Type1> operator *(AMDA::Parameters::TabRow<Type1> a, std::vector<Type2> b) { | |
1400 | + std::vector<Type1> av(a); | |
1401 | + return av*b; | |
1402 | +} | |
1403 | + | |
1404 | +template <typename Type1, typename Type2> | |
1405 | +std::vector<Type1> operator -(AMDA::Parameters::TabRow<Type1> a, AMDA::Parameters::TabRow<Type2> b) { | |
1406 | + std::vector<Type1> av(a); | |
1407 | + std::vector<Type1> bv(b); | |
1408 | + return av-bv; | |
1409 | +} | |
1410 | + | |
1411 | +template <typename Type1, typename Type2> | |
1412 | +std::vector<Type1> operator -(std::vector<Type1> a, AMDA::Parameters::TabRow<Type2> b) { | |
1413 | + std::vector<Type2> bv(b); | |
1414 | + return a-bv; | |
1415 | +} | |
1416 | + | |
1417 | +template <typename Type1, typename Type2> | |
1418 | +std::vector<Type1> operator -(AMDA::Parameters::TabRow<Type1> a, std::vector<Type2> b) { | |
1419 | + std::vector<Type1> av(a); | |
1420 | + return av-b; | |
1421 | +} | |
1422 | + | |
1423 | +template <typename Type1, typename Type2> | |
1424 | +std::vector<Type1> operator /(AMDA::Parameters::TabRow<Type1> a, AMDA::Parameters::TabRow<Type2> b) { | |
1425 | + std::vector<Type1> av(a); | |
1426 | + std::vector<Type1> bv(b); | |
1427 | + return av/bv; | |
1428 | +} | |
1429 | + | |
1430 | +template <typename Type1, typename Type2> | |
1431 | +std::vector<Type1> operator /(std::vector<Type1> a, AMDA::Parameters::TabRow<Type2> b) { | |
1432 | + std::vector<Type2> bv(b); | |
1433 | + return a/bv; | |
1434 | +} | |
1435 | + | |
1436 | +template <typename Type1, typename Type2> | |
1437 | +std::vector<Type1> operator /(AMDA::Parameters::TabRow<Type1> a, std::vector<Type2> b) { | |
1438 | + std::vector<Type1> av(a); | |
1439 | + return av/b; | |
1440 | +} | |
1366 | 1441 | |
1367 | 1442 | #endif /* LOGICALDATATYPE_HH_ */ | ... | ... |
src/Parameters/ServicesServer.hh
... | ... | @@ -51,7 +51,7 @@ typedef boost::function < ParamOutput*() > ParamOutputFactory; |
51 | 51 | typedef std::map<std::string, ParamOutputFactory> ParamOutputFactories; |
52 | 52 | |
53 | 53 | // StatisticProcess factory definition |
54 | -typedef boost::function < StatisticProcess*(Parameter &, int) > StatisticProcessFactory; | |
54 | +typedef boost::function < StatisticProcess*(Parameter &, const int&) > StatisticProcessFactory; | |
55 | 55 | typedef std::map<std::string, StatisticProcessFactory> StatisticProcessFactories; |
56 | 56 | |
57 | 57 | class FileConfigurator; | ... | ... |