Commit 731e9623 authored by Locatelli's avatar Locatelli
Browse files

Add config server property plotyVersion

parent 2a887290
......@@ -19,6 +19,7 @@
#include "ScanSpy.h"
#include "controllers/common/family/Families.h"
#include <InstrumentManager/InstrumentManager.h>
#include "common/base/ServerProperties.h"
#include <algorithm>
using namespace std;
......@@ -64,6 +65,8 @@ ScanSpy::ScanSpy(const string& name) :
stepCount.init(this, NOSAVE, "step_count");
useGrid.init(this, SAVE, "use_grid");
useLog.init(this, SAVE, "use_log");
plotyVersion.init(this, SAVE, "ploty_version");
plotXLabelMain.init(this, NOSAVE, "plot_x_label_main");
nbOptimizationPlotY.update(MAX_OPTIMIZATION_PLOTY);
optimizationPlotX.resize(MAX_OPTIMIZATION_PLOTY);
......@@ -113,6 +116,8 @@ ScanSpy::~ScanSpy() {
* postConfiguration
*/
void ScanSpy::postConfiguration() {
plotyVersion.update(common::ServerProperties::getInstance()->getPlotyVersion());
Publisher::attach(this);
for (uint32 index = 0; index < m_ScanControllers.size(); ++index) {
......@@ -376,6 +381,9 @@ void ScanSpy::updatePlotXLabel(int32 index, int32 nplot) {
}
else {
plotXLabel.update(nplot, m_ScanControllers[index]->plotXLabel.get(nplot));
if (nplot == 0) {
plotXLabelMain.update(plotXLabel.get(0));
}
}
}
......
......@@ -69,6 +69,8 @@ public:
Property<int32> countRepeaterNbCounts;
Property<bool> useGrid;
Property<bool> useLog;
Property<int32> plotyVersion;
Property<std::string> plotXLabelMain;
Property<std::string> scanControllerName;
......
......@@ -32,6 +32,7 @@
<property_switcher role="parameterizable_scan_1d1" property="roc_mode" switcher_key="rocModeSwitcher"/>
<property_switcher role="parameterizable_scan_1d1" property="optimization" switcher_key="scan_1dOptimisationSwitcher"/>
<property_switcher role="parameterizable_scan_1d1" property="optimization_type" switcher_key="scan_1dOptimisationTypeSwitcher"/>
<property_switcher role="scan_spy1" property="ploty_version" switcher_key="ploty_versionSwitcher" />
<text role="parameterizable_scan_1d1" property="subtitle" prefix="parameterizable_scan_1d.subtitlePrefix"/>
<newLine/>
......@@ -90,9 +91,16 @@
<switchable_composite switch_values="true" switcher_key="scan_1dOptimisationSwitcher">
<combo role="parameterizable_scan_1d1" property="detector_type" prefix="parameterizable_scan_1d.detector_typePrefix" valuesAndLabels="parameterizable_scan_1d.monitor,parameterizable_scan_1d.detector"/>
<dynamic_composite role="scan_spy1" properties="plot_title,optimization_plot_x,optimization_plot_y,optimization1d_x_result,optimization1d_result_found,plot_y_label,plot_x_label,optimization_fit_plot,optimization_fit_plot_y" isVertical="false">
<dynamic_plot_launcher role="scan_spy1" data="scanSpyPlot" title="scan_spy.title" xAxisTitleProperty="plot_x_label" yAxisTitleProperty="plot_y_label" titleProperty="plot_title" height="20"/>
</dynamic_composite>
<switchable_composite switch_values="1" switcher_key="ploty_versionSwitcher">
<composite key="scanspyPlotLauncher">
</composite>
</switchable_composite>
<switchable_composite switch_values="2" switcher_key="ploty_versionSwitcher">
<simple_label prefix="toto"></simple_label>
<dynamic_composite role="scan_spy1" properties="plot_title,optimization_plot_x,optimization_plot_y,optimization1d_x_result,optimization1d_result_found,plot_y_label,plot_x_label,optimization_fit_plot,optimization_fit_plot_y" isVertical="false">
<dynamic_plot_launcher role="scan_spy1" data="scanSpyPlot" title="scan_spy.title" xAxisTitleProperty="plot_x_label" yAxisTitleProperty="plot_y_label" titleProperty="plot_title" height="20"/>
</dynamic_composite>
</switchable_composite>
</switchable_composite>
<newLine/>
......
......@@ -13,6 +13,8 @@
</settings>
<spy spyType="scan_spy" view="scan_spySpyView.xml">
<plugin class="ScanSpyControllerSpyPlugin"/>
<swt_plugin_peer class="SWTScanSpyControllerSpyPluginPeer"/>
</spy>
</controller_plugin_config>
......@@ -12,6 +12,7 @@
<property_switcher role="parameterizable_scan_1d1" property="roc_mode" switcher_key="rocModeSwitcher"/>
<property_switcher role="parameterizable_scan_1d1" property="optimization" switcher_key="parameterizable_scan_1dOptimisationSwitcher"/>
<property_switcher role="parameterizable_scan_1d1" property="optimization_type" switcher_key="scan_1dOptimisationTypeSwitcher"/>
<property_switcher role="scan_spy1" property="ploty_version" switcher_key="ploty_versionSwitcher" />
<text role="parameterizable_scan_1d1" property="subtitle" prefix="parameterizable_scan_1d.subtitlePrefix"/>
<newLine/>
......@@ -52,9 +53,15 @@
<switchable_composite switch_values="true" switcher_key="parameterizable_scan_1dOptimisationSwitcher">
<combo role="parameterizable_scan_1d1" property="detector_type" prefix="parameterizable_scan_1d.detector_typePrefix" valuesAndLabels="parameterizable_scan_1d.monitor,parameterizable_scan_1d.detector"/>
<dynamic_composite role="scan_spy1" properties="plot_title,optimization_plot_x,optimization_plot_y,optimization1d_x_result,optimization1d_result_found,plot_y_label,plot_x_label,optimization_fit_plot,optimization_fit_plot_y" isVertical="false">
<dynamic_plot_launcher role="scan_spy1" data="scanSpyPlot" title="scan_spy.title" xAxisTitleProperty="plot_x_label" yAxisTitleProperty="plot_y_label" titleProperty="plot_title" height="20"/>
</dynamic_composite>
<switchable_composite switch_values="1" switcher_key="ploty_versionSwitcher">
<composite key="scanspyPlotLauncher">
</composite>
</switchable_composite>
<switchable_composite switch_values="2" switcher_key="ploty_versionSwitcher">
<dynamic_composite role="scan_spy1" properties="plot_title,optimization_plot_x,optimization_plot_y,optimization1d_x_result,optimization1d_result_found,plot_y_label,plot_x_label,optimization_fit_plot,optimization_fit_plot_y" isVertical="false">
<dynamic_plot_launcher role="scan_spy1" data="scanSpyPlot" title="scan_spy.title" xAxisTitleProperty="plot_x_label" yAxisTitleProperty="plot_y_label" titleProperty="plot_title" height="20"/>
</dynamic_composite>
</switchable_composite>
</switchable_composite>
<newLine/>
......
......@@ -7,6 +7,7 @@
<property_switcher role="scan_1d1" property="count_mode" switcher_key="scan_1dModeSwitcher"/>
<property_switcher role="scan_1d1" property="roc_mode" switcher_key="rocModeSwitcher"/>
<property_switcher role="scan_1d1" property="optimization" switcher_key="scan_1dOptimisationSwitcher"/>
<property_switcher role="scan_spy1" property="ploty_version" switcher_key="ploty_versionSwitcher" />
<text role="scan_1d1" property="subtitle" prefix="scan_1d.subtitlePrefix"/>
......@@ -44,9 +45,15 @@
</switchable_composite>
<check role="scan_1d1" property="savedata" prefix="scan_1d.saveDataPrefix" checkBoxValues="scan_1d.savedata"/>
<switchable_composite switch_values="true" switcher_key="scan_1dOptimisationSwitcher">
<dynamic_composite role="scan_spy1" properties="plot_title,optimization_plot_x,optimization_plot_y,optimization1d_x_result,optimization1d_result_found,plot_y_label,plot_x_label,optimization_fit_plot,optimization_fit_plot_y">
<dynamic_plot_launcher role="scan_spy1" data="scanSpyPlot" title="scan_spy.title" xAxisTitleProperty="plot_x_label" yAxisTitleProperty="plot_y_label" titleProperty="plot_title" height="20"/>
</dynamic_composite>
<switchable_composite switch_values="1" switcher_key="ploty_versionSwitcher">
<composite key="scanspyPlotLauncher">
</composite>
</switchable_composite>
<switchable_composite switch_values="2" switcher_key="ploty_versionSwitcher">
<dynamic_composite role="scan_spy1" properties="plot_title,optimization_plot_x,optimization_plot_y,optimization1d_x_result,optimization1d_result_found,plot_y_label,plot_x_label,optimization_fit_plot,optimization_fit_plot_y" isVertical="false">
<dynamic_plot_launcher role="scan_spy1" data="scanSpyPlot" title="scan_spy.title" xAxisTitleProperty="plot_x_label" yAxisTitleProperty="plot_y_label" titleProperty="plot_title" height="20"/>
</dynamic_composite>
</switchable_composite>
</switchable_composite>
<newLine/>
......
......@@ -7,6 +7,7 @@
<property_switcher role="scan_1d1" property="type" switcher_key="typeSwitcher"/>
<property_switcher role="scan_1d1" property="optimization" switcher_key="scan_1dOptimisationSwitcher"/>
<property_switcher role="scan_1d1" property="optimization_type" switcher_key="optiSwitcher"/>
<property_switcher role="scan_spy1" property="ploty_version" switcher_key="ploty_versionSwitcher" />
<text role="scan_1d1" property="subtitle" prefix="scan_1d.subtitlePrefix"/>
<newLine/>
......@@ -89,9 +90,15 @@
<newLine/>
<check role="scan_1d1" property="savedata" prefix="scan_1d.saveDataPrefix" checkBoxValues="scan_1d.savedata"/>
<switchable_composite switch_values="true" switcher_key="scan_1dOptimisationSwitcher">
<dynamic_composite role="scan_spy1" properties="plot_title,optimization_plot_x,optimization_plot_y,optimization1d_x_result,optimization1d_result_found,plot_y_label,plot_x_label,optimization_fit_plot,optimization_fit_plot_y">
<dynamic_plot_launcher role="scan_spy1" data="scanSpyPlot" title="scan_spy.title" xAxisTitleProperty="plot_x_label" yAxisTitleProperty="plot_y_label" titleProperty="plot_title" height="20"/>
</dynamic_composite>
<switchable_composite switch_values="1" switcher_key="ploty_versionSwitcher">
<composite key="scanspyPlotLauncher">
</composite>
</switchable_composite>
<switchable_composite switch_values="2" switcher_key="ploty_versionSwitcher">
<dynamic_composite role="scan_spy1" properties="plot_title,optimization_plot_x,optimization_plot_y,optimization1d_x_result,optimization1d_result_found,plot_y_label,plot_x_label,optimization_fit_plot,optimization_fit_plot_y" isVertical="false">
<dynamic_plot_launcher role="scan_spy1" data="scanSpyPlot" title="scan_spy.title" xAxisTitleProperty="plot_x_label" yAxisTitleProperty="plot_y_label" titleProperty="plot_title" height="20"/>
</dynamic_composite>
</switchable_composite>
</switchable_composite>
<newLine/>
......
<controller_plugin_config type="scan_spy">
<spy spyType="scan_spy" view="scan_spySpyView.xml">
<!-- <plugin class="ScanSpyControllerSpyPlugin"/>
<plugin class="ScanSpyControllerSpyPlugin"/>
<swt_plugin_peer class="SWTScanSpyControllerSpyPluginPeer"/>
--> </spy>
</spy>
</controller_plugin_config>
\ No newline at end of file
......@@ -12,12 +12,9 @@
<property name="ended_numor" type="int32" max_length="6"/>
<property name="scan_controller_name" type="String"/>
<property name="count_repeater_nb_counts" type="int32"/>
<property name="ploty_version" type="int32"/>
<property name="plot_x_label_main" type="String"/>
<property name="optimization1d_x_result.0" type="float64" >
<decimal_format nb_decimal_places="4"/>
</property>
<property name="optimization1d_result_found.0" type="Boolean"/>
<dynamic_property name="nb_optimization_plot_y" type="int32"/>
<dynamic_property name="plot_x_label" size_property="nb_optimization_plot_y" type="String"/>
<dynamic_property name="plot_y_label" size_property="nb_optimization_plot_y" type="String"/>
......@@ -32,4 +29,5 @@
</dynamic_property>
<dynamic_property name="optimization_plot_y" size_property="nb_optimization_plot_y" type="float64array"/>
</controller>
......@@ -10,6 +10,7 @@
<property_switcher role="scan_spy1" property="optimization1d_result_found.0" switcher_key="optimisationFoundSwitcher" />
<property_switcher role="scan_spy1" property="count_repeater_active" switcher_key="countRepeaterActiveSwitcher" />
<property_switcher role="scan_spy1" property="n_properties" switcher_key="nPropertiesSwitcher" />
<property_switcher role="scan_spy1" property="ploty_version" switcher_key="ploty_versionSwitcher" />
<switchable_composite switch_values="false" switcher_key="scan_spyOptimisationSwitcher">
<composite halignment="left">
......@@ -30,13 +31,21 @@
</switchable_composite>
<switchable_composite switch_values="true" switcher_key="scan_spyOptimisationSwitcher">
<form_composite>
<positionnable_composite width="85" height="85" x="130">
<dynamic_composite role="scan_spy1" properties="plot_title,optimization_plot_x,optimization_plot_y,optimization1d_x_result,optimization1d_result_found,plot_y_label,plot_x_label,optimization_fit_plot,optimization_fit_plot_y">
<dynamic_plot role="scan_spy1" data="scanSpyPlot" title="scan_spy.title" xAxisTitleProperty="plot_x_label" yAxisTitleProperty="plot_y_label" titleProperty="plot_title" height="85" width="85"/>
</dynamic_composite>
</positionnable_composite>
</form_composite>
<switchable_composite switch_values="1" switcher_key="ploty_versionSwitcher">
<form_composite>
<positionnable_composite width="85" height="85" x="130" key="scanspyImagePlotLauncher">
</positionnable_composite>
</form_composite>
</switchable_composite>
<switchable_composite switch_values="2" switcher_key="ploty_versionSwitcher">
<form_composite>
<positionnable_composite width="85" height="85" x="130">
<dynamic_composite role="scan_spy1" properties="plot_title,optimization_plot_x,optimization_plot_y,optimization1d_x_result,optimization1d_result_found,plot_y_label,plot_x_label,optimization_fit_plot,optimization_fit_plot_y">
<dynamic_plot role="scan_spy1" data="scanSpyPlot" title="scan_spy.title" xAxisTitleProperty="plot_x_label" yAxisTitleProperty="plot_y_label" titleProperty="plot_title" height="85" width="85"/>
</dynamic_composite>
</positionnable_composite>
</form_composite>
</switchable_composite>
<newLine />
<composite halignment="left">
<label role="scan_spy1" property="global_actual_step" prefix="scan_spy.stepPrefix" font_size="10" />
......
......@@ -7,6 +7,7 @@
<property_switcher role="scan_axis1" property="count_mode" switcher_key="scan_axisModeSwitcher"/>
<property_switcher role="scan_axis1" property="roc_mode" switcher_key="rocModeSwitcher"/>
<property_switcher role="scan_axis1" property="optimization" switcher_key="OptimisationSwitcher"/>
<property_switcher role="scan_spy1" property="ploty_version" switcher_key="ploty_versionSwitcher" />
<text role="scan_axis1" property="subtitle" prefix="scan_axis.subtitlePrefix"/>
......@@ -43,9 +44,15 @@
</switchable_composite>
<check role="scan_axis1" property="savedata" prefix="scan_axis.saveDataPrefix" checkBoxValues="scan_axis.savedata"/>
<switchable_composite switch_values="true" switcher_key="OptimisationSwitcher">
<dynamic_composite role="scan_spy1" properties="plot_title,optimization_plot_x,optimization_plot_y,optimization1d_x_result,optimization1d_result_found,plot_y_label,plot_x_label,optimization_fit_plot,optimization_fit_plot_y">
<dynamic_plot_launcher role="scan_spy1" data="scanSpyPlot" title="scan_spy.title" xAxisTitleProperty="plot_x_label" yAxisTitleProperty="plot_y_label" titleProperty="plot_title" height="20"/>
</dynamic_composite>
<switchable_composite switch_values="1" switcher_key="ploty_versionSwitcher">
<composite key="scanspyPlotLauncher">
</composite>
</switchable_composite>
<switchable_composite switch_values="2" switcher_key="ploty_versionSwitcher">
<dynamic_composite role="scan_spy1" properties="plot_title,optimization_plot_x,optimization_plot_y,optimization1d_x_result,optimization1d_result_found,plot_y_label,plot_x_label,optimization_fit_plot,optimization_fit_plot_y" isVertical="false">
<dynamic_plot_launcher role="scan_spy1" data="scanSpyPlot" title="scan_spy.title" xAxisTitleProperty="plot_x_label" yAxisTitleProperty="plot_y_label" titleProperty="plot_title" height="20"/>
</dynamic_composite>
</switchable_composite>
</switchable_composite>
<newLine/>
<table_composite nbColumns="8">
......
......@@ -7,6 +7,7 @@
<property_switcher role="scan_axis1" property="roc_mode" switcher_key="rocModeSwitcher"/>
<property_switcher role="scan_axis1" property="optimization" switcher_key="scan_axisOptimisationSwitcher"/>
<property_switcher role="scan_axis1" property="incremental_data" switcher_key="incremental_dataSwitcher"/>
<property_switcher role="scan_spy1" property="ploty_version" switcher_key="ploty_versionSwitcher" />
<text role="scan_axis1" property="subtitle" prefix="scan_axis.subtitlePrefix"/>
<newLine/>
......@@ -90,9 +91,15 @@
<check role="scan_axis1" property="savedata" prefix="scan_axis.saveDataPrefix" checkBoxValues="scan_axis.savedata"/>
<switchable_composite switch_values="true" switcher_key="scan_axisOptimisationSwitcher">
<dynamic_composite role="scan_spy1" properties="plot_title,optimization_plot_x,optimization_plot_y,optimization1d_x_result,optimization1d_result_found,plot_y_label,plot_x_label,optimization_fit_plot,optimization_fit_plot_y">
<dynamic_plot_launcher role="scan_spy1" data="scanSpyPlot" title="scan_spy.title" xAxisTitleProperty="plot_x_label" yAxisTitleProperty="plot_y_label" titleProperty="plot_title" height="20"/>
</dynamic_composite>
<switchable_composite switch_values="1" switcher_key="ploty_versionSwitcher">
<composite key="scanspyPlotLauncher">
</composite>
</switchable_composite>
<switchable_composite switch_values="2" switcher_key="ploty_versionSwitcher">
<dynamic_composite role="scan_spy1" properties="plot_title,optimization_plot_x,optimization_plot_y,optimization1d_x_result,optimization1d_result_found,plot_y_label,plot_x_label,optimization_fit_plot,optimization_fit_plot_y" isVertical="false">
<dynamic_plot_launcher role="scan_spy1" data="scanSpyPlot" title="scan_spy.title" xAxisTitleProperty="plot_x_label" yAxisTitleProperty="plot_y_label" titleProperty="plot_title" height="20"/>
</dynamic_composite>
</switchable_composite>
</switchable_composite>
<newLine/>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment