mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-23 15:00:02 +02:00
python and gui fix for parallel, gui: clkdivider also for jungfrau and parallel also for m3
This commit is contained in:
parent
aecde086a0
commit
8e09b50c5e
@ -1315,7 +1315,7 @@ class Detector(CppDetectorApi):
|
|||||||
@element
|
@element
|
||||||
def parallel(self):
|
def parallel(self):
|
||||||
"""
|
"""
|
||||||
[Eiger] Enable or disable the parallel readout mode of Eiger.
|
[Eiger][Mythen3] Enable or disable the parallel readout mode of detector.
|
||||||
"""
|
"""
|
||||||
return self.getParallelMode()
|
return self.getParallelMode()
|
||||||
|
|
||||||
|
@ -413,252 +413,6 @@ Directory where one saves the data.
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QGroupBox" name="boxCorrection_2">
|
|
||||||
<property name="title">
|
|
||||||
<string>Options</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QRadioButton" name="radioDefaultDeadtime">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Default Dead Time</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QCheckBox" name="chkTenGiga">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string><nobr>
|
|
||||||
Compression using Root. Available only for Gotthard in Expert Mode.
|
|
||||||
</nobr><br><nobr>
|
|
||||||
#r_compression#
|
|
||||||
</nobr></string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>10GbE</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="4">
|
|
||||||
<widget class="QSpinBox" name="spinCustomDeadTime">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="keyboardTracking">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="suffix">
|
|
||||||
<string>ns</string>
|
|
||||||
</property>
|
|
||||||
<property name="minimum">
|
|
||||||
<number>-1</number>
|
|
||||||
</property>
|
|
||||||
<property name="maximum">
|
|
||||||
<number>200000000</number>
|
|
||||||
</property>
|
|
||||||
<property name="value">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QCheckBox" name="chkRate">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Rate:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="2">
|
|
||||||
<spacer name="horizontalSpacer_2">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeType">
|
|
||||||
<enum>QSizePolicy::Fixed</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>10</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="3">
|
|
||||||
<widget class="QRadioButton" name="radioCustomDeadtime">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Custom Dead Time:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="5">
|
|
||||||
<spacer name="horizontalSpacer_7">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeType">
|
|
||||||
<enum>QSizePolicy::Expanding</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>10</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0" colspan="6">
|
|
||||||
<widget class="QWidget" name="widgetEiger" native="true">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridEiger">
|
|
||||||
<item row="0" column="1">
|
|
||||||
<spacer name="horizontalSpacer_4">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeType">
|
|
||||||
<enum>QSizePolicy::Fixed</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>10</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="2">
|
|
||||||
<widget class="QComboBox" name="comboEigerClkDivider">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>200</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Full Speed</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Half Speed</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Quarter Speed</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="4">
|
|
||||||
<spacer name="horizontalSpacer_6">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeType">
|
|
||||||
<enum>QSizePolicy::Expanding</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>10</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="lblEigerFlags">
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>105</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Flags:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="lblClkDivider">
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>105</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Clock Divider:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="2">
|
|
||||||
<widget class="QComboBox" name="comboEigerParallelFlag">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>200</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Parallel</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>Non Parallel</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
<spacer name="verticalSpacer">
|
<spacer name="verticalSpacer">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
@ -675,6 +429,232 @@ Compression using Root. Available only for Gotthard in Expert Mode.
|
|||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QGroupBox" name="boxCorrection_2">
|
||||||
|
<property name="title">
|
||||||
|
<string>Options</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
|
<item row="2" column="0">
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="lblClkDivider">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>105</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Clock Divider:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_4">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Fixed</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>10</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QComboBox" name="comboClkDivider">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>25</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>200</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Full Speed</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Half Speed</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Quarter Speed</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_8">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Expanding</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>10</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="chkParallel">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Parallel Readout</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="0">
|
||||||
|
<widget class="QCheckBox" name="chkTenGiga">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string><nobr>
|
||||||
|
Compression using Root. Available only for Gotthard in Expert Mode.
|
||||||
|
</nobr><br><nobr>
|
||||||
|
#r_compression#
|
||||||
|
</nobr></string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>10GbE</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="chkRate">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Rate:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QRadioButton" name="radioDefaultDeadtime">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Default Dead Time</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_2">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Fixed</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>10</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QRadioButton" name="radioCustomDeadtime">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Custom Dead Time:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QSpinBox" name="spinCustomDeadTime">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>25</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="keyboardTracking">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="suffix">
|
||||||
|
<string>ns</string>
|
||||||
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<number>-1</number>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>200000000</number>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_7">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Expanding</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>10</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
@ -683,12 +663,6 @@ Compression using Root. Available only for Gotthard in Expert Mode.
|
|||||||
<tabstop>btnOutputBrowse</tabstop>
|
<tabstop>btnOutputBrowse</tabstop>
|
||||||
<tabstop>comboFileFormat</tabstop>
|
<tabstop>comboFileFormat</tabstop>
|
||||||
<tabstop>chkOverwriteEnable</tabstop>
|
<tabstop>chkOverwriteEnable</tabstop>
|
||||||
<tabstop>chkTenGiga</tabstop>
|
|
||||||
<tabstop>chkRate</tabstop>
|
|
||||||
<tabstop>radioDefaultDeadtime</tabstop>
|
|
||||||
<tabstop>radioCustomDeadtime</tabstop>
|
|
||||||
<tabstop>spinCustomDeadTime</tabstop>
|
|
||||||
<tabstop>comboEigerClkDivider</tabstop>
|
|
||||||
</tabstops>
|
</tabstops>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="../include/icons.qrc"/>
|
<include location="../include/icons.qrc"/>
|
||||||
|
@ -21,7 +21,7 @@ class qTabDataOutput : public QWidget, private Ui::TabDataOutputObject {
|
|||||||
void EnableRateCorrection();
|
void EnableRateCorrection();
|
||||||
void SetRateCorrection();
|
void SetRateCorrection();
|
||||||
void SetSpeed(int speed);
|
void SetSpeed(int speed);
|
||||||
void SetFlags();
|
void SetParallel(bool enable);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void SetupWidgetWindow();
|
void SetupWidgetWindow();
|
||||||
@ -35,11 +35,9 @@ class qTabDataOutput : public QWidget, private Ui::TabDataOutputObject {
|
|||||||
void GetTenGigaEnable();
|
void GetTenGigaEnable();
|
||||||
void GetRateCorrection();
|
void GetRateCorrection();
|
||||||
void GetSpeed();
|
void GetSpeed();
|
||||||
void GetFlags();
|
void GetParallel();
|
||||||
|
|
||||||
sls::Detector *det;
|
sls::Detector *det;
|
||||||
// Button group for radiobuttons for rate
|
// Button group for radiobuttons for rate
|
||||||
QButtonGroup *btnGroupRate;
|
QButtonGroup *btnGroupRate;
|
||||||
// enum for the Eiger Parallel flag
|
|
||||||
enum { PARALLEL, NONPARALLEL };
|
|
||||||
};
|
};
|
||||||
|
@ -32,12 +32,20 @@ void qTabDataOutput::SetupWidgetWindow() {
|
|||||||
radioDefaultDeadtime->setEnabled(true);
|
radioDefaultDeadtime->setEnabled(true);
|
||||||
radioCustomDeadtime->setEnabled(true);
|
radioCustomDeadtime->setEnabled(true);
|
||||||
// flags and speed
|
// flags and speed
|
||||||
widgetEiger->setVisible(true);
|
lblClkDivider->setEnabled(true);
|
||||||
widgetEiger->setEnabled(true);
|
comboClkDivider->setEnabled(true);
|
||||||
|
chkParallel->setEnabled(true);
|
||||||
break;
|
break;
|
||||||
case slsDetectorDefs::MOENCH:
|
case slsDetectorDefs::MOENCH:
|
||||||
chkTenGiga->setEnabled(true);
|
chkTenGiga->setEnabled(true);
|
||||||
break;
|
break;
|
||||||
|
case slsDetectorDefs::MYTHEN3:
|
||||||
|
chkParallel->setEnabled(true);
|
||||||
|
break;
|
||||||
|
case slsDetectorDefs::JUNGFRAU:
|
||||||
|
lblClkDivider->setEnabled(true);
|
||||||
|
comboClkDivider->setEnabled(true);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -74,12 +82,15 @@ void qTabDataOutput::Initialization() {
|
|||||||
connect(spinCustomDeadTime, SIGNAL(valueChanged(int)), this,
|
connect(spinCustomDeadTime, SIGNAL(valueChanged(int)), this,
|
||||||
SLOT(SetRateCorrection()));
|
SLOT(SetRateCorrection()));
|
||||||
}
|
}
|
||||||
// flags, speed
|
// parallel
|
||||||
if (widgetEiger->isEnabled()) {
|
if (chkParallel->isEnabled()) {
|
||||||
connect(comboEigerClkDivider, SIGNAL(currentIndexChanged(int)), this,
|
connect(chkParallel, SIGNAL(toggled(bool)), this,
|
||||||
|
SLOT(SetParallel(bool)));
|
||||||
|
}
|
||||||
|
// speed
|
||||||
|
if (comboClkDivider->isEnabled()) {
|
||||||
|
connect(comboClkDivider, SIGNAL(currentIndexChanged(int)), this,
|
||||||
SLOT(SetSpeed(int)));
|
SLOT(SetSpeed(int)));
|
||||||
connect(comboEigerParallelFlag, SIGNAL(currentIndexChanged(int)), this,
|
|
||||||
SLOT(SetFlags()));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -359,22 +370,21 @@ void qTabDataOutput::SetRateCorrection() {
|
|||||||
|
|
||||||
void qTabDataOutput::GetSpeed() {
|
void qTabDataOutput::GetSpeed() {
|
||||||
LOG(logDEBUG) << "Getting Speed";
|
LOG(logDEBUG) << "Getting Speed";
|
||||||
disconnect(comboEigerClkDivider, SIGNAL(currentIndexChanged(int)), this,
|
disconnect(comboClkDivider, SIGNAL(currentIndexChanged(int)), this,
|
||||||
SLOT(SetSpeed(int)));
|
SLOT(SetSpeed(int)));
|
||||||
try {
|
try {
|
||||||
auto retval =
|
auto retval =
|
||||||
det->getSpeed().tsquash("Speed is inconsistent for all detectors.");
|
det->getSpeed().tsquash("Speed is inconsistent for all detectors.");
|
||||||
comboEigerClkDivider->setCurrentIndex(static_cast<int>(retval));
|
comboClkDivider->setCurrentIndex(static_cast<int>(retval));
|
||||||
}
|
}
|
||||||
CATCH_DISPLAY("Could not get speed.", "qTabDataOutput::GetSpeed")
|
CATCH_DISPLAY("Could not get speed.", "qTabDataOutput::GetSpeed")
|
||||||
connect(comboEigerClkDivider, SIGNAL(currentIndexChanged(int)), this,
|
connect(comboClkDivider, SIGNAL(currentIndexChanged(int)), this,
|
||||||
SLOT(SetSpeed(int)));
|
SLOT(SetSpeed(int)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void qTabDataOutput::SetSpeed(int speed) {
|
void qTabDataOutput::SetSpeed(int speed) {
|
||||||
LOG(logINFO) << "Setting Speed to "
|
LOG(logINFO) << "Setting Speed to "
|
||||||
<< comboEigerClkDivider->currentText().toAscii().data();
|
<< comboClkDivider->currentText().toAscii().data();
|
||||||
;
|
|
||||||
try {
|
try {
|
||||||
det->setSpeed(static_cast<slsDetectorDefs::speedLevel>(speed));
|
det->setSpeed(static_cast<slsDetectorDefs::speedLevel>(speed));
|
||||||
}
|
}
|
||||||
@ -382,34 +392,28 @@ void qTabDataOutput::SetSpeed(int speed) {
|
|||||||
&qTabDataOutput::GetSpeed)
|
&qTabDataOutput::GetSpeed)
|
||||||
}
|
}
|
||||||
|
|
||||||
void qTabDataOutput::GetFlags() {
|
void qTabDataOutput::GetParallel() {
|
||||||
LOG(logDEBUG) << "Getting readout flags";
|
LOG(logDEBUG) << "Getting parallel readout";
|
||||||
disconnect(comboEigerParallelFlag, SIGNAL(currentIndexChanged(int)), this,
|
disconnect(chkParallel, SIGNAL(toggled(bool)), this,
|
||||||
SLOT(SetFlags()));
|
SLOT(SetParallel(bool)));
|
||||||
try {
|
try {
|
||||||
auto retval = det->getParallelMode().tsquash(
|
auto retval = det->getParallelMode().tsquash(
|
||||||
"Parallel Flag is inconsistent for all detectors.");
|
"Parallel Flag is inconsistent for all detectors.");
|
||||||
// parallel or non parallel
|
chkParallel->setChecked(retval);
|
||||||
if (retval)
|
|
||||||
comboEigerParallelFlag->setCurrentIndex(PARALLEL);
|
|
||||||
else
|
|
||||||
comboEigerParallelFlag->setCurrentIndex(NONPARALLEL);
|
|
||||||
}
|
}
|
||||||
CATCH_DISPLAY("Could not get flags.", "qTabDataOutput::GetFlags")
|
CATCH_DISPLAY("Could not get parallel readout.",
|
||||||
connect(comboEigerParallelFlag, SIGNAL(currentIndexChanged(int)), this,
|
"qTabDataOutput::GetParallel")
|
||||||
SLOT(SetFlags()));
|
connect(chkParallel, SIGNAL(toggled(bool)), this, SLOT(SetParallel(bool)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void qTabDataOutput::SetFlags() {
|
void qTabDataOutput::SetParallel(bool enable) {
|
||||||
auto mode =
|
LOG(logINFO) << "Setting PArallel readout to " << enable;
|
||||||
comboEigerParallelFlag->currentIndex() == PARALLEL ? true : false;
|
|
||||||
try {
|
try {
|
||||||
LOG(logINFO) << "Setting Readout Flags to "
|
det->setParallelMode(enable);
|
||||||
<< comboEigerParallelFlag->currentText().toAscii().data();
|
|
||||||
det->setParallelMode(mode);
|
|
||||||
}
|
}
|
||||||
CATCH_HANDLE("Could not set readout flags.", "qTabDataOutput::SetFlags",
|
CATCH_HANDLE("Could not set parallel readout.",
|
||||||
this, &qTabDataOutput::GetFlags)
|
"qTabDataOutput::SetParallel", this,
|
||||||
|
&qTabDataOutput::GetParallel)
|
||||||
}
|
}
|
||||||
|
|
||||||
void qTabDataOutput::Refresh() {
|
void qTabDataOutput::Refresh() {
|
||||||
@ -427,9 +431,11 @@ void qTabDataOutput::Refresh() {
|
|||||||
if (chkTenGiga->isEnabled()) {
|
if (chkTenGiga->isEnabled()) {
|
||||||
GetTenGigaEnable();
|
GetTenGigaEnable();
|
||||||
}
|
}
|
||||||
if (widgetEiger->isEnabled()) {
|
if (chkParallel->isEnabled()) {
|
||||||
|
GetParallel();
|
||||||
|
}
|
||||||
|
if (comboClkDivider->isEnabled()) {
|
||||||
GetSpeed();
|
GetSpeed();
|
||||||
GetFlags();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG(logDEBUG) << "**Updated DataOutput Tab";
|
LOG(logDEBUG) << "**Updated DataOutput Tab";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user