Commit a4dbd36a75712a3ea912440866c6376c6d55a0d6
Exists in
master
and in
41 other branches
Merge branch 'master' into amdadev
Showing
4 changed files
with
21 additions
and
13 deletions
Show diff stats
CMakeLists.txt
@@ -4,7 +4,7 @@ PROJECT(AMDA-Kernel) | @@ -4,7 +4,7 @@ PROJECT(AMDA-Kernel) | ||
4 | 4 | ||
5 | SET(CPACK_PACKAGE_VERSION_MAJOR "3") | 5 | SET(CPACK_PACKAGE_VERSION_MAJOR "3") |
6 | SET(CPACK_PACKAGE_VERSION_MINOR "6") | 6 | SET(CPACK_PACKAGE_VERSION_MINOR "6") |
7 | -SET(CPACK_PACKAGE_VERSION_PATCH "2") | 7 | +SET(CPACK_PACKAGE_VERSION_PATCH "3") |
8 | 8 | ||
9 | set(EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/build/${CMAKE_BUILD_TYPE}/bin/) | 9 | set(EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/build/${CMAKE_BUILD_TYPE}/bin/) |
10 | set(LIBRARY_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/build/${CMAKE_BUILD_TYPE}/lib/) | 10 | set(LIBRARY_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/build/${CMAKE_BUILD_TYPE}/lib/) |
src/ExternLib/GetClbInfo/GetClbInfo.hh
@@ -109,13 +109,16 @@ public: | @@ -109,13 +109,16 @@ public: | ||
109 | ElementType value = _paramInput.getDataList()[index]; | 109 | ElementType value = _paramInput.getDataList()[index]; |
110 | std::vector<double> calib; | 110 | std::vector<double> calib; |
111 | calib.resize(_maxSize, std::nan("")); | 111 | calib.resize(_maxSize, std::nan("")); |
112 | - if (!isNAN(value)) { | ||
113 | - Parameter::InfoValues* info = _calibrationInfoList[(int)floor(value)]; | ||
114 | - | ||
115 | - int i = 0; | ||
116 | - for (std::vector<double>::iterator it = info->begin(); it != info->end(); ++it) { | ||
117 | - calib[i] = (*it); | ||
118 | - ++i; | 112 | + int clb_index = (int)floor(value); |
113 | + if (!isNAN(value) && (clb_index >= 0) && (clb_index < _calibrationInfoList.size())) { | ||
114 | + Parameter::InfoValues* info = _calibrationInfoList[clb_index]; | ||
115 | + | ||
116 | + if (info != NULL) { | ||
117 | + int i = 0; | ||
118 | + for (std::vector<double>::iterator it = info->begin(); it != info->end(); ++it) { | ||
119 | + calib[i] = (*it); | ||
120 | + ++i; | ||
121 | + } | ||
119 | } | 122 | } |
120 | } | 123 | } |
121 | 124 |
src/ExternLib/mexvex_els_decode/MexVexElsDecode.hh
@@ -58,9 +58,14 @@ public: | @@ -58,9 +58,14 @@ public: | ||
58 | double crtTime = _paramInput.getTime(_index); | 58 | double crtTime = _paramInput.getTime(_index); |
59 | ElemType inputElt = _paramInput.get(_index); | 59 | ElemType inputElt = _paramInput.get(_index); |
60 | 60 | ||
61 | - int mode = _energyTableInput.get(_index); | ||
62 | - | ||
63 | - if (mode == 1) { | 61 | + short mode = _energyTableInput.get(_index); |
62 | + | ||
63 | + if (isNAN(mode)) { | ||
64 | + _paramOutput->pushTime(crtTime); | ||
65 | + inputElt << NotANumber(); | ||
66 | + pushDataForMode0Or2(inputElt); | ||
67 | + } | ||
68 | + else if (mode == 1) { | ||
64 | for (int i = 0; i < 4; ++i){ | 69 | for (int i = 0; i < 4; ++i){ |
65 | _paramOutput->pushTime(crtTime+i); | 70 | _paramOutput->pushTime(crtTime+i); |
66 | pushDataForMode1 (inputElt, i); | 71 | pushDataForMode1 (inputElt, i); |
src/ParamOutputImpl/Plot/SpectroNode.hh
@@ -118,7 +118,7 @@ namespace plot | @@ -118,7 +118,7 @@ namespace plot | ||
118 | if (value) | 118 | if (value) |
119 | { | 119 | { |
120 | char *newValueBrut = (char *)value; | 120 | char *newValueBrut = (char *)value; |
121 | - double newValue = std::stod(newValueBrut); | 121 | + double newValue = (strcmp(newValueBrut,"") == 0) ? -1 : std::stod(newValueBrut); |
122 | spectroPropsPtr->setBackgroundSubValue(newValue); | 122 | spectroPropsPtr->setBackgroundSubValue(newValue); |
123 | xmlFree(value); | 123 | xmlFree(value); |
124 | } | 124 | } |
@@ -131,7 +131,7 @@ namespace plot | @@ -131,7 +131,7 @@ namespace plot | ||
131 | if (value) | 131 | if (value) |
132 | { | 132 | { |
133 | char *newValueBrut = (char *)value; | 133 | char *newValueBrut = (char *)value; |
134 | - int newValue = std::stoi(newValueBrut); | 134 | + int newValue = (strcmp(newValueBrut, "") == 0) ? 0 : std::stoi(newValueBrut); |
135 | spectroPropsPtr->setBackgroundSubDim(newValue); | 135 | spectroPropsPtr->setBackgroundSubDim(newValue); |
136 | xmlFree(value); | 136 | xmlFree(value); |
137 | } | 137 | } |