Commit dadb42964b62e5614b278de840b3232e56becf23
Exists in
master
Merge branch 'amdadev'
Showing
24 changed files
with
242 additions
and
48 deletions
Show diff stats
CMakeLists.txt
... | ... | @@ -4,8 +4,8 @@ PROJECT(AMDA-Kernel) |
4 | 4 | |
5 | 5 | SET(CPACK_PACKAGE_VERSION_MAJOR "3") |
6 | 6 | SET(CPACK_PACKAGE_VERSION_MINOR "7") |
7 | -SET(CPACK_PACKAGE_VERSION_PATCH "2") | |
8 | -SET(CPACK_PACKAGE_VERSION_DATE "2024-05-23") | |
7 | +SET(CPACK_PACKAGE_VERSION_PATCH "3") | |
8 | +SET(CPACK_PACKAGE_VERSION_DATE "2024-10-02") | |
9 | 9 | |
10 | 10 | set(EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/build/${CMAKE_BUILD_TYPE}/bin/) |
11 | 11 | set(LIBRARY_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/build/${CMAKE_BUILD_TYPE}/lib/) |
... | ... | @@ -184,6 +184,7 @@ add_subdirectory(src/ExternLib/Shue) |
184 | 184 | add_subdirectory(src/ExternLib/StatisticFunctions) |
185 | 185 | add_subdirectory(src/ExternLib/Fix) |
186 | 186 | add_subdirectory(src/ExternLib/Ceil) |
187 | +add_subdirectory(src/ExternLib/IsNaN) | |
187 | 188 | add_subdirectory(src/ExternLib/Floor) |
188 | 189 | add_subdirectory(src/ExternLib/Sign) |
189 | 190 | add_subdirectory(src/ExternLib/ttcat_to_param) | ... | ... |
config/xsd/request/plot.xsd
... | ... | @@ -588,6 +588,7 @@ |
588 | 588 | </xs:attribute> |
589 | 589 | <xs:attribute name="id" type="xs:integer"></xs:attribute> |
590 | 590 | <xs:attribute name="index" type="xs:integer"></xs:attribute> |
591 | + <xs:attribute name="showIntInfo" type="xs:boolean"></xs:attribute> | |
591 | 592 | </xs:complexType> |
592 | 593 | </xs:element> |
593 | 594 | </xs:sequence> | ... | ... |
... | ... | @@ -0,0 +1,23 @@ |
1 | + | |
2 | +PROJECT(IsNaN) | |
3 | + | |
4 | +set(LIBRARY_OUTPUT_PATH ${PLUGIN_OUTPUT_PATH}/IsNaN) | |
5 | + | |
6 | +include_directories( | |
7 | +) | |
8 | + | |
9 | +#Library configuration | |
10 | +file( | |
11 | + GLOB_RECURSE | |
12 | + source_files | |
13 | + ./* | |
14 | +) | |
15 | + | |
16 | +ADD_LIBRARY( IsNaN SHARED ${source_files} ) | |
17 | + | |
18 | +target_link_libraries( | |
19 | + IsNaN | |
20 | +) | |
21 | + | |
22 | +FILE( GLOB_RECURSE PROJ_HEADERS *.hh ) | |
23 | +INSTALL(FILES ${PROJ_HEADERS} DESTINATION ${LIBRARY_OUTPUT_PATH} PERMISSIONS OWNER_READ GROUP_READ WORLD_READ) | ... | ... |
... | ... | @@ -0,0 +1,36 @@ |
1 | +/** | |
2 | + * | |
3 | + * Created on: 18 jun. 2024 | |
4 | + * Author: AKKODIS - Furkan | |
5 | + */ | |
6 | + | |
7 | + | |
8 | +#ifndef ISNAN_HH_ | |
9 | +#define ISNAN_HH_ | |
10 | + | |
11 | +#include <vector> | |
12 | + | |
13 | +/** | |
14 | + * @bried Checks if el is a NaN | |
15 | + */ | |
16 | +int IsNaN(const float& el); | |
17 | + | |
18 | +int IsNaN(const double& el); | |
19 | + | |
20 | +int IsNaN(const long double& el); | |
21 | + | |
22 | +int IsNaN(const int& el); | |
23 | + | |
24 | +int IsNaN(const short& el); | |
25 | + | |
26 | +std::vector<int> IsNaN(const std::vector<float>& el); | |
27 | + | |
28 | +std::vector<int> IsNaN(const std::vector<double>& el); | |
29 | + | |
30 | +std::vector<int> IsNaN(const std::vector<long double>& el); | |
31 | + | |
32 | +std::vector<int> IsNaN(const std::vector<int>& el); | |
33 | + | |
34 | +std::vector<int> IsNaN(const std::vector<short>& el); | |
35 | + | |
36 | +#endif /* ISNAN_HH_ */ | ... | ... |
... | ... | @@ -0,0 +1,66 @@ |
1 | +/** | |
2 | + * | |
3 | + * | |
4 | + * Created on: 18 jun. 2024 | |
5 | + * Author: AKKODIS - Furkan | |
6 | + */ | |
7 | + | |
8 | +#include "IsNaN.hh" | |
9 | + | |
10 | +#include <cmath> | |
11 | + | |
12 | + | |
13 | +template <typename Type> | |
14 | +int _isNaN(const Type& el) { | |
15 | + double dEl = (double)el; | |
16 | + return (int)std::isnan(dEl); | |
17 | +} | |
18 | + | |
19 | +template <typename Type> | |
20 | +std::vector<int> _isNaN(const std::vector<Type>& el) { | |
21 | + std::vector<int> result; | |
22 | + for (typename std::vector<Type>::const_iterator it = el.begin(); it != el.end(); ++it) { | |
23 | + result.push_back(_isNaN(*it)); | |
24 | + } | |
25 | + return result; | |
26 | +} | |
27 | + | |
28 | +int IsNaN(const float& el) { | |
29 | + return _isNaN(el); | |
30 | +} | |
31 | + | |
32 | +int IsNaN(const double& el) { | |
33 | + return _isNaN(el); | |
34 | +} | |
35 | + | |
36 | +int IsNaN(const long double& el) { | |
37 | + return _isNaN(el); | |
38 | +} | |
39 | + | |
40 | +int IsNaN(const int& el) { | |
41 | + return _isNaN(el); | |
42 | +} | |
43 | + | |
44 | +int IsNaN(const short& el) { | |
45 | + return _isNaN(el); | |
46 | +} | |
47 | + | |
48 | +std::vector<int> IsNaN(const std::vector<float>& el) { | |
49 | + return _isNaN(el); | |
50 | +} | |
51 | + | |
52 | +std::vector<int> IsNaN_(const std::vector<double>& el) { | |
53 | + return _isNaN(el); | |
54 | +} | |
55 | + | |
56 | +std::vector<int> IsNaN_(const std::vector<long double>& el) { | |
57 | + return _isNaN(el); | |
58 | +} | |
59 | + | |
60 | +std::vector<int> IsNaN_(const std::vector<int>& el) { | |
61 | + return _isNaN(el); | |
62 | +} | |
63 | + | |
64 | +std::vector<int> IsNaN_(const std::vector<short>& el) { | |
65 | + return _isNaN(el); | |
66 | +} | ... | ... |
src/ExternLib/SlidingAverage/SlidingAverageProcess.cc
... | ... | @@ -51,17 +51,25 @@ TimeStamp SlidingAverageProcess::init() { |
51 | 51 | if (_SlidingAverageTime <= 0) { |
52 | 52 | BOOST_THROW_EXCEPTION(AMDA::AMDA_exception() << AMDA::errno_code(AMDA_PROCESS_ERR) << AMDA::ex_msg(std::string("Sliding Average Time must be greater than 0."))); |
53 | 53 | } |
54 | - | |
55 | - TimeIntervalListSPtr lTimeIntervalList(new TimeIntervalList()); | |
54 | + | |
55 | + TimeIntervalListSPtr lTimeIntervalList(new TimeIntervalList()); | |
56 | 56 | |
57 | 57 | // Add shift time for each time interval |
58 | 58 | for (TimeIntervalList::iterator it = _timeIntervalList->begin(); it != _timeIntervalList->end(); ++it) { |
59 | - lTimeIntervalList->push_back(TimeInterval( (*it)._startTime - _SlidingAverageTime/2., (*it)._stopTime + _SlidingAverageTime/2.)); | |
59 | + if ((*it)._startTime - _SlidingAverageTime/2. > 0) { | |
60 | + lTimeIntervalList->push_back(TimeInterval( (*it)._startTime - _SlidingAverageTime/2., (*it)._stopTime + _SlidingAverageTime/2.)); | |
61 | + } | |
62 | + else { | |
63 | + lTimeIntervalList->push_back(TimeInterval( 0, (*it)._stopTime + _SlidingAverageTime/2.)); | |
64 | + } | |
60 | 65 | } |
61 | 66 | |
62 | 67 | TimeStamp timeStamp = _parameterInput->init( this, lTimeIntervalList); |
68 | + | |
63 | 69 | Parameter::InfoList lInfoList = _parameterInput->getInfoList(); |
70 | + | |
64 | 71 | _parameter.getInfoList().insert(lInfoList.begin(), lInfoList.end()); |
72 | + | |
65 | 73 | _paramInput = _parameterInput->getParamData(this).get(); |
66 | 74 | |
67 | 75 | SlidingAverageCreator lSlidingAverageCreator(*this,*_paramInput,_timeIntervalList,_SlidingAverageTime); | ... | ... |
src/InternLib/ProcessSamplingUnderRefParam.cc
... | ... | @@ -27,6 +27,7 @@ ProcessSamplingUnderRefParam::ProcessSamplingUnderRefParam(Parameter &parameter) |
27 | 27 | |
28 | 28 | ProcessSamplingUnderRefParam::ProcessSamplingUnderRefParam(const ProcessSamplingUnderRefParam& pProcess, Parameter ¶meter) |
29 | 29 | : SingleParamProcess_CRTP(pProcess,parameter), _paramRefInput(pProcess._paramRefInput) { |
30 | + establishConnection(); | |
30 | 31 | } |
31 | 32 | |
32 | 33 | ProcessSamplingUnderRefParam::~ProcessSamplingUnderRefParam() { |
... | ... | @@ -38,47 +39,50 @@ ProcessSamplingUnderRefParam::~ProcessSamplingUnderRefParam() { |
38 | 39 | |
39 | 40 | |
40 | 41 | void ProcessSamplingUnderRefParam::establishConnection() { |
41 | - if ((_refParameterSPtr != nullptr) && (_refParameterSPtr != _parameterInput)) { | |
42 | - _refParameterSPtr->openConnection(this); | |
42 | + if ((_refParameterSPtr != nullptr) && (_refParameterSPtr != _parameterInput)) { | |
43 | + _refParameterSPtr->openConnection(this); | |
43 | 44 | } |
44 | 45 | |
45 | 46 | SingleParamProcess_CRTP::establishConnection(); |
46 | - | |
47 | + | |
47 | 48 | if ((_refParameterSPtr == nullptr) && (_attributList.size() == 1) ) { |
48 | 49 | _refParameterSPtr = _parameterInput->getParameterManager().getParameter(_attributList[0]); |
49 | - if ((_refParameterSPtr != nullptr) && (_refParameterSPtr != _parameterInput)) { | |
50 | - _refParameterSPtr->openConnection(this); | |
50 | + if ((_refParameterSPtr != nullptr) && (_refParameterSPtr != _parameterInput)) { | |
51 | + _refParameterSPtr->openConnection(this); | |
51 | 52 | } |
52 | 53 | } |
53 | 54 | } |
54 | 55 | |
55 | 56 | TimeStamp ProcessSamplingUnderRefParam::init() { |
56 | - /// Init input parameter | |
57 | + /// Init input parameter | |
57 | 58 | TimeStamp timeStamp = _parameterInput->init( this, _timeIntervalList); |
58 | - /// Calibration information copy | |
59 | + | |
60 | + /// Calibration information copy | |
59 | 61 | Parameter::InfoList lInfoList = _parameterInput->getInfoList(); |
60 | 62 | _parameter.getInfoList().insert(lInfoList.begin(), lInfoList.end()); |
61 | 63 | _paramInput = _parameterInput->getParamData(this).get(); |
62 | - | |
64 | + | |
63 | 65 | // check reference parameter |
64 | 66 | if (_refParameterSPtr == nullptr) { |
65 | 67 | BOOST_THROW_EXCEPTION(AMDA::AMDA_exception() << AMDA::errno_code(AMDA_PROCESS_ERR) << AMDA::ex_msg(std::string("ProcessSamplingUnderRefParam : cannot retrieve reference parameter "))); |
66 | 68 | } |
67 | 69 | |
68 | - timeStamp = std::max(timeStamp, _refParameterSPtr->init( this, _timeIntervalList)); | |
69 | - | |
70 | + if ((_refParameterSPtr != nullptr) && (_refParameterSPtr != _parameterInput)) { | |
71 | + timeStamp = std::max(timeStamp, _refParameterSPtr->init( this, _timeIntervalList)); | |
72 | + } | |
73 | + | |
70 | 74 | _paramRefInput = _refParameterSPtr->getParamData(this).get(); |
71 | 75 | |
72 | 76 | double computedGapSize = _refParameterSPtr->getParameterManager().getComputedGapSize(_parameterInput->getGapThreshold(), _paramInput->getMinSampling()); |
73 | 77 | //_parameter.setGapThreshold(computedGapSize/_paramRefInput->getMinSampling()); |
74 | - | |
78 | + | |
75 | 79 | // ProcessSamplingClassic _operation creation |
76 | 80 | Resampling::CreateResampling lCreateResampling(*this, _timeIntervalList, |
77 | 81 | *_paramInput, *_paramRefInput, computedGapSize, _parameterInput->getDataWriterTemplate()->useNearestValue(), _refParameterSPtr == _parameterInput); |
78 | 82 | _operation = lCreateResampling.getResampling(); |
79 | 83 | |
80 | 84 | static_cast<Resampling::ResamplingAbstract*>(_operation)->init(); |
81 | - | |
85 | + | |
82 | 86 | /// Get result ParamData |
83 | 87 | _paramData = ParamDataSPtr(_operation->getParamOutput()); |
84 | 88 | |
... | ... | @@ -168,7 +172,7 @@ void ProcessSamplingUnderRefParam::updateInfo(Parameter & parameter) |
168 | 172 | processInfo += _refParameterSPtr->getId(); |
169 | 173 | processInfo += "'"; |
170 | 174 | |
171 | - if (_parameterInput->getDataWriterTemplate()->useNearestValue()) | |
175 | + if (_parameterInput->getDataWriterTemplate()->useNearestValue()) | |
172 | 176 | processInfo += ". Use nearest value."; |
173 | 177 | |
174 | 178 | paramInfo->setProcessInfo(processInfo); | ... | ... |
src/ParamOutputImpl/Plot/AxisLegendManager.cc
... | ... | @@ -50,7 +50,7 @@ namespace plot |
50 | 50 | continue; |
51 | 51 | } |
52 | 52 | Color compLegendColor = lXAxis->_color; |
53 | - if(param.getHistogramSeriesPropertiesList().size() > 0) | |
53 | + if(param.getHistogramSeriesPropertiesList().size() > 1) | |
54 | 54 | compLegendColor = pHistogramProperties->getColor(); |
55 | 55 | ParameterIndexComponentColor xIndex = ParameterIndexComponentColor(xIndexComp, compLegendColor); |
56 | 56 | pushComponentInList(xParamId, xIndex, axesParamsComponents[xAxisId], insertionOrder); | ... | ... |
src/ParamOutputImpl/Plot/Page.cc
... | ... | @@ -65,7 +65,8 @@ Page::Page() : |
65 | 65 | _superposeMode (false), |
66 | 66 | |
67 | 67 | _font(Font("", 0)), |
68 | - _title(Font("", 0)) | |
68 | + _title(Font("", 0)), | |
69 | + _intIndex(-1) | |
69 | 70 | { |
70 | 71 | // Initialize colormap |
71 | 72 | ColormapManager::getInstance(); |
... | ... | @@ -104,7 +105,8 @@ Page::Page(DefaultPlotConfiguration& defaults) : |
104 | 105 | _superposeMode (defaults._defaultPage._superposeMode), |
105 | 106 | |
106 | 107 | _font(defaults._defaultPage.getFont()), |
107 | - _title(_font) | |
108 | + _title(_font), | |
109 | + _intIndex(defaults._defaultPage._intIndex) | |
108 | 110 | { |
109 | 111 | |
110 | 112 | // Initialize colormap |
... | ... | @@ -143,7 +145,9 @@ Page::Page(const Page& page) : |
143 | 145 | |
144 | 146 | _font(page.getFont()), |
145 | 147 | |
146 | - _title(*page.getTitle()) | |
148 | + _title(*page.getTitle()), | |
149 | + _intIndex(page._intIndex) | |
150 | + | |
147 | 151 | { |
148 | 152 | // Initialize colormap |
149 | 153 | ColormapManager::getInstance(); | ... | ... |
src/ParamOutputImpl/Plot/Page.hh
... | ... | @@ -88,6 +88,10 @@ public: |
88 | 88 | _title._text = titleText; |
89 | 89 | } |
90 | 90 | |
91 | + | |
92 | + int getIntIndex(){return _intIndex;} | |
93 | + void setIntIndex(int index){_intIndex = index;} | |
94 | + | |
91 | 95 | Font getTitleFont() { |
92 | 96 | Font titleFont(_title.getFont()); |
93 | 97 | if (titleFont.getName() == "") |
... | ... | @@ -213,6 +217,8 @@ private: |
213 | 217 | */ |
214 | 218 | Label _title; |
215 | 219 | |
220 | + int _intIndex; | |
221 | + | |
216 | 222 | void initPageParameters(std::shared_ptr<plstream>& pls); |
217 | 223 | |
218 | 224 | void drawCopyright(std::shared_ptr<plstream>& pls); | ... | ... |
src/ParamOutputImpl/Plot/Panel.cc
... | ... | @@ -20,6 +20,7 @@ int Panel::PANEL_COUNTER = -1; |
20 | 20 | |
21 | 21 | Panel::Panel() : _id(--PANEL_COUNTER), |
22 | 22 | _index(-1), |
23 | + _showIntInfo(false), | |
23 | 24 | _resolution(0), |
24 | 25 | _updateTitleOnNextInterval(false), |
25 | 26 | _bounds(Bounds()), |
... | ... | @@ -44,6 +45,7 @@ Panel::Panel() : _id(--PANEL_COUNTER), |
44 | 45 | |
45 | 46 | Panel::Panel(DefaultPlotConfiguration &defaults) : _id(--PANEL_COUNTER), |
46 | 47 | _index(defaults._defaultPanel._index), |
48 | + _showIntInfo(defaults._defaultPanel._showIntInfo), | |
47 | 49 | _resolution(defaults._defaultPanel._resolution), |
48 | 50 | _updateTitleOnNextInterval(false), |
49 | 51 | _bounds(Bounds()), |
... | ... | @@ -67,6 +69,7 @@ Panel::Panel(DefaultPlotConfiguration &defaults) : _id(--PANEL_COUNTER), |
67 | 69 | |
68 | 70 | Panel::Panel(Page *page) : _id(--PANEL_COUNTER), |
69 | 71 | _index(-1), |
72 | + _showIntInfo(false), | |
70 | 73 | _resolution(DefaultPlotConfiguration::getInstance()._defaultPanel._resolution), |
71 | 74 | _updateTitleOnNextInterval(false), |
72 | 75 | _bounds(Bounds()), |
... | ... | @@ -105,7 +108,7 @@ Font Panel::getTitleFont() { |
105 | 108 | |
106 | 109 | void Panel::reserveSpaceForTitle(double& topSpace, double& bottomSpace, double& titleHeight) { |
107 | 110 | LabelRowInfo titleRows(Label::getRowNumber(_title)); |
108 | - if (titleRows.empty()) | |
111 | + if (titleRows.empty() && !_showIntInfo) | |
109 | 112 | return; |
110 | 113 | |
111 | 114 | CharSize lCharSizeTitle; |
... | ... | @@ -113,31 +116,36 @@ void Panel::reserveSpaceForTitle(double& topSpace, double& bottomSpace, double& |
113 | 116 | Font titleFont(getTitleFont()); |
114 | 117 | PlPlotUtil::setPlFont(titleFont); |
115 | 118 | lCharSizeTitle = PlPlotUtil::getCharacterSizeInPlPage(_page); |
116 | - | |
117 | - titleHeight = (titleRows.size() + PlPlotUtil::LINE_SPACE_TITLE * (titleRows.size() + 1)) * lCharSizeTitle.second; | |
118 | - | |
119 | - switch (_titlePosition) | |
119 | + | |
120 | + if (_showIntInfo) | |
120 | 121 | { |
121 | - case PlotCommon::Position::POS_TOP : | |
122 | - topSpace += titleHeight; | |
123 | - break; | |
124 | - case PlotCommon::Position::POS_BOTTOM : | |
125 | - bottomSpace += titleHeight; | |
126 | - break; | |
127 | - default : | |
128 | - //Not possible - Nothing to do | |
129 | - ; | |
122 | + titleHeight = (1 + PlPlotUtil::LINE_SPACE_TITLE * (2)) * lCharSizeTitle.second; | |
123 | + topSpace += titleHeight; | |
124 | + } | |
125 | + | |
126 | + if (!titleRows.empty()){ | |
127 | + titleHeight = (titleRows.size() + PlPlotUtil::LINE_SPACE_TITLE * (titleRows.size() + 1)) * lCharSizeTitle.second; | |
128 | + | |
129 | + switch (_titlePosition) | |
130 | + { | |
131 | + case PlotCommon::Position::POS_TOP : | |
132 | + topSpace += titleHeight; | |
133 | + break; | |
134 | + case PlotCommon::Position::POS_BOTTOM : | |
135 | + bottomSpace += titleHeight; | |
136 | + break; | |
137 | + default : | |
138 | + //Not possible - Nothing to do | |
139 | + ; | |
140 | + } | |
130 | 141 | } |
131 | 142 | } |
132 | 143 | |
133 | 144 | void Panel::drawTitle(std::shared_ptr<plstream>& pls) { |
134 | 145 | LabelRowInfo titleRows(Label::getRowNumber(_title)); |
135 | - if (titleRows.empty()) | |
136 | - return; | |
137 | - | |
138 | - if ((_titlePosition != PlotCommon::Position::POS_TOP) && (_titlePosition != PlotCommon::Position::POS_BOTTOM)) | |
146 | + if ((titleRows.empty() && !_showIntInfo)) | |
139 | 147 | return; |
140 | - | |
148 | + | |
141 | 149 | // Compute panel coordinate in the page |
142 | 150 | Bounds lBounds = getBoundsInPlPage(); |
143 | 151 | |
... | ... | @@ -148,24 +156,47 @@ void Panel::drawTitle(std::shared_ptr<plstream>& pls) { |
148 | 156 | |
149 | 157 | // Specify viewport for the panel |
150 | 158 | pls->vpor(lBounds._x, lBounds._x + lBounds._width, |
151 | - lBounds._y, lBounds._y + lBounds._height); | |
159 | + lBounds._y, lBounds._y + lBounds._height); | |
160 | + | |
152 | 161 | |
153 | 162 | float lRowDisp = -0.5 - PlPlotUtil::LINE_SPACE_TITLE; |
154 | 163 | |
155 | - // Draw each line of title | |
156 | - for (auto row : titleRows) { | |
164 | + if(_showIntInfo && !_page->_superposeMode){ | |
165 | + PlotCommon::Position intPos = PlotCommon::Position::POS_TOP; | |
166 | + PlotCommon::Align intAlign = PlotCommon::Align::RIGHT; | |
167 | + std::string intText = "Int #"+std::to_string(_page->getIntIndex()+1); | |
168 | + // Draw each line of title | |
157 | 169 | pls->mtex( |
158 | - getPlSide(_titlePosition).c_str(), | |
170 | + getPlSide(intPos).c_str(), | |
159 | 171 | lRowDisp, |
160 | - getPlPos(_titleAlign), | |
161 | - getPlJust(_titleAlign), | |
162 | - row.c_str() | |
172 | + getPlPos(intAlign), | |
173 | + getPlJust(intAlign), | |
174 | + intText.c_str() | |
163 | 175 | ); |
164 | 176 | |
165 | 177 | // 1 is for full character and then let space between two line. |
166 | 178 | lRowDisp -= (1 + PlPlotUtil::LINE_SPACE_TITLE); |
167 | 179 | } |
168 | 180 | |
181 | + if (!titleRows.empty()){ | |
182 | + if ((_titlePosition != PlotCommon::Position::POS_TOP) && (_titlePosition != PlotCommon::Position::POS_BOTTOM)) | |
183 | + return; | |
184 | + | |
185 | + // Draw each line of title | |
186 | + for (auto row : titleRows) { | |
187 | + pls->mtex( | |
188 | + getPlSide(_titlePosition).c_str(), | |
189 | + lRowDisp, | |
190 | + getPlPos(_titleAlign), | |
191 | + getPlJust(_titleAlign), | |
192 | + row.c_str() | |
193 | + ); | |
194 | + | |
195 | + // 1 is for full character and then let space between two line. | |
196 | + lRowDisp -= (1 + PlPlotUtil::LINE_SPACE_TITLE); | |
197 | + } | |
198 | + } | |
199 | + | |
169 | 200 | // Restore initial color. |
170 | 201 | restoreColor(pls, lInitialColor, _page->_mode); |
171 | 202 | } | ... | ... |
src/ParamOutputImpl/Plot/Panel.hh
src/ParamOutputImpl/Plot/PanelNode.cc
... | ... | @@ -63,6 +63,14 @@ void PanelNode::proceed(xmlNodePtr pNode, |
63 | 63 | xmlFree(value); |
64 | 64 | } |
65 | 65 | |
66 | + | |
67 | + // -- showIntInfo | |
68 | + value = xmlGetProp(pNode, (const xmlChar *) "showIntInfo"); | |
69 | + if (value) { | |
70 | + panel->_showIntInfo = (strcasecmp ((const char*)value, "true") == 0); | |
71 | + xmlFree(value); | |
72 | + } | |
73 | + | |
66 | 74 | // -- resolution |
67 | 75 | if ((value = xmlGetProp(pNode, (const xmlChar *) "resolution"))) { |
68 | 76 | panel->_resolution = atoi((const char*) value); | ... | ... |
src/ParamOutputImpl/Plot/PlotOutput.cc
... | ... | @@ -247,6 +247,7 @@ bool PlotOutput::initNewPage(int intervalIndex, std::string& ttName) |
247 | 247 | plotFilePrefix << _filePrefix << "_"; |
248 | 248 | |
249 | 249 | //draw page |
250 | + _page->setIntIndex(intervalIndex); | |
250 | 251 | _page->draw(_pls, newFile, plotFilePrefix.str().c_str()); |
251 | 252 | |
252 | 253 | return newFile; | ... | ... |
test/plots_ref/centos-7/TmaAmda/ReLease5/Histo1D/plot_histo1d_01_REF.png
test/plots_ref/centos-7/TmaAmda/ReLease5/Histo1D/plot_histo1d_02_REF.png
test/plots_ref/centos-7/TmaAmda/ReLease5/Histo1D/plot_histo1d_04_REF.png
test/plots_ref/centos-7/TmaAmda/ReLease5/Histo1D/plot_histo1d_05_0_REF.png
test/plots_ref/centos-7/TmaAmda/ReLease5/Histo1D/plot_histo1d_05_1_REF.png
test/plots_ref/centos-7/TmaAmda/ReLease5/Histo1D/plot_histo1d_05_2_REF.png
test/plots_ref/centos-7/TmaAmda/ReLease5/Histo1D/plot_histo1d_05_3_REF.png
test/plots_ref/centos-7/TmaAmda/ReLease5/Histo1D/plot_histo1d_05_4_REF.png
test/plots_ref/centos-7/TmaAmda/ReLease5/Histo1D/plot_histo1d_05_5_REF.png
test/plots_ref/centos-7/TmaAmda/ReLease5/Histo1D/plot_histo1d_06_REF.png