mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-07 18:40:42 +02:00
WIP
This commit is contained in:
parent
ca5a0b4cc8
commit
f0872174cf
@ -34,10 +34,10 @@
|
|||||||
<widget class="QGroupBox" name="boxProgress">
|
<widget class="QGroupBox" name="boxProgress">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>30</x>
|
<x>21</x>
|
||||||
<y>153</y>
|
<y>130</y>
|
||||||
<width>319</width>
|
<width>319</width>
|
||||||
<height>116</height>
|
<height>103</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@ -55,9 +55,9 @@
|
|||||||
<widget class="QProgressBar" name="progressBar">
|
<widget class="QProgressBar" name="progressBar">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>10</x>
|
<x>-2</x>
|
||||||
<y>75</y>
|
<y>67</y>
|
||||||
<width>300</width>
|
<width>319</width>
|
||||||
<height>23</height>
|
<height>23</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -68,9 +68,9 @@
|
|||||||
<widget class="QLabel" name="label">
|
<widget class="QLabel" name="label">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>10</x>
|
<x>1</x>
|
||||||
<y>25</y>
|
<y>25</y>
|
||||||
<width>91</width>
|
<width>96</width>
|
||||||
<height>16</height>
|
<height>16</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -78,10 +78,10 @@
|
|||||||
<string>Current Frame: </string>
|
<string>Current Frame: </string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QLabel" name="lblProgressIndex">
|
<widget class="QLabel" name="lblCurrentFrame">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>101</x>
|
<x>99</x>
|
||||||
<y>25</y>
|
<y>25</y>
|
||||||
<width>101</width>
|
<width>101</width>
|
||||||
<height>16</height>
|
<height>16</height>
|
||||||
@ -94,7 +94,7 @@
|
|||||||
<widget class="QLabel" name="lblCurrentMeasurement">
|
<widget class="QLabel" name="lblCurrentMeasurement">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>150</x>
|
<x>145</x>
|
||||||
<y>45</y>
|
<y>45</y>
|
||||||
<width>76</width>
|
<width>76</width>
|
||||||
<height>16</height>
|
<height>16</height>
|
||||||
@ -122,9 +122,9 @@
|
|||||||
<widget class="QLabel" name="label_2">
|
<widget class="QLabel" name="label_2">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>10</x>
|
<x>1</x>
|
||||||
<y>45</y>
|
<y>45</y>
|
||||||
<width>136</width>
|
<width>146</width>
|
||||||
<height>16</height>
|
<height>16</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -136,10 +136,10 @@
|
|||||||
<widget class="QFrame" name="frameTimeResolved">
|
<widget class="QFrame" name="frameTimeResolved">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>390</x>
|
<x>368</x>
|
||||||
<y>8</y>
|
<y>8</y>
|
||||||
<width>362</width>
|
<width>403</width>
|
||||||
<height>281</height>
|
<height>332</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="frameShape">
|
<property name="frameShape">
|
||||||
@ -151,14 +151,14 @@
|
|||||||
<widget class="QWidget" name="gridLayoutWidget">
|
<widget class="QWidget" name="gridLayoutWidget">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>3</x>
|
||||||
<y>10</y>
|
<y>10</y>
|
||||||
<width>357</width>
|
<width>390</width>
|
||||||
<height>264</height>
|
<height>314</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridTimeResolved">
|
<layout class="QGridLayout" name="gridTimeResolved">
|
||||||
<item row="1" column="1">
|
<item row="3" column="1">
|
||||||
<spacer name="horizontalSpacer">
|
<spacer name="horizontalSpacer">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
@ -174,7 +174,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="3">
|
<item row="5" column="3">
|
||||||
<widget class="QComboBox" name="comboPeriodUnit">
|
<widget class="QComboBox" name="comboPeriodUnit">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
@ -230,7 +230,7 @@ Frame period between exposures.
|
|||||||
</item>
|
</item>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="2" colspan="2">
|
<item row="1" column="2" colspan="2">
|
||||||
<widget class="QComboBox" name="comboTimingMode">
|
<widget class="QComboBox" name="comboTimingMode">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
@ -242,11 +242,6 @@ Frame period between exposures.
|
|||||||
<string>Timing Mode of the detector.
|
<string>Timing Mode of the detector.
|
||||||
#timing#</string>
|
#timing#</string>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>None</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Auto</string>
|
<string>Auto</string>
|
||||||
@ -259,7 +254,7 @@ Frame period between exposures.
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string> Gated with fixed number</string>
|
<string>Gated with fixed number</string>
|
||||||
</property>
|
</property>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
@ -269,7 +264,7 @@ Frame period between exposures.
|
|||||||
</item>
|
</item>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="0">
|
<item row="6" column="0">
|
||||||
<widget class="QLabel" name="lblNumTriggers">
|
<widget class="QLabel" name="lblNumTriggers">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
@ -283,7 +278,7 @@ Frame period between exposures.
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="2" colspan="2">
|
<item row="6" column="2" colspan="2">
|
||||||
<widget class="QSpinBox" name="spinNumTriggers">
|
<widget class="QSpinBox" name="spinNumTriggers">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
@ -324,7 +319,7 @@ Frame period between exposures.
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="5" column="0">
|
<item row="7" column="0">
|
||||||
<widget class="QLabel" name="lblDelay">
|
<widget class="QLabel" name="lblDelay">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
@ -338,7 +333,7 @@ Frame period between exposures.
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="5" column="2">
|
<item row="7" column="2">
|
||||||
<widget class="QDoubleSpinBox" name="spinDelay">
|
<widget class="QDoubleSpinBox" name="spinDelay">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
@ -373,7 +368,7 @@ Frame period between exposures.
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="5" column="3">
|
<item row="7" column="3">
|
||||||
<widget class="QComboBox" name="comboDelayUnit">
|
<widget class="QComboBox" name="comboDelayUnit">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
@ -426,7 +421,7 @@ Frame period between exposures.
|
|||||||
</item>
|
</item>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="3" column="0">
|
||||||
<widget class="QLabel" name="lblNumFrames">
|
<widget class="QLabel" name="lblNumFrames">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
@ -436,7 +431,7 @@ Frame period between exposures.
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="2" colspan="2">
|
<item row="3" column="2" colspan="2">
|
||||||
<widget class="QSpinBox" name="spinNumFrames">
|
<widget class="QSpinBox" name="spinNumFrames">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
@ -477,7 +472,7 @@ Frame period between exposures.
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0">
|
<item row="4" column="0">
|
||||||
<widget class="QLabel" name="lblExpTime">
|
<widget class="QLabel" name="lblExpTime">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
@ -494,7 +489,7 @@ Exposure Time of a frame.
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="2">
|
<item row="4" column="2">
|
||||||
<widget class="QDoubleSpinBox" name="spinExpTime">
|
<widget class="QDoubleSpinBox" name="spinExpTime">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
@ -532,7 +527,7 @@ Exposure Time of a frame.
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="3">
|
<item row="4" column="3">
|
||||||
<widget class="QComboBox" name="comboExpUnit">
|
<widget class="QComboBox" name="comboExpUnit">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
@ -588,7 +583,7 @@ Exposure Time of a frame.
|
|||||||
</item>
|
</item>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0">
|
<item row="5" column="0">
|
||||||
<widget class="QLabel" name="lblPeriod">
|
<widget class="QLabel" name="lblPeriod">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
@ -605,7 +600,7 @@ Frame period between exposures.
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="2">
|
<item row="5" column="2">
|
||||||
<widget class="QDoubleSpinBox" name="spinPeriod">
|
<widget class="QDoubleSpinBox" name="spinPeriod">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
@ -643,14 +638,14 @@ Frame period between exposures.
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QLabel" name="lblTimingMode">
|
<widget class="QLabel" name="lblTimingMode">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Timing Mode:</string>
|
<string>Timing Mode:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="6" column="0">
|
<item row="8" column="0">
|
||||||
<widget class="QLabel" name="lblNumSamples">
|
<widget class="QLabel" name="lblNumSamples">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
@ -664,7 +659,7 @@ Frame period between exposures.
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="6" column="2" colspan="2">
|
<item row="8" column="2" colspan="2">
|
||||||
<widget class="QSpinBox" name="spinNumSamples">
|
<widget class="QSpinBox" name="spinNumSamples">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
@ -705,47 +700,14 @@ Frame period between exposures.
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
<item row="2" column="0">
|
||||||
</widget>
|
|
||||||
<zorder>gridLayoutWidget</zorder>
|
|
||||||
<zorder>spinNumSamples</zorder>
|
|
||||||
</widget>
|
|
||||||
<widget class="QFrame" name="frameNotTimeResolved">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>20</x>
|
|
||||||
<y>5</y>
|
|
||||||
<width>336</width>
|
|
||||||
<height>159</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="frameShape">
|
|
||||||
<enum>QFrame::NoFrame</enum>
|
|
||||||
</property>
|
|
||||||
<property name="frameShadow">
|
|
||||||
<enum>QFrame::Plain</enum>
|
|
||||||
</property>
|
|
||||||
<widget class="QWidget" name="gridLayoutWidget_3">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>10</x>
|
|
||||||
<y>13</y>
|
|
||||||
<width>321</width>
|
|
||||||
<height>130</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
|
||||||
<property name="verticalSpacing">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="label_5">
|
<widget class="QLabel" name="label_5">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Number of Measurements:</string>
|
<string>Number of Measurements:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1" colspan="2">
|
<item row="2" column="2" colspan="2">
|
||||||
<widget class="QSpinBox" name="spinNumMeasurements">
|
<widget class="QSpinBox" name="spinNumMeasurements">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
@ -773,7 +735,7 @@ Frame period between exposures.
|
|||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimum">
|
<property name="minimum">
|
||||||
<number>1</number>
|
<number>-1</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximum">
|
<property name="maximum">
|
||||||
<number>2000000000</number>
|
<number>2000000000</number>
|
||||||
@ -783,6 +745,37 @@ Frame period between exposures.
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
<widget class="QFrame" name="frameNotTimeResolved">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>10</x>
|
||||||
|
<y>5</y>
|
||||||
|
<width>336</width>
|
||||||
|
<height>96</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::NoFrame</enum>
|
||||||
|
</property>
|
||||||
|
<property name="frameShadow">
|
||||||
|
<enum>QFrame::Plain</enum>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="gridLayoutWidget_3">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>10</x>
|
||||||
|
<y>13</y>
|
||||||
|
<width>321</width>
|
||||||
|
<height>76</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
|
<property name="verticalSpacing">
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
<item row="1" column="1" colspan="2">
|
<item row="1" column="1" colspan="2">
|
||||||
<widget class="QLineEdit" name="dispFileName">
|
<widget class="QLineEdit" name="dispFileName">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@ -865,8 +858,8 @@ Frame period between exposures.
|
|||||||
<widget class="QWidget" name="horizontalLayoutWidget">
|
<widget class="QWidget" name="horizontalLayoutWidget">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>30</x>
|
<x>20</x>
|
||||||
<y>298</y>
|
<y>270</y>
|
||||||
<width>318</width>
|
<width>318</width>
|
||||||
<height>34</height>
|
<height>34</height>
|
||||||
</rect>
|
</rect>
|
||||||
@ -933,7 +926,7 @@ Frame period between exposures.
|
|||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>70</width>
|
<width>90</width>
|
||||||
<height>16777215</height>
|
<height>16777215</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
@ -962,7 +955,6 @@ Frame period between exposures.
|
|||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>spinNumMeasurements</tabstop>
|
|
||||||
<tabstop>chkFile</tabstop>
|
<tabstop>chkFile</tabstop>
|
||||||
<tabstop>dispFileName</tabstop>
|
<tabstop>dispFileName</tabstop>
|
||||||
<tabstop>spinIndex</tabstop>
|
<tabstop>spinIndex</tabstop>
|
||||||
|
@ -65,7 +65,7 @@ public:
|
|||||||
int GetFrameIndex(){return currentFrameIndex;};
|
int GetFrameIndex(){return currentFrameIndex;};
|
||||||
/** sets file write enable , if not enabled,
|
/** sets file write enable , if not enabled,
|
||||||
* file index wont increase and so you need secondary titles to differentitate between plots*/
|
* file index wont increase and so you need secondary titles to differentitate between plots*/
|
||||||
void SetEnableFileWrite(bool enable){fileSaveEnable = enable;};
|
void SetFileWriteEnable(bool enable){fileSaveEnable = enable;};
|
||||||
|
|
||||||
/** sets plot Title prefix*/
|
/** sets plot Title prefix*/
|
||||||
void SetPlotTitlePrefix(QString title) {plotTitle_prefix = title;}
|
void SetPlotTitlePrefix(QString title) {plotTitle_prefix = title;}
|
||||||
|
@ -1,288 +1,75 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "qDefs.h"
|
|
||||||
#include "sls_detector_defs.h"
|
|
||||||
|
|
||||||
#include "ui_form_tab_advanced.h"
|
#include "ui_form_tab_advanced.h"
|
||||||
|
|
||||||
class multiSlsDetector;
|
class multiSlsDetector;
|
||||||
|
|
||||||
#include <QStackedLayout>
|
|
||||||
#include <QSpacerItem>
|
|
||||||
/**
|
|
||||||
*@short sets up the advanced parameters
|
|
||||||
*/
|
|
||||||
class qTabAdvanced:public QWidget, private Ui::TabAdvancedObject{
|
class qTabAdvanced:public QWidget, private Ui::TabAdvancedObject{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/**
|
|
||||||
* The constructor
|
|
||||||
* @param parent is the parent tab widget
|
|
||||||
* @param detector is the detector returned from the detector tab
|
|
||||||
*/
|
|
||||||
qTabAdvanced(QWidget *parent, multiSlsDetector* detector);
|
qTabAdvanced(QWidget *parent, multiSlsDetector* detector);
|
||||||
|
|
||||||
/**
|
|
||||||
* Destructor
|
|
||||||
*/
|
|
||||||
~qTabAdvanced();
|
~qTabAdvanced();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
/**
|
|
||||||
* To refresh and update widgets
|
|
||||||
*/
|
|
||||||
void Refresh();
|
void Refresh();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
|
||||||
/**
|
|
||||||
* Select Readout
|
|
||||||
* @param index position index of readout
|
|
||||||
*/
|
|
||||||
void SetDetector(int index);
|
void SetDetector(int index);
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets control port
|
|
||||||
* @param port control port
|
|
||||||
*/
|
|
||||||
void SetControlPort(int port);
|
void SetControlPort(int port);
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets stop port
|
|
||||||
* @param port stop port
|
|
||||||
*/
|
|
||||||
void SetStopPort(int port);
|
void SetStopPort(int port);
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets detector udp ip
|
|
||||||
*/
|
|
||||||
void SetDetectorUDPIP();
|
void SetDetectorUDPIP();
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets detector udp mac
|
|
||||||
*/
|
|
||||||
void SetDetectorUDPMAC();
|
void SetDetectorUDPMAC();
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets client zmq port
|
|
||||||
* @param port client zmq port
|
|
||||||
*/
|
|
||||||
void SetCltZMQPort(int port);
|
void SetCltZMQPort(int port);
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets client zmq ip to listen to
|
|
||||||
*/
|
|
||||||
void SetCltZMQIP();
|
void SetCltZMQIP();
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the receiver hostname
|
|
||||||
*/
|
|
||||||
void SetRxrHostname();
|
void SetRxrHostname();
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets receiver tcp port
|
|
||||||
* @param port receiver tcp port
|
|
||||||
*/
|
|
||||||
void SetRxrTCPPort(int port);
|
void SetRxrTCPPort(int port);
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets receiver udp port
|
|
||||||
* @param port receiver udp port
|
|
||||||
*/
|
|
||||||
void SetRxrUDPPort(int port);
|
void SetRxrUDPPort(int port);
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets receiver ip
|
|
||||||
*/
|
|
||||||
void SetRxrUDPIP();
|
void SetRxrUDPIP();
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets reciever mac
|
|
||||||
*/
|
|
||||||
void SetRxrUDPMAC();
|
void SetRxrUDPMAC();
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets receiver zmq port
|
|
||||||
* @param port receiver zmq port
|
|
||||||
*/
|
|
||||||
void SetRxrZMQPort(int port);
|
void SetRxrZMQPort(int port);
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets receiver zmq ip to stream from
|
|
||||||
*/
|
|
||||||
void SetRxrZMQIP();
|
void SetRxrZMQIP();
|
||||||
|
|
||||||
/**
|
|
||||||
* Add ROI
|
|
||||||
*/
|
|
||||||
void AddROISlot();
|
void AddROISlot();
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets ROIs from detector and updates it
|
|
||||||
*/
|
|
||||||
void GetROI();
|
void GetROI();
|
||||||
|
|
||||||
/**
|
|
||||||
* Clears ROI in detector
|
|
||||||
*/
|
|
||||||
void ClearROI();
|
void ClearROI();
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets ROI in detector
|
|
||||||
*/
|
|
||||||
void SetROI();
|
void SetROI();
|
||||||
|
|
||||||
/**
|
|
||||||
* Set all trimbits to a value
|
|
||||||
*/
|
|
||||||
void SetAllTrimbits();
|
void SetAllTrimbits();
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set number of additional storage cells
|
|
||||||
* @param value value to set to
|
|
||||||
*/
|
|
||||||
void SetNumStoragecells(int value);
|
void SetNumStoragecells(int value);
|
||||||
|
|
||||||
/**
|
|
||||||
* Set sub frame exposure time
|
|
||||||
*/
|
|
||||||
void SetSubExposureTime();
|
void SetSubExposureTime();
|
||||||
|
|
||||||
/**
|
|
||||||
* Set sub frame dead time
|
|
||||||
*/
|
|
||||||
void SetSubDeadTime();
|
void SetSubDeadTime();
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets up the widget
|
|
||||||
*/
|
|
||||||
void SetupWidgetWindow();
|
void SetupWidgetWindow();
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets up all the slots and signals
|
|
||||||
*/
|
|
||||||
void Initialization();
|
void Initialization();
|
||||||
|
|
||||||
/**
|
|
||||||
* Populate detectors
|
|
||||||
*/
|
|
||||||
void PopulateDetectors();
|
void PopulateDetectors();
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets detector online
|
|
||||||
*/
|
|
||||||
void GetOnline();
|
void GetOnline();
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets control port
|
|
||||||
*/
|
|
||||||
void GetControlPort();
|
void GetControlPort();
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets stop port
|
|
||||||
*/
|
|
||||||
void GetStopPort();
|
void GetStopPort();
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets detector udp ip
|
|
||||||
*/
|
|
||||||
void GetDetectorUDPIP();
|
void GetDetectorUDPIP();
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets detector udp mac
|
|
||||||
*/
|
|
||||||
void GetDetectorUDPMAC();
|
void GetDetectorUDPMAC();
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets client zmq receiver port
|
|
||||||
*/
|
|
||||||
void GetCltZMQPort();
|
void GetCltZMQPort();
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets client zmq ip to listen to
|
|
||||||
*/
|
|
||||||
void GetCltZMQIP();
|
void GetCltZMQIP();
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets receiver hostname
|
|
||||||
*/
|
|
||||||
void GetRxrHostname();
|
void GetRxrHostname();
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets receiver online
|
|
||||||
*/
|
|
||||||
void GetReceiverOnline();
|
void GetReceiverOnline();
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets receiver tcp port
|
|
||||||
*/
|
|
||||||
void GetRxrTCPPort();
|
void GetRxrTCPPort();
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets receiver udp port
|
|
||||||
*/
|
|
||||||
void GetRxrUDPPort();
|
void GetRxrUDPPort();
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets receiver udp ip
|
|
||||||
*/
|
|
||||||
void GetRxrUDPIP();
|
void GetRxrUDPIP();
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets receiver udp mac
|
|
||||||
*/
|
|
||||||
void GetRxrUDPMAC();
|
void GetRxrUDPMAC();
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets receiver zmq transmitting port
|
|
||||||
*/
|
|
||||||
void GetRxrZMQPort();
|
void GetRxrZMQPort();
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets receiver zmq transmitting ip
|
|
||||||
*/
|
|
||||||
void GetRxrZMQIP();
|
void GetRxrZMQIP();
|
||||||
|
|
||||||
/**
|
|
||||||
* Clears all the ROI widgets
|
|
||||||
*/
|
|
||||||
void ClearROIWidgets();
|
void ClearROIWidgets();
|
||||||
|
|
||||||
/**
|
|
||||||
* Get all trimbits
|
|
||||||
*/
|
|
||||||
void GetAllTrimbits();
|
void GetAllTrimbits();
|
||||||
|
|
||||||
/**
|
|
||||||
* Get number of additional storage cells
|
|
||||||
*/
|
|
||||||
void GetNumStoragecells();
|
void GetNumStoragecells();
|
||||||
|
|
||||||
/**
|
|
||||||
* Get sub frame exposure time
|
|
||||||
*/
|
|
||||||
void GetSubExposureTime();
|
void GetSubExposureTime();
|
||||||
|
|
||||||
/**
|
|
||||||
* Get sub frame dead time
|
|
||||||
*/
|
|
||||||
void GetSubDeadTime();
|
void GetSubDeadTime();
|
||||||
|
|
||||||
|
|
||||||
/** The multi detector object */
|
|
||||||
multiSlsDetector *myDet;
|
multiSlsDetector *myDet;
|
||||||
|
|
||||||
/** Tool Tip */
|
/** Tool Tip */
|
||||||
QString errOnlineTip;
|
QString errOnlineTip;
|
||||||
QString detOnlineTip;
|
QString detOnlineTip;
|
||||||
QString rxrOnlineTip;
|
QString rxrOnlineTip;
|
||||||
QPalette red;
|
QPalette red;
|
||||||
|
|
||||||
/** ROI */
|
/** ROI */
|
||||||
std::vector <QLabel*> lblFromX;
|
std::vector <QLabel*> lblFromX;
|
||||||
std::vector <QSpinBox*> spinFromX;
|
std::vector <QSpinBox*> spinFromX;
|
||||||
|
@ -1,167 +1,60 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "qDefs.h"
|
|
||||||
|
|
||||||
#include "ui_form_tab_dataoutput.h"
|
#include "ui_form_tab_dataoutput.h"
|
||||||
|
|
||||||
class multiSlsDetector;
|
class multiSlsDetector;
|
||||||
|
|
||||||
#include <QString>
|
|
||||||
#include <QButtonGroup>
|
|
||||||
|
|
||||||
/**
|
|
||||||
*@short sets up the DataOutput parameters
|
|
||||||
*/
|
|
||||||
class qTabDataOutput:public QWidget, private Ui::TabDataOutputObject{
|
class qTabDataOutput:public QWidget, private Ui::TabDataOutputObject{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/**
|
|
||||||
* The constructor
|
|
||||||
* @param parent is the parent tab widget
|
|
||||||
* @param detector is the detector returned from the detector tab
|
|
||||||
*/
|
|
||||||
qTabDataOutput(QWidget *parent,multiSlsDetector* detector);
|
qTabDataOutput(QWidget *parent,multiSlsDetector* detector);
|
||||||
|
|
||||||
/**
|
|
||||||
* Destructor
|
|
||||||
*/
|
|
||||||
~qTabDataOutput();
|
~qTabDataOutput();
|
||||||
|
|
||||||
/**
|
|
||||||
* To refresh and update widgets
|
|
||||||
*/
|
|
||||||
void Refresh();
|
void Refresh();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
|
||||||
/**
|
|
||||||
* Get output directory
|
|
||||||
*/
|
|
||||||
void GetOutputDir();
|
void GetOutputDir();
|
||||||
|
|
||||||
/**
|
|
||||||
* Open dialog to choose the output directory
|
|
||||||
*/
|
|
||||||
void BrowseOutputDir();
|
void BrowseOutputDir();
|
||||||
|
|
||||||
/**
|
|
||||||
* Set output directory
|
|
||||||
*/
|
|
||||||
void SetOutputDir();
|
void SetOutputDir();
|
||||||
|
|
||||||
/**
|
|
||||||
* Set file format
|
|
||||||
* @param format file format
|
|
||||||
*/
|
|
||||||
void SetFileFormat(int format);
|
void SetFileFormat(int format);
|
||||||
|
|
||||||
/**
|
|
||||||
* Set overwrite enable
|
|
||||||
* @param enable enable
|
|
||||||
*/
|
|
||||||
void SetOverwriteEnable(bool enable);
|
void SetOverwriteEnable(bool enable);
|
||||||
|
|
||||||
/**
|
|
||||||
* Enable/Disable 10GbE
|
|
||||||
* @param enable enable
|
|
||||||
*/
|
|
||||||
void SetTenGigaEnable(bool enable);
|
void SetTenGigaEnable(bool enable);
|
||||||
|
|
||||||
/**
|
|
||||||
* Enable rate correction
|
|
||||||
*/
|
|
||||||
void EnableRateCorrection();
|
void EnableRateCorrection();
|
||||||
|
|
||||||
/**
|
|
||||||
* Set rate correction
|
|
||||||
*/
|
|
||||||
void SetRateCorrection();
|
void SetRateCorrection();
|
||||||
|
|
||||||
/**
|
|
||||||
* Set speed
|
|
||||||
* @param speed speed chosen
|
|
||||||
*/
|
|
||||||
void SetSpeed(int speed);
|
void SetSpeed(int speed);
|
||||||
|
|
||||||
/**
|
|
||||||
* Set flags
|
|
||||||
*/
|
|
||||||
void SetFlags();
|
void SetFlags();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets up the widget
|
|
||||||
*/
|
|
||||||
void SetupWidgetWindow();
|
void SetupWidgetWindow();
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets up all the slots and signals
|
|
||||||
*/
|
|
||||||
void Initialization();
|
void Initialization();
|
||||||
|
|
||||||
/**
|
|
||||||
* Populate the readouts
|
|
||||||
*/
|
|
||||||
void PopulateDetectors();
|
void PopulateDetectors();
|
||||||
|
|
||||||
/**
|
|
||||||
* Enable browse
|
|
||||||
*/
|
|
||||||
void EnableBrowse();
|
void EnableBrowse();
|
||||||
|
void GetFileEnable();
|
||||||
|
void GetFileName();
|
||||||
|
|
||||||
/**
|
|
||||||
* Get file format
|
|
||||||
*/
|
|
||||||
void GetFileFormat();
|
void GetFileFormat();
|
||||||
|
|
||||||
/**
|
|
||||||
* Get overwrite enable
|
|
||||||
*/
|
|
||||||
void GetFileOverwrite();
|
void GetFileOverwrite();
|
||||||
|
|
||||||
/**
|
|
||||||
* Get Ten Giga Enable
|
|
||||||
*/
|
|
||||||
void GetTenGigaEnable();
|
void GetTenGigaEnable();
|
||||||
|
|
||||||
/**
|
|
||||||
* Set Get rate correction
|
|
||||||
*/
|
|
||||||
void GetRateCorrection();
|
void GetRateCorrection();
|
||||||
|
|
||||||
/**
|
|
||||||
* Get speed
|
|
||||||
*/
|
|
||||||
void GetSpeed();
|
void GetSpeed();
|
||||||
|
|
||||||
/**
|
|
||||||
* Get flags
|
|
||||||
*/
|
|
||||||
void GetFlags();
|
void GetFlags();
|
||||||
|
|
||||||
/** The sls detector object */
|
|
||||||
multiSlsDetector *myDet;
|
multiSlsDetector *myDet;
|
||||||
|
// Button group for radiobuttons for rate
|
||||||
/** Button group for radiobuttons for rate*/
|
|
||||||
QButtonGroup *btnGroupRate;
|
QButtonGroup *btnGroupRate;
|
||||||
|
// enum for the Eiger clock divider
|
||||||
/** enum for the Eiger clock divider */
|
|
||||||
enum {
|
enum {
|
||||||
FULLSPEED,
|
FULLSPEED,
|
||||||
HALFSPEED,
|
HALFSPEED,
|
||||||
QUARTERSPEED,
|
QUARTERSPEED,
|
||||||
NUMBEROFSPEEDS
|
NUMBEROFSPEEDS
|
||||||
};
|
};
|
||||||
|
// enum for the Eiger readout flags1
|
||||||
/** enum for the Eiger readout flags1 */
|
|
||||||
enum {
|
enum {
|
||||||
CONTINUOUS,
|
CONTINUOUS,
|
||||||
STOREINRAM
|
STOREINRAM
|
||||||
};
|
};
|
||||||
|
// enum for the Eiger readout flags2
|
||||||
/** enum for the Eiger readout flags2 */
|
|
||||||
enum {
|
enum {
|
||||||
PARALLEL,
|
PARALLEL,
|
||||||
NONPARALLEL
|
NONPARALLEL
|
||||||
|
@ -1,204 +1,86 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "qDefs.h"
|
|
||||||
|
|
||||||
#include "ui_form_tab_measurement.h"
|
#include "ui_form_tab_measurement.h"
|
||||||
|
|
||||||
|
class qDrawPlot;
|
||||||
|
|
||||||
class multiSlsDetector;
|
class multiSlsDetector;
|
||||||
|
|
||||||
#include <QStandardItemModel>
|
class QStandardItemModel;
|
||||||
#include "qDrawPlot.h"
|
|
||||||
class qDetectorMain;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*@short sets up the measurement parameters
|
|
||||||
*/
|
|
||||||
class qTabMeasurement:public QWidget, private Ui::TabMeasurementObject{
|
class qTabMeasurement:public QWidget, private Ui::TabMeasurementObject{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/**
|
qTabMeasurement(QWidget *parent, multiSlsDetector* detector, qDrawPlot* plot);
|
||||||
* The constructor
|
|
||||||
* This tab allows to change measurement parameters and to start/stop an acquisition
|
|
||||||
* @param parent is the parent tab widget
|
|
||||||
* @param detector is the detector returned from the detector tab
|
|
||||||
* @param plot plot object reference
|
|
||||||
*/
|
|
||||||
qTabMeasurement(QWidget *parent,multiSlsDetector* detector, qDrawPlot* plot);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Destructor
|
|
||||||
*/
|
|
||||||
~qTabMeasurement();
|
~qTabMeasurement();
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the status of the acquisition in gui
|
|
||||||
*/
|
|
||||||
bool GetStartStatus();
|
bool GetStartStatus();
|
||||||
|
void ClentStartAcquisition();
|
||||||
/**
|
|
||||||
* Click the Start/Stop Acquisition button
|
|
||||||
* This is used if this command came from gui client
|
|
||||||
*/
|
|
||||||
void ClickStartStop();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns progress bar value
|
|
||||||
*/
|
|
||||||
int GetProgress();
|
int GetProgress();
|
||||||
|
|
||||||
/**
|
|
||||||
* Refresh and update widgets
|
|
||||||
*/
|
|
||||||
void Refresh();
|
void Refresh();
|
||||||
|
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
|
||||||
/**
|
|
||||||
* Update plot is finished,
|
|
||||||
* changes start/stop text and enables/disables all widgets
|
|
||||||
*/
|
|
||||||
void UpdateFinished();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Updates the current measurement
|
|
||||||
* @param val the value to be updated
|
|
||||||
*/
|
|
||||||
void SetCurrentMeasurement(int val);
|
void SetCurrentMeasurement(int val);
|
||||||
|
void UpdateFinished();
|
||||||
|
void StopAcquisition();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
|
||||||
/**
|
|
||||||
* Set number of measurements
|
|
||||||
* @param num number of measurements to be set
|
|
||||||
*/
|
|
||||||
void setNumMeasurements(int num);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set number of frames
|
|
||||||
* @param val number of frames to be set
|
|
||||||
*/
|
|
||||||
void setNumFrames(int val);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set acquisition time
|
|
||||||
*/
|
|
||||||
void setExposureTime();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set frame period between exposures
|
|
||||||
*/
|
|
||||||
void setAcquisitionPeriod();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set number of triggers
|
|
||||||
* @param val number of triggers to be set
|
|
||||||
*/
|
|
||||||
void setNumTriggers(int val);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set delay
|
|
||||||
*/
|
|
||||||
void setDelay();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set number of samples
|
|
||||||
* @param val number of samples to be set
|
|
||||||
*/
|
|
||||||
void setNumSamples(int val);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set file name
|
|
||||||
*/
|
|
||||||
void setFileName();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Enable write to file
|
|
||||||
*/
|
|
||||||
void EnableFileWrite(bool enable);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set index of file name
|
|
||||||
* @param index index of selection
|
|
||||||
*/
|
|
||||||
void setRunIndex(int index);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Update progress
|
|
||||||
*/
|
|
||||||
void UpdateProgress();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* starts Acquisition
|
|
||||||
*/
|
|
||||||
void startAcquisition();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* stops Acquisition
|
|
||||||
*/
|
|
||||||
void stopAcquisition();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the timing mode
|
|
||||||
* @param mode timing mode
|
|
||||||
*/
|
|
||||||
void SetTimingMode(int mode);
|
void SetTimingMode(int mode);
|
||||||
|
void SetNumMeasurements(int num);
|
||||||
|
void SetNumFrames(int val);
|
||||||
|
void SetNumTriggers(int val);
|
||||||
|
void SetNumSamples(int val);
|
||||||
|
void SetExposureTime();
|
||||||
|
void SetAcquisitionPeriod();
|
||||||
|
void SetDelay();
|
||||||
|
void SetFileWriteEnable(bool enable);
|
||||||
|
void SetFileName();
|
||||||
|
void SetRunIndex(int val);
|
||||||
|
void UpdateProgress();
|
||||||
|
void StartAcquisition();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/**
|
|
||||||
* Sets up the widget
|
|
||||||
*/
|
|
||||||
void SetupWidgetWindow();
|
void SetupWidgetWindow();
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets up the timing mode
|
|
||||||
*/
|
|
||||||
void SetupTimingMode();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets up all the slots and signals
|
|
||||||
*/
|
|
||||||
void Initialization();
|
void Initialization();
|
||||||
|
void SetupTimingMode();
|
||||||
|
void EnableWidgetsforTimingMode();
|
||||||
|
|
||||||
/**
|
void GetTimingMode();
|
||||||
* Get timing mode from detector
|
void GetNumMeasurements();
|
||||||
* @param startup is true when gui has just started up
|
void GetNumFrames();
|
||||||
*/
|
void GetNumTriggers();
|
||||||
void GetTimingModeFromDetector(bool startup = false);
|
void GetNumSamples();
|
||||||
|
void GetExposureTime();
|
||||||
/**
|
void GetAcquisitionPeriod();
|
||||||
* Enables/Disables widgetframes to avoid setting measurement during an acquisition
|
|
||||||
*/
|
|
||||||
void Enable(bool enable);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Checks if acquisition period is greater than exposure time
|
|
||||||
*/
|
|
||||||
void CheckAcqPeriodGreaterThanExp();
|
void CheckAcqPeriodGreaterThanExp();
|
||||||
|
void GetDelay();
|
||||||
|
void GetFileWriteEnable();
|
||||||
|
void GetFileName();
|
||||||
|
void GetRunIndex();
|
||||||
|
|
||||||
/**
|
void ResetProgress();
|
||||||
* Verify if output directory existing error is set
|
|
||||||
* @returns OK or FAIL
|
void Enable(bool enable);
|
||||||
*/
|
|
||||||
int VerifyOutputDirectoryError();
|
int VerifyOutputDirectoryError();
|
||||||
|
|
||||||
/** The sls detector object */
|
|
||||||
multiSlsDetector *myDet;
|
multiSlsDetector *myDet;
|
||||||
/** The Plot widget */
|
|
||||||
qDrawPlot *myPlot;
|
qDrawPlot *myPlot;
|
||||||
/** detector type */
|
// enum for the timing mode
|
||||||
slsDetectorDefs::detectorType detType;
|
enum{
|
||||||
/** enum for the timing mode */
|
AUTO,
|
||||||
enum{AUTO, TRIGGER, GATED, BURST_TRIGGER, NUM_TIMING_MODES};
|
TRIGGER,
|
||||||
/** timer to update the progress*/
|
GATED,
|
||||||
|
BURST_TRIGGER,
|
||||||
|
NUMTIMINGMODES
|
||||||
|
};
|
||||||
QTimer *progressTimer;
|
QTimer *progressTimer;
|
||||||
/** tool tip variables*/
|
//tool tip variables
|
||||||
QString acqPeriodTip;
|
QString acqPeriodTip;
|
||||||
QString errPeriodTip;
|
QString errPeriodTip;
|
||||||
QPalette red;
|
QPalette red;
|
||||||
/** to access items in settings combobox */
|
bool delayImplemented;
|
||||||
QStandardItemModel* model;
|
bool sampleImplemented;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void StartSignal();
|
void StartSignal();
|
||||||
|
@ -1,91 +1,32 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "qDefs.h"
|
|
||||||
|
|
||||||
#include "ui_form_tab_settings.h"
|
#include "ui_form_tab_settings.h"
|
||||||
|
|
||||||
class multiSlsDetector;
|
class multiSlsDetector;
|
||||||
|
|
||||||
/**
|
|
||||||
*@short sets up the Settings parameters
|
|
||||||
*/
|
|
||||||
class qTabSettings: public QWidget, private Ui::TabSettingsObject{
|
class qTabSettings: public QWidget, private Ui::TabSettingsObject{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/**
|
|
||||||
* The constructor
|
|
||||||
* @param parent is the parent tab widget
|
|
||||||
* @param detector is the detector returned from the detector tab
|
|
||||||
*/
|
|
||||||
qTabSettings(QWidget *parent, multiSlsDetector* detector);
|
qTabSettings(QWidget *parent, multiSlsDetector* detector);
|
||||||
|
|
||||||
/**
|
|
||||||
* Destructor
|
|
||||||
*/
|
|
||||||
~qTabSettings();
|
~qTabSettings();
|
||||||
|
|
||||||
/**
|
|
||||||
* Refresh and update widgets
|
|
||||||
*/
|
|
||||||
void Refresh();
|
void Refresh();
|
||||||
|
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
/**
|
|
||||||
* Set settings according to selection
|
|
||||||
* @param index index of selection
|
|
||||||
*/
|
|
||||||
void SetSettings(int index);
|
void SetSettings(int index);
|
||||||
|
|
||||||
/**
|
|
||||||
* Set dynamic range if possible
|
|
||||||
* @param index selection
|
|
||||||
*/
|
|
||||||
void SetDynamicRange(int index);
|
void SetDynamicRange(int index);
|
||||||
|
|
||||||
/**
|
|
||||||
* Set threshold energy
|
|
||||||
* @param index selection
|
|
||||||
*/
|
|
||||||
void SetThresholdEnergy(int index);
|
void SetThresholdEnergy(int index);
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets up the widget
|
|
||||||
*/
|
|
||||||
void SetupWidgetWindow();
|
void SetupWidgetWindow();
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets up the detector settings
|
|
||||||
*/
|
|
||||||
void SetupDetectorSettings();
|
void SetupDetectorSettings();
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets up all the slots and signals
|
|
||||||
*/
|
|
||||||
void Initialization();
|
void Initialization();
|
||||||
|
|
||||||
/**
|
|
||||||
* Get Settings
|
|
||||||
*/
|
|
||||||
void GetSettings();
|
void GetSettings();
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the dynamic range and sets it on the gui
|
|
||||||
*/
|
|
||||||
void GetDynamicRange();
|
void GetDynamicRange();
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the threshold energy and update widget
|
|
||||||
*/
|
|
||||||
void GetThresholdEnergy();
|
void GetThresholdEnergy();
|
||||||
|
|
||||||
/** The sls detector object */
|
|
||||||
multiSlsDetector *myDet;
|
multiSlsDetector *myDet;
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
STANDARD,
|
STANDARD,
|
||||||
FAST,
|
FAST,
|
||||||
@ -104,7 +45,6 @@ private:
|
|||||||
UNINITIALIZED,
|
UNINITIALIZED,
|
||||||
NUMSETTINGS
|
NUMSETTINGS
|
||||||
};
|
};
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
DYNAMICRANGE_32,
|
DYNAMICRANGE_32,
|
||||||
DYNAMICRANGE_16,
|
DYNAMICRANGE_16,
|
||||||
|
@ -753,12 +753,16 @@ void qDetectorMain::SetZoomToolTip(bool disable) {
|
|||||||
|
|
||||||
int qDetectorMain::StartStopAcquisitionFromClient(bool start) {
|
int qDetectorMain::StartStopAcquisitionFromClient(bool start) {
|
||||||
FILE_LOG(logINFO) << (start ? "Start" : "Stop")
|
FILE_LOG(logINFO) << (start ? "Start" : "Stop")
|
||||||
<< " Acquisition From Clien";
|
<< " Acquisition From Client";
|
||||||
|
|
||||||
if (tabMeasurement->GetStartStatus() != start) {
|
if (start) {
|
||||||
tabMeasurement->ClickStartStop();
|
if (tabMeasurement->GetStartStatus() != start) {
|
||||||
while (myPlot->GetClientInitiated())
|
tabMeasurement->ClentStartAcquisition();
|
||||||
;
|
while (myPlot->GetClientInitiated())
|
||||||
|
usleep(500);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
tabMeasurement->StopAcquisition();
|
||||||
}
|
}
|
||||||
|
|
||||||
return slsDetectorDefs::OK;
|
return slsDetectorDefs::OK;
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
#include "qTabAdvanced.h"
|
#include "qTabAdvanced.h"
|
||||||
#include "qDrawPlot.h"
|
#include "qDefs.h"
|
||||||
|
|
||||||
#include "multiSlsDetector.h"
|
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
@ -366,7 +364,7 @@ void qTabAdvanced::GetRxrZMQIP() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void qTabAdvanced::SetDetector(int index) {
|
void qTabAdvanced::SetDetector(int index) {
|
||||||
FILE_LOG(logDEBUG) << "Set Detector: " << index;
|
FILE_LOG(logDEBUG) << "Set Detector: " << comboDetector->currentText().toAscii().data();
|
||||||
|
|
||||||
GetOnline();
|
GetOnline();
|
||||||
GetControlPort();
|
GetControlPort();
|
||||||
@ -776,7 +774,7 @@ void qTabAdvanced::GetSubExposureTime() {
|
|||||||
|
|
||||||
void qTabAdvanced::SetSubExposureTime() {
|
void qTabAdvanced::SetSubExposureTime() {
|
||||||
double timeNS = qDefs::getNSTime((qDefs::timeUnit)comboSubExpTimeUnit->currentIndex(), spinSubExpTime->value());
|
double timeNS = qDefs::getNSTime((qDefs::timeUnit)comboSubExpTimeUnit->currentIndex(), spinSubExpTime->value());
|
||||||
FILE_LOG(logINFO) << "Setting sub frame acquisition time to " << timeNS << " clocks" <<
|
FILE_LOG(logINFO) << "Setting sub frame acquisition time to " << timeNS << " ns" <<
|
||||||
"/" << spinSubExpTime->value() << qDefs::getUnitString((qDefs::timeUnit)comboSubExpTimeUnit->currentIndex());
|
"/" << spinSubExpTime->value() << qDefs::getUnitString((qDefs::timeUnit)comboSubExpTimeUnit->currentIndex());
|
||||||
try {
|
try {
|
||||||
myDet->setTimer(slsDetectorDefs::SUBFRAME_ACQUISITION_TIME, (int64_t)timeNS, -1);
|
myDet->setTimer(slsDetectorDefs::SUBFRAME_ACQUISITION_TIME, (int64_t)timeNS, -1);
|
||||||
@ -813,7 +811,7 @@ void qTabAdvanced::GetSubDeadTime() {
|
|||||||
|
|
||||||
void qTabAdvanced::SetSubDeadTime() {
|
void qTabAdvanced::SetSubDeadTime() {
|
||||||
double timeNS = qDefs::getNSTime((qDefs::timeUnit)comboSubDeadTimeUnit->currentIndex(), spinSubDeadTime->value());
|
double timeNS = qDefs::getNSTime((qDefs::timeUnit)comboSubDeadTimeUnit->currentIndex(), spinSubDeadTime->value());
|
||||||
FILE_LOG(logINFO) << "Setting sub frame dead time to " << timeNS << " clocks" <<
|
FILE_LOG(logINFO) << "Setting sub frame dead time to " << timeNS << " ns" <<
|
||||||
"/" << spinSubDeadTime->value() << qDefs::getUnitString((qDefs::timeUnit)comboSubDeadTimeUnit->currentIndex());
|
"/" << spinSubDeadTime->value() << qDefs::getUnitString((qDefs::timeUnit)comboSubDeadTimeUnit->currentIndex());
|
||||||
try {
|
try {
|
||||||
myDet->setTimer(slsDetectorDefs::SUBFRAME_DEADTIME, (int64_t)timeNS, -1);
|
myDet->setTimer(slsDetectorDefs::SUBFRAME_DEADTIME, (int64_t)timeNS, -1);
|
||||||
@ -825,7 +823,7 @@ void qTabAdvanced::SetSubDeadTime() {
|
|||||||
|
|
||||||
|
|
||||||
void qTabAdvanced::Refresh(){
|
void qTabAdvanced::Refresh(){
|
||||||
FILE_LOG(logDEBUG) << endl << "**Updating Advanced Tab";
|
FILE_LOG(logDEBUG) << "**Updating Advanced Tab";
|
||||||
|
|
||||||
// trimming
|
// trimming
|
||||||
if (tab_trimming->isEnabled()) {
|
if (tab_trimming->isEnabled()) {
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
#include "qTabDataOutput.h"
|
#include "qTabDataOutput.h"
|
||||||
|
#include "qDefs.h"
|
||||||
#include "multiSlsDetector.h"
|
|
||||||
|
|
||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
#include <QStandardItemModel>
|
#include <QStandardItemModel>
|
||||||
|
#include <QButtonGroup>
|
||||||
|
#include <QString>
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <string>
|
#include <string>
|
||||||
@ -83,6 +84,7 @@ void qTabDataOutput::PopulateDetectors() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void qTabDataOutput::EnableBrowse() {
|
void qTabDataOutput::EnableBrowse() {
|
||||||
|
FILE_LOG(logDEBUG) << "Getting browse enable";
|
||||||
try {
|
try {
|
||||||
std::string receiverHostname = myDet->getReceiverHostname(comboDetector->currentIndex() - 1);
|
std::string receiverHostname = myDet->getReceiverHostname(comboDetector->currentIndex() - 1);
|
||||||
if (receiverHostname == "localhost") {
|
if (receiverHostname == "localhost") {
|
||||||
@ -107,6 +109,32 @@ void qTabDataOutput::EnableBrowse() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void qTabDataOutput::GetFileWriteEnable() {
|
||||||
|
FILE_LOG(logDEBUG) << "Getting file write enable";
|
||||||
|
try {
|
||||||
|
int retval = myDet->getFileWrite();
|
||||||
|
if (retval == -1) {
|
||||||
|
qDefs::Message(qDefs::WARNING, "File write is inconsistent for all detectors.", "qTabDataOutput::GetFileWriteEnable");
|
||||||
|
boxFileWriteEnabled->setEnabled(true);
|
||||||
|
} else {
|
||||||
|
boxFileWriteEnabled->setEnabled(retval == 0 ? false : true);
|
||||||
|
}
|
||||||
|
} catch (const sls::RuntimeError &e) {
|
||||||
|
qDefs::ExceptionMessage("Could not get file enable.", e.what(), "qTabDataOutput::GetFileWriteEnable");
|
||||||
|
boxFileWriteEnabled->setEnabled(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void qTabDataOutput::GetFileName() {
|
||||||
|
FILE_LOG(logDEBUG) << "Getting file name";
|
||||||
|
try {
|
||||||
|
auto retval = myDet->getFileName();
|
||||||
|
dispFileName->setText(QString(retval.c_str()));
|
||||||
|
} catch (const sls::NonCriticalError &e) {
|
||||||
|
qDefs::ExceptionMessage("Could not get file name prefix.", e.what(), "qTabDataOutput::GetFileName");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
void qTabDataOutput::GetOutputDir() {
|
void qTabDataOutput::GetOutputDir() {
|
||||||
FILE_LOG(logDEBUG) << "Getting file path";
|
FILE_LOG(logDEBUG) << "Getting file path";
|
||||||
@ -182,7 +210,7 @@ void qTabDataOutput::GetFileFormat() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void qTabDataOutput::SetFileFormat(int format) {
|
void qTabDataOutput::SetFileFormat(int format) {
|
||||||
FILE_LOG(logINFO) << "Setting File Format to " << slsDetectorDefs::getFileFormatType((slsDetectorDefs::fileFormat)format);
|
FILE_LOG(logINFO) << "Setting File Format to " << comboFileFormat->currentText().toAscii().data();
|
||||||
try {
|
try {
|
||||||
myDet->setFileFormat((slsDetectorDefs::fileFormat)comboFileFormat->currentIndex());
|
myDet->setFileFormat((slsDetectorDefs::fileFormat)comboFileFormat->currentIndex());
|
||||||
} catch (const sls::NonCriticalError &e) {
|
} catch (const sls::NonCriticalError &e) {
|
||||||
@ -337,7 +365,7 @@ void qTabDataOutput::GetSpeed() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void qTabDataOutput::SetSpeed(int speed) {
|
void qTabDataOutput::SetSpeed(int speed) {
|
||||||
FILE_LOG(logINFO) << "Setting Speed to " << ((speed = FULLSPEED) ? "full" : ((speed == HALFSPEED) ? "half" : "quarter")) << " speed";
|
FILE_LOG(logINFO) << "Setting Speed to " << comboEigerClkDivider->currentText().toAscii().data();;
|
||||||
try {
|
try {
|
||||||
myDet->setSpeed(slsDetectorDefs::CLOCK_DIVIDER, speed);
|
myDet->setSpeed(slsDetectorDefs::CLOCK_DIVIDER, speed);
|
||||||
} catch (const sls::NonCriticalError &e) {
|
} catch (const sls::NonCriticalError &e) {
|
||||||
@ -386,33 +414,31 @@ void qTabDataOutput::GetFlags() {
|
|||||||
void qTabDataOutput::SetFlags() {
|
void qTabDataOutput::SetFlags() {
|
||||||
auto flag1 = slsDetectorDefs::GET_READOUT_FLAGS;
|
auto flag1 = slsDetectorDefs::GET_READOUT_FLAGS;
|
||||||
auto flag2 = slsDetectorDefs::GET_READOUT_FLAGS;
|
auto flag2 = slsDetectorDefs::GET_READOUT_FLAGS;
|
||||||
|
|
||||||
//set to continous or storeinram
|
//set to continous or storeinram
|
||||||
switch (comboEigerFlags1->currentIndex()) {
|
switch (comboEigerFlags1->currentIndex()) {
|
||||||
case STOREINRAM:
|
case STOREINRAM:
|
||||||
FILE_LOG(logINFO) << "Setting Readout Flags to Store in Ram";
|
|
||||||
flag1 = slsDetectorDefs::STORE_IN_RAM;
|
flag1 = slsDetectorDefs::STORE_IN_RAM;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
FILE_LOG(logINFO) << "Setting Readout Flags to Continuous";
|
|
||||||
flag1 = slsDetectorDefs::CONTINOUS_RO;
|
flag1 = slsDetectorDefs::CONTINOUS_RO;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
//set to parallel, nonparallel or safe
|
//set to parallel or nonparallel
|
||||||
switch (comboEigerFlags2->currentIndex()) {
|
switch (comboEigerFlags2->currentIndex()) {
|
||||||
case PARALLEL:
|
case PARALLEL:
|
||||||
FILE_LOG(logINFO) << "Setting Readout Flags to Parallel";
|
|
||||||
flag2 = slsDetectorDefs::PARALLEL;
|
flag2 = slsDetectorDefs::PARALLEL;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
FILE_LOG(logINFO) << "Setting Readout Flags to Non Parallel";
|
|
||||||
flag2 = slsDetectorDefs::NONPARALLEL;
|
flag2 = slsDetectorDefs::NONPARALLEL;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
FILE_LOG(logINFO) << "Setting Readout Flags to " << comboEigerFlags1->currentText().toAscii().data();
|
||||||
myDet->setReadOutFlags(flag1);
|
myDet->setReadOutFlags(flag1);
|
||||||
|
FILE_LOG(logINFO) << "Setting Readout Flags to " << comboEigerFlags2->currentText().toAscii().data();
|
||||||
myDet->setReadOutFlags(flag2);
|
myDet->setReadOutFlags(flag2);
|
||||||
} catch (const sls::NonCriticalError &e) {
|
} catch (const sls::NonCriticalError &e) {
|
||||||
qDefs::ExceptionMessage("Could not set readout flags.", e.what(), "qTabDataOutput::SetFlags");
|
qDefs::ExceptionMessage("Could not set readout flags.", e.what(), "qTabDataOutput::SetFlags");
|
||||||
@ -430,7 +456,8 @@ void qTabDataOutput::Refresh() {
|
|||||||
FILE_LOG(logDEBUG) << "**Updating DataOutput Tab";
|
FILE_LOG(logDEBUG) << "**Updating DataOutput Tab";
|
||||||
|
|
||||||
EnableBrowse();
|
EnableBrowse();
|
||||||
dispFileName->setText(QString(myDet->getFileName().c_str()));
|
GetFileWriteEnable();
|
||||||
|
GetFileName();
|
||||||
GetOutputDir();
|
GetOutputDir();
|
||||||
GetFileOverwrite();
|
GetFileOverwrite();
|
||||||
GetFileFormat();
|
GetFileFormat();
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,5 @@
|
|||||||
#include "qTabSettings.h"
|
#include "qTabSettings.h"
|
||||||
|
#include "qDefs.h"
|
||||||
#include "multiSlsDetector.h"
|
|
||||||
|
|
||||||
#include <QStandardItemModel>
|
#include <QStandardItemModel>
|
||||||
|
|
||||||
@ -135,6 +134,24 @@ void qTabSettings::GetSettings() {
|
|||||||
connect(comboSettings, SIGNAL(currentIndexChanged(int)), this, SLOT(SetSettings(int)));
|
connect(comboSettings, SIGNAL(currentIndexChanged(int)), this, SLOT(SetSettings(int)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void qTabSettings::SetSettings(int index) {
|
||||||
|
// settings
|
||||||
|
auto val = static_cast<slsDetectorDefs::detectorSettings>(index);
|
||||||
|
FILE_LOG(logINFO) << "Setting Settings to " << myDet->slsDetectorDefs::getDetectorSettings(val);
|
||||||
|
|
||||||
|
try {
|
||||||
|
myDet->setSettings(val);
|
||||||
|
} catch (const sls::NonCriticalError &e) {
|
||||||
|
qDefs::ExceptionMessage("Could not set settings.", e.what(), "qTabSettings::SetSettings");
|
||||||
|
GetSettings();
|
||||||
|
}
|
||||||
|
|
||||||
|
// threshold
|
||||||
|
if (spinThreshold->isEnabled()) {
|
||||||
|
SetThresholdEnergy(spinThreshold->value());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void qTabSettings::GetDynamicRange() {
|
void qTabSettings::GetDynamicRange() {
|
||||||
FILE_LOG(logDEBUG) << "Getting dynamic range";
|
FILE_LOG(logDEBUG) << "Getting dynamic range";
|
||||||
disconnect(comboDynamicRange, SIGNAL(activated(int)), this, SLOT(SetDynamicRange(int)));
|
disconnect(comboDynamicRange, SIGNAL(activated(int)), this, SLOT(SetDynamicRange(int)));
|
||||||
@ -170,6 +187,32 @@ void qTabSettings::GetDynamicRange() {
|
|||||||
connect(comboDynamicRange, SIGNAL(activated(int)), this,SLOT(SetDynamicRange(int)));
|
connect(comboDynamicRange, SIGNAL(activated(int)), this,SLOT(SetDynamicRange(int)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void qTabSettings::SetDynamicRange(int index) {
|
||||||
|
FILE_LOG(logINFO) << "Setting dynamic range to " << comboDynamicRange->currentText().toAscii().data()
|
||||||
|
try {
|
||||||
|
switch (index) {
|
||||||
|
case DYNAMICRANGE_32:
|
||||||
|
myDet->setDynamicRange(32);
|
||||||
|
break;
|
||||||
|
case DYNAMICRANGE_16:
|
||||||
|
myDet->setDynamicRange(16);
|
||||||
|
break;
|
||||||
|
case DYNAMICRANGE_8:
|
||||||
|
myDet->setDynamicRange(8);
|
||||||
|
break;
|
||||||
|
case DYNAMICRANGE_4:
|
||||||
|
myDet->setDynamicRange(4);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
qDefs::Message(qDefs::WARNING, std::string("Unknown dynamic range: ") + std::to_string(index), "qTabSettings::SetDynamicRange");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} catch (const sls::NonCriticalError &e) {
|
||||||
|
qDefs::ExceptionMessage("Could not set dynamic range.", e.what(), "qTabSettings::SetDynamicRange");
|
||||||
|
GetDynamicRange();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void qTabSettings::GetThresholdEnergy() {
|
void qTabSettings::GetThresholdEnergy() {
|
||||||
FILE_LOG(logDEBUG) << "Getting theshold energy";
|
FILE_LOG(logDEBUG) << "Getting theshold energy";
|
||||||
disconnect(spinThreshold, SIGNAL(valueChanged(int)), this, SLOT(SetThresholdEnergy()));
|
disconnect(spinThreshold, SIGNAL(valueChanged(int)), this, SLOT(SetThresholdEnergy()));
|
||||||
@ -189,53 +232,6 @@ void qTabSettings::GetThresholdEnergy() {
|
|||||||
connect(spinThreshold, SIGNAL(valueChanged(int)), this, SLOT(SetThresholdEnergy()));
|
connect(spinThreshold, SIGNAL(valueChanged(int)), this, SLOT(SetThresholdEnergy()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void qTabSettings::SetSettings(int index) {
|
|
||||||
// settings
|
|
||||||
auto val = static_cast<slsDetectorDefs::detectorSettings>(index);
|
|
||||||
FILE_LOG(logINFO) << "Setting Settings to " << myDet->slsDetectorDefs::getDetectorSettings(val);
|
|
||||||
|
|
||||||
try {
|
|
||||||
myDet->setSettings(val);
|
|
||||||
} catch (const sls::NonCriticalError &e) {
|
|
||||||
qDefs::ExceptionMessage("Could not set settings.", e.what(), "qTabSettings::SetSettings");
|
|
||||||
GetSettings();
|
|
||||||
}
|
|
||||||
|
|
||||||
// threshold
|
|
||||||
if (spinThreshold->isEnabled()) {
|
|
||||||
SetThresholdEnergy(spinThreshold->value());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void qTabSettings::SetDynamicRange(int index) {
|
|
||||||
try {
|
|
||||||
switch (index) {
|
|
||||||
case DYNAMICRANGE_32:
|
|
||||||
FILE_LOG(logINFO) << "Setting dynamic range to 32";
|
|
||||||
myDet->setDynamicRange(32);
|
|
||||||
break;
|
|
||||||
case DYNAMICRANGE_16:
|
|
||||||
FILE_LOG(logINFO) << "Setting dynamic range to 16";
|
|
||||||
myDet->setDynamicRange(16);
|
|
||||||
break;
|
|
||||||
case DYNAMICRANGE_8:
|
|
||||||
FILE_LOG(logINFO) << "Setting dynamic range to 8";
|
|
||||||
myDet->setDynamicRange(8);
|
|
||||||
break;
|
|
||||||
case DYNAMICRANGE_4:
|
|
||||||
FILE_LOG(logINFO) << "Setting dynamic range to 4";
|
|
||||||
myDet->setDynamicRange(4);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
qDefs::Message(qDefs::WARNING, std::string("Unknown dynamic range: ") + std::to_string(index), "qTabSettings::SetDynamicRange");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
} catch (const sls::NonCriticalError &e) {
|
|
||||||
qDefs::ExceptionMessage("Could not set dynamic range.", e.what(), "qTabSettings::SetDynamicRange");
|
|
||||||
GetDynamicRange();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void qTabSettings::SetThresholdEnergy(int index) {
|
void qTabSettings::SetThresholdEnergy(int index) {
|
||||||
FILE_LOG(logINFO) << "Setting Threshold Energy to " << index << " eV";
|
FILE_LOG(logINFO) << "Setting Threshold Energy to " << index << " eV";
|
||||||
try {
|
try {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user