mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-24 23:30:03 +02:00
commit
300b0c8105
@ -371,101 +371,6 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<action name="actionOpenSetup">
|
||||
<property name="text">
|
||||
<string>&Load &Setup</string>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font/>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionSaveSetup">
|
||||
<property name="text">
|
||||
<string>&Save &Setup</string>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font/>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionMeasurementWizard">
|
||||
<property name="text">
|
||||
<string>&Measurement Wizard</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionOpenConfiguration">
|
||||
<property name="text">
|
||||
<string>&Load &Configuration</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionSaveConfiguration">
|
||||
<property name="text">
|
||||
<string>&Save &Configuration</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionEnergyCalibration">
|
||||
<property name="text">
|
||||
<string>&Energy Calibration</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionAngularCalibration">
|
||||
<property name="text">
|
||||
<string>&Angular Calibration</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionDebug">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Debug</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionBeamline">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Beamline</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionExpert">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Expert</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionConfiguration">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Configuration</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionVersion">
|
||||
<property name="text">
|
||||
<string>&Version</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionAbout">
|
||||
<property name="text">
|
||||
<string>&About</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionLoadConfiguration">
|
||||
<property name="text">
|
||||
<string>Load Configuration</string>
|
||||
@ -476,6 +381,11 @@ p, li { white-space: pre-wrap; }
|
||||
<string>Load Trimbits</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionLoadParameters">
|
||||
<property name="text">
|
||||
<string>Load Parameters</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionDebug">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
@ -500,9 +410,9 @@ p, li { white-space: pre-wrap; }
|
||||
<string>Dockable Windows</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionLoadParameters">
|
||||
<action name="actionAbout">
|
||||
<property name="text">
|
||||
<string>Load Parameters</string>
|
||||
<string>&About</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
|
@ -432,19 +432,6 @@
|
||||
<property name="verticalSpacing">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="lblNumTriggers">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Number of Triggers to be expected.</p><p> #triggers#</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Number of Triggers:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="3">
|
||||
<widget class="QComboBox" name="comboPeriodUnit">
|
||||
<property name="enabled">
|
||||
@ -666,108 +653,6 @@ Frame period between exposures.
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="lblDelay">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>The Delay between Trigger Edge and Start of Exposure ( or Readout).
|
||||
#delay#</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Delay After Trigger:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="2" colspan="2">
|
||||
<widget class="QSpinBox" name="spinNumTriggers">
|
||||
<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="toolTip">
|
||||
<string>Number of Triggers to be expected.
|
||||
#triggers#</string>
|
||||
</property>
|
||||
<property name="statusTip">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="whatsThis">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="keyboardTracking">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="suffix">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>-1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>2000000000</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>1</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="2">
|
||||
<widget class="QDoubleSpinBox" name="spinDelay">
|
||||
<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="toolTip">
|
||||
<string>The Delay between Trigger Edge and Start of Exposure ( or Readout).
|
||||
#delay#</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="keyboardTracking">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="decimals">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<double>-1.000000000000000</double>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>2000000000.000000000000000</double>
|
||||
</property>
|
||||
<property name="value">
|
||||
<double>0.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
<widget class="QDoubleSpinBox" name="spinExpTime">
|
||||
<property name="enabled">
|
||||
@ -903,65 +788,6 @@ Exposure Time of a frame.
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="3">
|
||||
<widget class="QComboBox" name="comboDelayUnit">
|
||||
<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="toolTip">
|
||||
<string>The Delay between Trigger Edge and Start of Exposure ( or Readout).
|
||||
#delay#</string>
|
||||
</property>
|
||||
<property name="layoutDirection">
|
||||
<enum>Qt::LeftToRight</enum>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>hr</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>min</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>s</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>ms</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>us</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>ns</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="3">
|
||||
<widget class="QComboBox" name="comboExpUnit">
|
||||
<property name="enabled">
|
||||
@ -1084,6 +910,577 @@ Frame period between exposures.
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QStackedWidget" name="stackedLblTriggerBurst">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>171</width>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>171</width>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="pageLblTrigger">
|
||||
<layout class="QGridLayout" name="gridLblTrigger">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lblNumTriggers">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Number of Triggers to be expected.</p><p> #triggers#</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Number of Triggers:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="pageLblBurst">
|
||||
<layout class="QGridLayout" name="gridLblBurst">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lblNumBursts">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Number of Triggers to be expected.</p><p> #triggers#</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Number of Bursts:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="2">
|
||||
<widget class="QStackedWidget" name="stackedSpinTriggerBurst">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>208</width>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>208</width>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="pageSpinTrigger">
|
||||
<layout class="QGridLayout" name="gridSpinTrigger">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QSpinBox" name="spinNumTriggers">
|
||||
<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="toolTip">
|
||||
<string>Number of Triggers to be expected.
|
||||
#triggers#</string>
|
||||
</property>
|
||||
<property name="statusTip">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="whatsThis">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="keyboardTracking">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="suffix">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>-1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>2000000000</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>1</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="pageSpinBurst">
|
||||
<layout class="QGridLayout" name="gridSpinBurst">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QSpinBox" name="spinNumBursts">
|
||||
<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="toolTip">
|
||||
<string>Number of Triggers to be expected.
|
||||
#triggers#</string>
|
||||
</property>
|
||||
<property name="statusTip">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="whatsThis">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="keyboardTracking">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="suffix">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>-1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>2000000000</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>1</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QStackedWidget" name="stackedLblDelayBurstPeriod">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>171</width>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>171</width>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="pageLblDelay">
|
||||
<layout class="QGridLayout" name="gridLblDelay">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lblDelay">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Number of Triggers to be expected.</p><p> #triggers#</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Delay After Trigger:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="pageLblBurstPeriod">
|
||||
<layout class="QGridLayout" name="gridLblBurstPeriod">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="lblBurstPeriod">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Number of Triggers to be expected.</p><p> #triggers#</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Burst Period:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="2">
|
||||
<widget class="QStackedWidget" name="stackedSpinDelayBurstPeriod">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>152</width>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>152</width>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="pageSpinDelay">
|
||||
<layout class="QGridLayout" name="gridSpinDelay">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QDoubleSpinBox" name="spinDelay">
|
||||
<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="toolTip">
|
||||
<string>The Delay between Trigger Edge and Start of Exposure ( or Readout).
|
||||
#delay#</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="keyboardTracking">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="decimals">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<double>-1.000000000000000</double>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>2000000000.000000000000000</double>
|
||||
</property>
|
||||
<property name="value">
|
||||
<double>0.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="pageSpinBurstPeriod">
|
||||
<layout class="QGridLayout" name="gridSpinBurstPeriod">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QDoubleSpinBox" name="spinBurstPeriod">
|
||||
<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="toolTip">
|
||||
<string>The Delay between Trigger Edge and Start of Exposure ( or Readout).
|
||||
#delay#</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="keyboardTracking">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="decimals">
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<double>-1.000000000000000</double>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>2000000000.000000000000000</double>
|
||||
</property>
|
||||
<property name="value">
|
||||
<double>0.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="3">
|
||||
<widget class="QStackedWidget" name="stackedComboDelayBurstPeriod">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<height>32</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="pageComboDelay">
|
||||
<layout class="QGridLayout" name="gridComboDelay">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QComboBox" name="comboDelayUnit">
|
||||
<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="toolTip">
|
||||
<string>The Delay between Trigger Edge and Start of Exposure ( or Readout).
|
||||
#delay#</string>
|
||||
</property>
|
||||
<property name="layoutDirection">
|
||||
<enum>Qt::LeftToRight</enum>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>hr</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>min</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>s</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>ms</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>us</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>ns</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="pageComboBurstPeriod">
|
||||
<layout class="QGridLayout" name="gridComboBurstPeriod">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QComboBox" name="comboBurstPeriodUnit">
|
||||
<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="toolTip">
|
||||
<string>The Delay between Trigger Edge and Start of Exposure ( or Readout).
|
||||
#delay#</string>
|
||||
</property>
|
||||
<property name="layoutDirection">
|
||||
<enum>Qt::LeftToRight</enum>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>hr</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>min</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>s</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>ms</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>us</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>ns</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
@ -1116,9 +1513,6 @@ Frame period between exposures.
|
||||
<tabstop>comboExpUnit</tabstop>
|
||||
<tabstop>spinPeriod</tabstop>
|
||||
<tabstop>comboPeriodUnit</tabstop>
|
||||
<tabstop>spinNumTriggers</tabstop>
|
||||
<tabstop>spinDelay</tabstop>
|
||||
<tabstop>comboDelayUnit</tabstop>
|
||||
<tabstop>spinNumSamples</tabstop>
|
||||
</tabstops>
|
||||
<resources>
|
||||
|
@ -2368,7 +2368,6 @@ Displays minimum, maximum and sum of values for each plot.
|
||||
<zorder>box1D</zorder>
|
||||
<zorder>boxFrequency</zorder>
|
||||
<zorder>box2D</zorder>
|
||||
<zorder>horizontalSpacer_6</zorder>
|
||||
<zorder>boxPlotAxis</zorder>
|
||||
<zorder>boxSave</zorder>
|
||||
</widget>
|
||||
|
@ -26,10 +26,12 @@ private slots:
|
||||
void SetNumMeasurements(int val);
|
||||
void SetNumFrames(int val);
|
||||
void SetNumTriggers(int val);
|
||||
void SetNumBursts(int val);
|
||||
void SetNumSamples(int val);
|
||||
void SetExposureTime();
|
||||
void SetAcquisitionPeriod();
|
||||
void SetDelay();
|
||||
void SetBurstPeriod();
|
||||
void SetFileWrite(bool val);
|
||||
void SetFileName();
|
||||
void SetRunIndex(int val);
|
||||
@ -41,17 +43,24 @@ private slots:
|
||||
private:
|
||||
void SetupWidgetWindow();
|
||||
void Initialization();
|
||||
/** default, show trigger and delay,
|
||||
* otherwise for gotthard2 in auto timing mode and burst mode,
|
||||
* show bursts and burst period
|
||||
*/
|
||||
void ShowTriggerDelay();
|
||||
void SetupTimingMode();
|
||||
void EnableWidgetsforTimingMode();
|
||||
|
||||
void GetTimingMode();
|
||||
void GetNumFrames();
|
||||
void GetNumTriggers();
|
||||
void GetNumBursts();
|
||||
void GetNumSamples();
|
||||
void GetExposureTime();
|
||||
void GetAcquisitionPeriod();
|
||||
void CheckAcqPeriodGreaterThanExp();
|
||||
void GetDelay();
|
||||
void GetBurstPeriod();
|
||||
void GetFileWrite();
|
||||
void GetFileName();
|
||||
void GetRunIndex();
|
||||
|
@ -42,6 +42,10 @@ void qTabMeasurement::SetupWidgetWindow() {
|
||||
lblDelay->setEnabled(true);
|
||||
spinDelay->setEnabled(true);
|
||||
comboDelayUnit->setEnabled(true);
|
||||
|
||||
// default is triggers and delay (not #bursts and burst period for gotthard2 in auto mode)
|
||||
ShowTriggerDelay();
|
||||
|
||||
// enabling according to det type
|
||||
switch(det->getDetectorType().squash()) {
|
||||
case slsDetectorDefs::MOENCH:
|
||||
@ -60,6 +64,13 @@ void qTabMeasurement::SetupWidgetWindow() {
|
||||
spinStartingFrameNumber->setEnabled(true);
|
||||
startingFnumImplemented = true;
|
||||
break;
|
||||
case slsDetectorDefs::GOTTHARD2:
|
||||
lblNumBursts->setEnabled(true);
|
||||
spinNumBursts->setEnabled(true);
|
||||
lblBurstPeriod->setEnabled(true);
|
||||
spinBurstPeriod->setEnabled(true);
|
||||
comboBurstPeriodUnit->setEnabled(true);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -78,6 +89,9 @@ void qTabMeasurement::Initialization() {
|
||||
connect(spinNumMeasurements, SIGNAL(valueChanged(int)), this, SLOT(SetNumMeasurements(int)));
|
||||
connect(spinNumFrames, SIGNAL(valueChanged(int)), this, SLOT(SetNumFrames(int)));
|
||||
connect(spinNumTriggers, SIGNAL(valueChanged(int)), this, SLOT(SetNumTriggers(int)));
|
||||
if (spinNumBursts->isEnabled()) {
|
||||
connect(spinNumBursts, SIGNAL(valueChanged(int)), this, SLOT(SetNumBursts(int)));
|
||||
}
|
||||
if (spinNumSamples->isEnabled()) {
|
||||
connect(spinNumSamples, SIGNAL(valueChanged(int)), this, SLOT(SetNumSamples(int)));
|
||||
}
|
||||
@ -89,6 +103,10 @@ void qTabMeasurement::Initialization() {
|
||||
connect(spinDelay, SIGNAL(valueChanged(double)), this, SLOT(SetDelay()));
|
||||
connect(comboDelayUnit, SIGNAL(currentIndexChanged(int)), this, SLOT(SetDelay()));
|
||||
}
|
||||
if (spinBurstPeriod->isEnabled()) {
|
||||
connect(spinBurstPeriod, SIGNAL(valueChanged(double)), this, SLOT(SetBurstPeriod()));
|
||||
connect(comboBurstPeriodUnit, SIGNAL(currentIndexChanged(int)), this, SLOT(SetBurstPeriod()));
|
||||
}
|
||||
connect(chkFile, SIGNAL(toggled(bool)), this, SLOT(SetFileWrite(bool)));
|
||||
connect(dispFileName, SIGNAL(editingFinished()), this, SLOT(SetFileName()));
|
||||
connect(spinIndex, SIGNAL(valueChanged(int)), this, SLOT(SetRunIndex(int)));
|
||||
@ -101,6 +119,35 @@ void qTabMeasurement::Initialization() {
|
||||
|
||||
}
|
||||
|
||||
void qTabMeasurement::ShowTriggerDelay() {
|
||||
bool showTrigger = true;
|
||||
if (det->getDetectorType().squash() == slsDetectorDefs::GOTTHARD2) {
|
||||
try {
|
||||
FILE_LOG(logDEBUG) << "Getting burst mode";
|
||||
auto retval = det->getBurstMode().tsquash("Inconsistent burst mode for all detectors.");
|
||||
// burst mode and auto timing mode
|
||||
if (retval != slsDetectorDefs::BURST_OFF && comboTimingMode->currentIndex() == AUTO) {
|
||||
showTrigger = false;
|
||||
}
|
||||
} CATCH_DISPLAY ("Could not get burst mode.", "qTabMeasurement::ShowTriggerDelay")
|
||||
}
|
||||
|
||||
if (showTrigger) {
|
||||
stackedLblTriggerBurst->setCurrentWidget(pageLblTrigger);
|
||||
stackedSpinTriggerBurst->setCurrentWidget(pageSpinTrigger);
|
||||
stackedLblDelayBurstPeriod->setCurrentWidget(pageLblDelay);
|
||||
stackedSpinDelayBurstPeriod->setCurrentWidget(pageSpinDelay);
|
||||
stackedComboDelayBurstPeriod->setCurrentWidget(pageComboDelay);
|
||||
} else {
|
||||
stackedLblTriggerBurst->setCurrentWidget(pageLblBurst);
|
||||
stackedSpinTriggerBurst->setCurrentWidget(pageSpinBurst);
|
||||
stackedLblDelayBurstPeriod->setCurrentWidget(pageLblBurstPeriod);
|
||||
stackedSpinDelayBurstPeriod->setCurrentWidget(pageSpinBurstPeriod);
|
||||
stackedComboDelayBurstPeriod->setCurrentWidget(pageComboBurstPeriod);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void qTabMeasurement::SetupTimingMode() {
|
||||
QStandardItemModel* model = qobject_cast<QStandardItemModel *>(comboTimingMode->model());
|
||||
QModelIndex index[NUMTIMINGMODES];
|
||||
@ -139,7 +186,9 @@ void qTabMeasurement::EnableWidgetsforTimingMode() {
|
||||
switch(comboTimingMode->currentIndex()) {
|
||||
case AUTO:
|
||||
// #frames, exptime, period
|
||||
spinNumTriggers->setValue(1);
|
||||
if (det->getDetectorType().squash() != slsDetectorDefs::GOTTHARD2) {
|
||||
spinNumTriggers->setValue(1);
|
||||
}
|
||||
lblNumFrames->setEnabled(true);
|
||||
spinNumFrames->setEnabled(true);
|
||||
lblExpTime->setEnabled(true);
|
||||
@ -148,6 +197,9 @@ void qTabMeasurement::EnableWidgetsforTimingMode() {
|
||||
lblPeriod->setEnabled(true);
|
||||
spinPeriod->setEnabled(true);
|
||||
comboPeriodUnit->setEnabled(true);
|
||||
if (det->getDetectorType().squash() == slsDetectorDefs::GOTTHARD2) {
|
||||
ShowTriggerDelay();
|
||||
}
|
||||
break;
|
||||
case TRIGGER:
|
||||
// #triggers, exptime
|
||||
@ -168,6 +220,9 @@ void qTabMeasurement::EnableWidgetsforTimingMode() {
|
||||
lblDelay->setEnabled(true);
|
||||
spinDelay->setEnabled(true);
|
||||
comboDelayUnit->setEnabled(true);
|
||||
if (det->getDetectorType().squash() == slsDetectorDefs::GOTTHARD2) {
|
||||
ShowTriggerDelay();
|
||||
}
|
||||
}
|
||||
break;
|
||||
case GATED:
|
||||
@ -266,6 +321,23 @@ void qTabMeasurement::SetNumTriggers(int val) {
|
||||
} CATCH_HANDLE("Could not set number of triggers.", "qTabMeasurement::SetNumTriggers", this, &qTabMeasurement::GetNumTriggers)
|
||||
}
|
||||
|
||||
void qTabMeasurement::GetNumBursts() {
|
||||
FILE_LOG(logDEBUG) << "Getting number of bursts";
|
||||
disconnect(spinNumBursts, SIGNAL(valueChanged(int)), this, SLOT(SetNumBursts(int)));
|
||||
try {
|
||||
auto retval = det->getNumberOfBursts().tsquash("Inconsistent number of bursts for all detectors.");
|
||||
spinNumBursts->setValue(retval);
|
||||
} CATCH_DISPLAY ("Could not get number of frames.", "qTabMeasurement::GetNumBursts")
|
||||
connect(spinNumBursts, SIGNAL(valueChanged(int)), this, SLOT(SetNumBursts(int)));
|
||||
}
|
||||
|
||||
void qTabMeasurement::SetNumBursts(int val) {
|
||||
FILE_LOG(logINFO) << "Setting number of bursts to " << val;
|
||||
try {
|
||||
det->setNumberOfBursts(val);
|
||||
} CATCH_HANDLE("Could not set number of bursts.", "qTabMeasurement::SetNumBursts", this, &qTabMeasurement::GetNumBursts)
|
||||
}
|
||||
|
||||
void qTabMeasurement::GetNumSamples() {
|
||||
FILE_LOG(logDEBUG) << "Getting number of samples";
|
||||
disconnect(spinNumSamples, SIGNAL(valueChanged(int)), this, SLOT(SetNumSamples(int)));
|
||||
@ -385,6 +457,32 @@ void qTabMeasurement::SetDelay() {
|
||||
} CATCH_HANDLE("Could not set delay.", "qTabMeasurement::SetDelay", this, &qTabMeasurement::GetDelay)
|
||||
}
|
||||
|
||||
void qTabMeasurement::GetBurstPeriod() {
|
||||
FILE_LOG(logDEBUG) << "Getting Burst Period";
|
||||
disconnect(spinBurstPeriod, SIGNAL(valueChanged(double)), this, SLOT(SetBurstPeriod()));
|
||||
disconnect(comboBurstPeriodUnit, SIGNAL(currentIndexChanged(int)), this, SLOT(SetBurstPeriod()));
|
||||
try {
|
||||
spinBurstPeriod->setValue(-1);
|
||||
auto retval = det->getBurstPeriod().tsquash("Inconsistent burst period for all detectors.");
|
||||
auto time = qDefs::getUserFriendlyTime(retval);
|
||||
spinBurstPeriod->setValue(time.first);
|
||||
comboBurstPeriodUnit->setCurrentIndex(static_cast<int>(time.second));
|
||||
} CATCH_DISPLAY ("Could not get burst period.", "qTabMeasurement::GetBurstPeriod")
|
||||
connect(spinBurstPeriod, SIGNAL(valueChanged(double)), this, SLOT(SetBurstPeriod()));
|
||||
connect(comboBurstPeriodUnit, SIGNAL(currentIndexChanged(int)), this, SLOT(SetBurstPeriod()));
|
||||
}
|
||||
|
||||
void qTabMeasurement::SetBurstPeriod() {
|
||||
auto val = spinBurstPeriod->value();
|
||||
auto unit = static_cast<qDefs::timeUnit>(comboBurstPeriodUnit->currentIndex());
|
||||
FILE_LOG(logINFO) << "Setting burst period to " << val << " " << qDefs::getUnitString(unit);
|
||||
try {
|
||||
auto timeNS = qDefs::getNSTime(std::make_pair(val, unit));
|
||||
det->setBurstPeriod(timeNS);
|
||||
} CATCH_HANDLE("Could not set burst period.", "qTabMeasurement::SetBurstPeriod", this, &qTabMeasurement::GetBurstPeriod)
|
||||
}
|
||||
|
||||
|
||||
void qTabMeasurement::GetFileWrite() {
|
||||
FILE_LOG(logDEBUG) << "Getting File Write Enable";
|
||||
disconnect(chkFile, SIGNAL(toggled(bool)), this, SLOT(SetFileWrite(bool)));
|
||||
@ -577,9 +675,15 @@ void qTabMeasurement::Refresh() {
|
||||
GetExposureTime();
|
||||
GetAcquisitionPeriod();
|
||||
GetNumTriggers();
|
||||
if (spinNumBursts->isEnabled()) {
|
||||
GetNumBursts();
|
||||
}
|
||||
if (delayImplemented) {
|
||||
GetDelay();
|
||||
}
|
||||
if (spinBurstPeriod->isEnabled()) {
|
||||
GetBurstPeriod();
|
||||
}
|
||||
if (sampleImplemented) {
|
||||
GetNumSamples();
|
||||
}
|
||||
|
Binary file not shown.
@ -47,6 +47,10 @@ int injectedChannelsIncrement = 0;
|
||||
int vetoReference[NCHIP][NCHAN];
|
||||
uint8_t adcConfiguration[NCHIP][NADC];
|
||||
int burstMode = BURST_INTERNAL;
|
||||
int64_t numTriggers = 1;
|
||||
int64_t numBursts = 1;
|
||||
int64_t delayAfterTriggerNs = 0;
|
||||
int64_t burstPeriodNs = 0;
|
||||
int detPos[2] = {};
|
||||
|
||||
int isInitCheckDone() {
|
||||
@ -350,6 +354,10 @@ void setupDetector() {
|
||||
injectedChannelsOffset = 0;
|
||||
injectedChannelsIncrement = 0;
|
||||
burstMode = BURST_INTERNAL;
|
||||
numTriggers = 1;
|
||||
numBursts = 1;
|
||||
delayAfterTriggerNs = 0;
|
||||
burstPeriodNs = 0;
|
||||
{
|
||||
int i, j;
|
||||
for (i = 0; i < NUM_CLOCKS; ++i) {
|
||||
@ -433,9 +441,11 @@ void setupDetector() {
|
||||
// Initialization of acquistion parameters
|
||||
setNumFrames(DEFAULT_NUM_FRAMES);
|
||||
setNumTriggers(DEFAULT_NUM_CYCLES);
|
||||
setNumBursts(DEFAULT_NUM_BURSTS);
|
||||
setExpTime(DEFAULT_EXPTIME);
|
||||
setPeriod(DEFAULT_PERIOD);
|
||||
setDelayAfterTrigger(DEFAULT_DELAY_AFTER_TRIGGER);
|
||||
setBurstPeriod(DEFAULT_BURST_PERIOD);
|
||||
setTiming(DEFAULT_TIMING_MODE);
|
||||
}
|
||||
|
||||
@ -725,7 +735,7 @@ int setDynamicRange(int dr){
|
||||
/* parameters - timer */
|
||||
void setNumFrames(int64_t val) {
|
||||
if (val > 0) {
|
||||
FILE_LOG(logINFO, ("Setting number of frames %lld [local]\n", (long long int)val));
|
||||
FILE_LOG(logINFO, ("Setting number of frames %lld [local]\n", val));
|
||||
// continuous mode
|
||||
if (burstMode == BURST_OFF) {
|
||||
setNumFramesCont(val);
|
||||
@ -747,21 +757,48 @@ int64_t getNumFrames() {
|
||||
|
||||
void setNumTriggers(int64_t val) {
|
||||
if (val > 0) {
|
||||
FILE_LOG(logINFO, ("Setting number of triggers %lld\n", (long long int)val));
|
||||
set64BitReg(val, SET_CYCLES_LSB_REG, SET_CYCLES_MSB_REG);
|
||||
FILE_LOG(logINFO, ("Setting number of triggers %lld\n", val));
|
||||
numTriggers = val;
|
||||
if (burstMode != BURST_OFF && getTiming() == AUTO_TIMING) {
|
||||
FILE_LOG(logINFO, ("\tBurst and Auto mode: not writing #triggers to register\n"));
|
||||
} else {
|
||||
set64BitReg(val, SET_CYCLES_LSB_REG, SET_CYCLES_MSB_REG);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int64_t getNumTriggers() {
|
||||
return get64BitReg(SET_CYCLES_LSB_REG, SET_CYCLES_MSB_REG);
|
||||
if (burstMode != BURST_OFF && getTiming() == AUTO_TIMING) {
|
||||
return numTriggers;
|
||||
}
|
||||
return get64BitReg(SET_CYCLES_LSB_REG, SET_CYCLES_MSB_REG);
|
||||
}
|
||||
|
||||
void setNumBursts(int64_t val) {
|
||||
if (val > 0) {
|
||||
FILE_LOG(logINFO, ("Setting number of bursts %lld\n", val));
|
||||
numBursts = val;
|
||||
if (burstMode != BURST_OFF && getTiming() == AUTO_TIMING) {
|
||||
set64BitReg(val, SET_CYCLES_LSB_REG, SET_CYCLES_MSB_REG);
|
||||
} else {
|
||||
FILE_LOG(logINFO, ("\tNot (Burst and Auto mode): not writing #bursts to register\n"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int64_t getNumBursts() {
|
||||
if (burstMode != BURST_OFF && getTiming() == AUTO_TIMING) {
|
||||
return get64BitReg(SET_CYCLES_LSB_REG, SET_CYCLES_MSB_REG);
|
||||
}
|
||||
return numBursts;
|
||||
}
|
||||
|
||||
int setExpTime(int64_t val) {
|
||||
if (val < 0) {
|
||||
FILE_LOG(logERROR, ("Invalid exptime: %lld ns\n", (long long int)val));
|
||||
FILE_LOG(logERROR, ("Invalid exptime: %lld ns\n", val));
|
||||
return FAIL;
|
||||
}
|
||||
FILE_LOG(logINFO, ("Setting exptime %lld ns [local]\n", (long long int)val));
|
||||
FILE_LOG(logINFO, ("Setting exptime %lld ns [local]\n", val));
|
||||
// continuous mode
|
||||
if (burstMode == BURST_OFF) {
|
||||
return setExptimeCont(val);
|
||||
@ -776,10 +813,10 @@ int64_t getExpTime() {
|
||||
|
||||
int setPeriod(int64_t val) {
|
||||
if (val < 0) {
|
||||
FILE_LOG(logERROR, ("Invalid period: %lld ns\n", (long long int)val));
|
||||
FILE_LOG(logERROR, ("Invalid period: %lld ns\n", val));
|
||||
return FAIL;
|
||||
}
|
||||
FILE_LOG(logINFO, ("Setting period %lld ns [local]\n", (long long int)val));
|
||||
FILE_LOG(logINFO, ("Setting period %lld ns [local]\n", val));
|
||||
// continuous mode
|
||||
if (burstMode == BURST_OFF) {
|
||||
setPeriodBurst(0);
|
||||
@ -809,7 +846,7 @@ int64_t getNumFramesBurst() {
|
||||
}
|
||||
|
||||
void setNumFramesCont(int64_t val) {
|
||||
FILE_LOG(logINFO, ("Setting number of frames %lld [Continuous mode]\n", (long long int)val));
|
||||
FILE_LOG(logINFO, ("Setting number of frames %lld [Continuous mode]\n", val));
|
||||
set64BitReg(val, SET_FRAMES_LSB_REG, SET_FRAMES_MSB_REG);
|
||||
}
|
||||
|
||||
@ -818,12 +855,12 @@ int64_t getNumFramesCont() {
|
||||
}
|
||||
|
||||
int setExptimeBurst(int64_t val) {
|
||||
FILE_LOG(logINFO, ("Setting exptime %lld ns [Burst mode]\n", (long long int)val));
|
||||
FILE_LOG(logINFO, ("Setting exptime %lld ns [Burst mode]\n", val));
|
||||
return setExptimeBoth(val);
|
||||
}
|
||||
|
||||
int setExptimeCont(int64_t val) {
|
||||
FILE_LOG(logINFO, ("Setting exptime %lld ns [Continuous mode]\n", (long long int)val));
|
||||
FILE_LOG(logINFO, ("Setting exptime %lld ns [Continuous mode]\n", val));
|
||||
return setExptimeBoth(val);
|
||||
}
|
||||
|
||||
@ -846,7 +883,7 @@ int64_t getExptimeBoth() {
|
||||
|
||||
|
||||
int setPeriodBurst(int64_t val) {
|
||||
FILE_LOG(logINFO, ("Setting period %lld ns [Burst mode]\n", (long long int)val));
|
||||
FILE_LOG(logINFO, ("Setting period %lld ns [Burst mode]\n", val));
|
||||
val *= (1E-9 * clkFrequency[SYSTEM_C0]);
|
||||
set64BitReg(val, ASIC_INT_PERIOD_LSB_REG, ASIC_INT_PERIOD_MSB_REG);
|
||||
|
||||
@ -865,7 +902,7 @@ int64_t getPeriodBurst() {
|
||||
}
|
||||
|
||||
int setPeriodCont(int64_t val) {
|
||||
FILE_LOG(logINFO, ("Setting period %lld ns [Continuous mode]\n", (long long int)val));
|
||||
FILE_LOG(logINFO, ("Setting period %lld ns [Continuous mode]\n", val));
|
||||
val *= (1E-9 * FIXED_PLL_FREQUENCY);
|
||||
set64BitReg(val, SET_PERIOD_LSB_REG, SET_PERIOD_MSB_REG);
|
||||
|
||||
@ -885,12 +922,17 @@ int64_t getPeriodCont() {
|
||||
|
||||
int setDelayAfterTrigger(int64_t val) {
|
||||
if (val < 0) {
|
||||
FILE_LOG(logERROR, ("Invalid delay after trigger: %lld ns\n", (long long int)val));
|
||||
FILE_LOG(logERROR, ("Invalid delay after trigger: %lld ns\n", val));
|
||||
return FAIL;
|
||||
}
|
||||
FILE_LOG(logINFO, ("Setting delay after trigger %lld ns\n", (long long int)val));
|
||||
val *= (1E-9 * FIXED_PLL_FREQUENCY);
|
||||
set64BitReg(val, SET_TRIGGER_DELAY_LSB_REG, SET_TRIGGER_DELAY_MSB_REG);
|
||||
FILE_LOG(logINFO, ("Setting delay after trigger %lld ns\n", val));
|
||||
delayAfterTriggerNs = val;
|
||||
val *= (1E-9 * FIXED_PLL_FREQUENCY);
|
||||
if (burstMode != BURST_OFF && getTiming() == AUTO_TIMING) {
|
||||
FILE_LOG(logINFO, ("\tBurst and Auto mode: not writing delay to register\n"));
|
||||
} else {
|
||||
set64BitReg(val, SET_TRIGGER_DELAY_LSB_REG, SET_TRIGGER_DELAY_MSB_REG);
|
||||
}
|
||||
|
||||
// validate for tolerance
|
||||
int64_t retval = getDelayAfterTrigger();
|
||||
@ -902,9 +944,42 @@ int setDelayAfterTrigger(int64_t val) {
|
||||
}
|
||||
|
||||
int64_t getDelayAfterTrigger() {
|
||||
if (burstMode != BURST_OFF && getTiming() == AUTO_TIMING) {
|
||||
return delayAfterTriggerNs;
|
||||
}
|
||||
return get64BitReg(SET_TRIGGER_DELAY_LSB_REG, SET_TRIGGER_DELAY_MSB_REG) / (1E-9 * FIXED_PLL_FREQUENCY);
|
||||
}
|
||||
|
||||
int setBurstPeriod(int64_t val) {
|
||||
if (val < 0) {
|
||||
FILE_LOG(logERROR, ("Invalid burst period: %lld ns\n", val));
|
||||
return FAIL;
|
||||
}
|
||||
FILE_LOG(logINFO, ("Setting burst period %lld ns\n", val));
|
||||
burstPeriodNs = val;
|
||||
val *= (1E-9 * FIXED_PLL_FREQUENCY);
|
||||
if (burstMode != BURST_OFF && getTiming() == AUTO_TIMING) {
|
||||
set64BitReg(val, SET_TRIGGER_DELAY_LSB_REG, SET_TRIGGER_DELAY_MSB_REG);
|
||||
} else {
|
||||
FILE_LOG(logINFO, ("\tNot (Burst and Auto mode): not writing burst period to register\n"));
|
||||
}
|
||||
|
||||
// validate for tolerance
|
||||
int64_t retval = getBurstPeriod();
|
||||
val /= (1E-9 * FIXED_PLL_FREQUENCY);
|
||||
if (val != retval) {
|
||||
return FAIL;
|
||||
}
|
||||
return OK;
|
||||
}
|
||||
|
||||
int64_t getBurstPeriod() {
|
||||
if (burstMode != BURST_OFF && getTiming() == AUTO_TIMING) {
|
||||
return get64BitReg(SET_TRIGGER_DELAY_LSB_REG, SET_TRIGGER_DELAY_MSB_REG) / (1E-9 * FIXED_PLL_FREQUENCY);
|
||||
}
|
||||
return burstPeriodNs;
|
||||
}
|
||||
|
||||
int64_t getNumFramesLeft() {
|
||||
return get64BitReg(GET_FRAMES_LSB_REG, GET_FRAMES_MSB_REG);
|
||||
}
|
||||
@ -1129,6 +1204,12 @@ void setTiming( enum timingMode arg){
|
||||
default:
|
||||
FILE_LOG(logERROR, ("Unknown timing mode %d\n", arg));
|
||||
}
|
||||
|
||||
FILE_LOG(logINFO, ("\tUpdating trigger/burst and delay/burst period registers\n"))
|
||||
setNumTriggers(numTriggers);
|
||||
setNumBursts(numBursts);
|
||||
setDelayAfterTrigger(delayAfterTriggerNs);
|
||||
setBurstPeriod(burstPeriodNs);
|
||||
}
|
||||
|
||||
enum timingMode getTiming() {
|
||||
@ -1807,8 +1888,14 @@ int setBurstMode(enum burstMode burst) {
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
FILE_LOG(logINFO, ("\tUpdating trigger/burst and delay/burst period registers\n"))
|
||||
setNumTriggers(numTriggers);
|
||||
setNumBursts(numBursts);
|
||||
setDelayAfterTrigger(delayAfterTriggerNs);
|
||||
setBurstPeriod(burstPeriodNs);
|
||||
|
||||
// set number of frames and period again (set registers according to timing mode)
|
||||
FILE_LOG(logINFO, ("\tUpdating #frames and period registers"));
|
||||
FILE_LOG(logINFO, ("\tUpdating #frames and period registers\n"));
|
||||
setNumFrames(frames);
|
||||
setPeriod(period);
|
||||
|
||||
|
@ -33,9 +33,11 @@
|
||||
#define DEFAULT_BURST_MODE (BURST_INTERNAL)
|
||||
#define DEFAULT_NUM_FRAMES (1)
|
||||
#define DEFAULT_NUM_CYCLES (1)
|
||||
#define DEFAULT_NUM_BURSTS (1)
|
||||
#define DEFAULT_EXPTIME (0) // 0 ms (220ns in firmware)
|
||||
#define DEFAULT_PERIOD (0) // 0 ms
|
||||
#define DEFAULT_DELAY_AFTER_TRIGGER (0)
|
||||
#define DEFAULT_BURST_PERIOD (0)
|
||||
#define DEFAULT_HIGH_VOLTAGE (0)
|
||||
#define DEFAULT_TIMING_MODE (AUTO_TIMING)
|
||||
#define DEFAULT_SETTINGS (DYNAMICGAIN)
|
||||
|
@ -178,6 +178,11 @@ int64_t getExpTime();
|
||||
int setPeriod(int64_t val);
|
||||
int64_t getPeriod();
|
||||
#ifdef GOTTHARD2D
|
||||
void setNumBursts(int64_t val);
|
||||
int64_t getNumBursts();
|
||||
int setBurstPeriod(int64_t val);
|
||||
int64_t getBurstPeriod();
|
||||
|
||||
void setNumFramesBurst(int64_t val);
|
||||
int64_t getNumFramesBurst();
|
||||
void setNumFramesCont(int64_t val);
|
||||
|
@ -208,3 +208,7 @@ int set_adc_enable_mask_10g(int);
|
||||
int get_adc_enable_mask_10g(int);
|
||||
int set_counter_mask(int);
|
||||
int get_counter_mask(int);
|
||||
int get_num_bursts(int);
|
||||
int set_num_bursts(int);
|
||||
int get_burst_period(int);
|
||||
int set_burst_period(int);
|
||||
|
@ -315,6 +315,10 @@ const char* getFunctionName(enum detFuncs func) {
|
||||
case F_GET_ADC_ENABLE_MASK_10G: return "F_GET_ADC_ENABLE_MASK_10G";
|
||||
case F_SET_COUNTER_MASK: return "F_SET_COUNTER_MASK";
|
||||
case F_GET_COUNTER_MASK: return "F_GET_COUNTER_MASK";
|
||||
case F_GET_NUM_BURSTS: return "F_GET_NUM_BURSTS";
|
||||
case F_SET_NUM_BURSTS: return "F_SET_NUM_BURSTS";
|
||||
case F_GET_BURST_PERIOD: return "F_GET_BURST_PERIOD";
|
||||
case F_SET_BURST_PERIOD: return "F_SET_BURST_PERIOD";
|
||||
|
||||
default: return "Unknown Function";
|
||||
}
|
||||
@ -499,6 +503,10 @@ void function_table() {
|
||||
flist[F_GET_ADC_ENABLE_MASK_10G] = &get_adc_enable_mask_10g;
|
||||
flist[F_SET_COUNTER_MASK] = &set_counter_mask;
|
||||
flist[F_GET_COUNTER_MASK] = &get_counter_mask;
|
||||
flist[F_GET_NUM_BURSTS] = &get_num_bursts;
|
||||
flist[F_SET_NUM_BURSTS] = &set_num_bursts;
|
||||
flist[F_GET_BURST_PERIOD] = &get_burst_period;
|
||||
flist[F_SET_BURST_PERIOD] = &set_burst_period;
|
||||
|
||||
// check
|
||||
if (NUM_DET_FUNCTIONS >= RECEIVER_ENUM_START) {
|
||||
@ -2799,7 +2807,26 @@ int send_update(int file_des) {
|
||||
n = sendData(file_des,&i64,sizeof(i64),INT64);
|
||||
if (n < 0) return printSocketReadError();
|
||||
|
||||
// readout flags
|
||||
// #bursts
|
||||
#ifdef GOTTHARD2D
|
||||
i64 = getNumBursts();
|
||||
n = sendData(file_des,&i64,sizeof(i64),INT64);
|
||||
if (n < 0) return printSocketReadError();
|
||||
#endif
|
||||
|
||||
// timing mode
|
||||
i32 = (int)getTiming();
|
||||
n = sendData(file_des,&i32,sizeof(i32),INT32);
|
||||
if (n < 0) return printSocketReadError();
|
||||
|
||||
// burst mode
|
||||
#ifdef GOTTHARD2D
|
||||
i32 = (int)getBurstMode();
|
||||
n = sendData(file_des,&i32,sizeof(i32),INT32);
|
||||
if (n < 0) return printSocketReadError();
|
||||
#endif
|
||||
|
||||
// readout mode
|
||||
#ifdef CHIPTESTBOARDD
|
||||
i32 = getReadoutMode();
|
||||
n = sendData(file_des,&i32,sizeof(i32),INT32);
|
||||
@ -6629,3 +6656,83 @@ int get_counter_mask(int file_des) {
|
||||
#endif
|
||||
return Server_SendResult(file_des, INT32, UPDATE, &retval, sizeof(retval));
|
||||
}
|
||||
|
||||
|
||||
int get_num_bursts(int file_des) {
|
||||
ret = OK;
|
||||
memset(mess, 0, sizeof(mess));
|
||||
int64_t retval = -1;
|
||||
|
||||
#ifndef GOTTHARD2D
|
||||
functionNotImplemented();
|
||||
#else
|
||||
// get only
|
||||
retval = getNumBursts();
|
||||
FILE_LOG(logDEBUG1, ("retval num bursts %lld\n", (long long int)retval));
|
||||
#endif
|
||||
return Server_SendResult(file_des, INT64, UPDATE, &retval, sizeof(retval));
|
||||
}
|
||||
|
||||
int set_num_bursts(int file_des) {
|
||||
ret = OK;
|
||||
memset(mess, 0, sizeof(mess));
|
||||
int64_t arg = -1;
|
||||
|
||||
if (receiveData(file_des, &arg, sizeof(arg), INT64) < 0)
|
||||
return printSocketReadError();
|
||||
FILE_LOG(logDEBUG1, ("Setting number of bursts %lld\n", (long long int)arg));
|
||||
|
||||
#ifndef GOTTHARD2D
|
||||
functionNotImplemented();
|
||||
#else
|
||||
// only set
|
||||
if (Server_VerifyLock() == OK) {
|
||||
setNumBursts(arg);
|
||||
int64_t retval = getNumBursts();
|
||||
FILE_LOG(logDEBUG1, ("retval num bursts %lld\n", (long long int)retval));
|
||||
validate64(arg, retval, "set number of bursts", DEC);
|
||||
}
|
||||
#endif
|
||||
return Server_SendResult(file_des, INT64, UPDATE, NULL, 0);
|
||||
}
|
||||
|
||||
int get_burst_period(int file_des) {
|
||||
ret = OK;
|
||||
memset(mess, 0, sizeof(mess));
|
||||
int64_t retval = -1;
|
||||
|
||||
#ifndef GOTTHARD2D
|
||||
functionNotImplemented();
|
||||
#else
|
||||
// get only
|
||||
retval = getBurstPeriod();
|
||||
FILE_LOG(logDEBUG1, ("retval burst period %lld ns\n", (long long int)retval));
|
||||
#endif
|
||||
return Server_SendResult(file_des, INT64, UPDATE, &retval, sizeof(retval));
|
||||
}
|
||||
|
||||
int set_burst_period(int file_des) {
|
||||
ret = OK;
|
||||
memset(mess, 0, sizeof(mess));
|
||||
int64_t arg = -1;
|
||||
|
||||
if (receiveData(file_des, &arg, sizeof(arg), INT64) < 0)
|
||||
return printSocketReadError();
|
||||
FILE_LOG(logDEBUG1, ("Setting burst period %lld ns\n", (long long int)arg));
|
||||
|
||||
#ifndef GOTTHARD2D
|
||||
functionNotImplemented();
|
||||
#else
|
||||
// only set
|
||||
if (Server_VerifyLock() == OK) {
|
||||
ret = setBurstPeriod(arg);
|
||||
int64_t retval = getBurstPeriod();
|
||||
FILE_LOG(logDEBUG1, ("retval burst period %lld ns\n", (long long int)retval));
|
||||
if (ret == FAIL) {
|
||||
sprintf(mess, "Could not set burst period. Set %lld ns, read %lld ns.\n", (long long int)arg, (long long int)retval);
|
||||
FILE_LOG(logERROR,(mess));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return Server_SendResult(file_des, INT64, UPDATE, NULL, 0);
|
||||
}
|
@ -155,12 +155,10 @@ class Detector {
|
||||
|
||||
void setPeriod(ns t, Positions pos = {});
|
||||
|
||||
/** [Gotthard][Jungfrau][CTB][Mythen3]
|
||||
* [Gotthard2] only in continuous mode */
|
||||
/** [Gotthard][Jungfrau][CTB][Mythen3][Gotthard2] */
|
||||
Result<ns> getDelayAfterTrigger(Positions pos = {}) const;
|
||||
|
||||
/** [Gotthard][Jungfrau][CTB][Mythen3]
|
||||
* [Gotthard2] only in continuous mode */
|
||||
/** [Gotthard][Jungfrau][CTB][Mythen3][Gotthard2] */
|
||||
void setDelayAfterTrigger(ns value, Positions pos = {});
|
||||
|
||||
/** [Gotthard][Jungfrau][CTB][Mythen3]
|
||||
@ -898,6 +896,18 @@ class Detector {
|
||||
* *
|
||||
* ************************************************/
|
||||
|
||||
/** [Gotthard2] only in burst mode and auto timing mode */
|
||||
Result<int64_t> getNumberOfBursts(Positions pos = {}) const;
|
||||
|
||||
/** [Gotthard2] only in burst mode and auto timing mode */
|
||||
void setNumberOfBursts(int64_t value);
|
||||
|
||||
/** [Gotthard2] only in burst mode and auto timing mode */
|
||||
Result<ns> getBurstPeriod(Positions pos = {}) const;
|
||||
|
||||
/** [Gotthard2] only in burst mode and auto timing mode */
|
||||
void setBurstPeriod(ns value, Positions pos = {});
|
||||
|
||||
/** [Gotthard2] offset channel, increment channel */
|
||||
Result<std::array<int, 2>> getInjectChannel(Positions pos = {});
|
||||
|
||||
|
@ -572,9 +572,11 @@ class CmdProxy {
|
||||
{"acquire", &CmdProxy::acquire},
|
||||
{"frames", &CmdProxy::frames},
|
||||
{"triggers", &CmdProxy::triggers},
|
||||
{"bursts", &CmdProxy::bursts},
|
||||
{"exptime", &CmdProxy::exptime},
|
||||
{"period", &CmdProxy::period},
|
||||
{"delay", &CmdProxy::delay},
|
||||
{"burstperiod", &CmdProxy::burstperiod},
|
||||
{"framesl", &CmdProxy::framesl},
|
||||
{"triggersl", &CmdProxy::triggersl},
|
||||
{"delayl", &CmdProxy::delayl},
|
||||
@ -1017,6 +1019,10 @@ class CmdProxy {
|
||||
std::stol,
|
||||
"[n_triggers]\n\tNumber of triggers per aquire. Use timing command to set timing mode.");
|
||||
|
||||
INTEGER_COMMAND_NOID(bursts, getNumberOfBursts, setNumberOfBursts,
|
||||
std::stol,
|
||||
"[n_bursts]\n\t[Gotthard2] Number of bursts per aquire. Only in auto timing mode and burst mode. Use timing command to set timing mode and burstmode command to set burst mode.");
|
||||
|
||||
TIME_COMMAND(exptime, getExptime, setExptime,
|
||||
"[duration] [(optional unit) ns|us|ms|s]\n\tExposure time"
|
||||
"\n\t[Gotthard2] Uploaded to detector just before acquisition starts");
|
||||
@ -1026,8 +1032,10 @@ class CmdProxy {
|
||||
"\n\t[Gotthard2] Uploaded to detector just before acquisition starts");
|
||||
|
||||
TIME_COMMAND(delay, getDelayAfterTrigger, setDelayAfterTrigger,
|
||||
"[duration] [(optional unit) ns|us|ms|s]\n\t[Jungfrau][Gotthard][Mythen3][Gotthard2][Ctb] Delay after trigger"
|
||||
"\n\t[Gotthard2] only in continuous mode.");
|
||||
"[duration] [(optional unit) ns|us|ms|s]\n\t[Jungfrau][Gotthard][Mythen3][Gotthard2][Ctb] Delay after trigger");
|
||||
|
||||
TIME_COMMAND(burstperiod, getBurstPeriod, setBurstPeriod,
|
||||
"[duration] [(optional unit) ns|us|ms|s]\n\t[Gotthard2] Burst period. Only in burst mode and auto timing mode.");
|
||||
|
||||
GET_COMMAND(framesl, getNumberOfFramesLeft,
|
||||
"\n\t[Gotthard][Jungfrau][Mythen3][Gotthard2][CTB] Number of frames left in acquisition."
|
||||
|
@ -1160,6 +1160,22 @@ void Detector::setImageTestMode(int value, Positions pos) {
|
||||
|
||||
// Gotthard2 Specific
|
||||
|
||||
Result<int64_t> Detector::getNumberOfBursts(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::getNumberOfBursts, pos);
|
||||
}
|
||||
|
||||
void Detector::setNumberOfBursts(int64_t value) {
|
||||
pimpl->Parallel(&slsDetector::setNumberOfBursts, {}, value);
|
||||
}
|
||||
|
||||
Result<ns> Detector::getBurstPeriod(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::getBurstPeriod, pos);
|
||||
}
|
||||
|
||||
void Detector::setBurstPeriod(ns value, Positions pos) {
|
||||
pimpl->Parallel(&slsDetector::setBurstPeriod, pos, value.count());
|
||||
}
|
||||
|
||||
Result<std::array<int, 2>> Detector::getInjectChannel(Positions pos) {
|
||||
return pimpl->Parallel(&slsDetector::getInjectChannel, pos);
|
||||
}
|
||||
|
@ -877,24 +877,12 @@ void DetectorImpl::registerDataCallback(void (*userCallback)(detectorData *,
|
||||
}
|
||||
|
||||
double DetectorImpl::setTotalProgress() {
|
||||
int64_t nf = Parallel(&slsDetector::getNumberOfFramesFromShm, {})
|
||||
.tsquash("Inconsistent number of frames");
|
||||
int64_t nc = Parallel(&slsDetector::getNumberOfTriggersFromShm, {})
|
||||
.tsquash("Inconsistent number of triggers");
|
||||
if (nf == 0 || nc == 0) {
|
||||
throw RuntimeError("Number of frames or triggers is 0");
|
||||
int64_t tot = Parallel(&slsDetector::getTotalNumFramesToReceive, {})
|
||||
.tsquash("Inconsistent number of total frames (#frames x #triggers(or bursts) x #storage cells)");
|
||||
if (tot == 0) {
|
||||
throw RuntimeError("Invalid Total Number of frames (0)");
|
||||
}
|
||||
|
||||
int ns = 1;
|
||||
if (multi_shm()->multiDetectorType == JUNGFRAU) {
|
||||
ns =
|
||||
Parallel(&slsDetector::getNumberOfAdditionalStorageCellsFromShm, {})
|
||||
.tsquash("Inconsistent number of additional storage cells");
|
||||
++ns;
|
||||
}
|
||||
|
||||
totalProgress = nf * nc * ns;
|
||||
FILE_LOG(logDEBUG1) << "nf " << nf << " nc " << nc << " ns " << ns;
|
||||
totalProgress = tot;
|
||||
FILE_LOG(logDEBUG1) << "Set total progress " << totalProgress << std::endl;
|
||||
return totalProgress;
|
||||
}
|
||||
|
@ -338,7 +338,10 @@ void slsDetector::initializeDetectorStructure(detectorType type) {
|
||||
shm()->currentThresholdEV = -1;
|
||||
shm()->nFrames = 1;
|
||||
shm()->nTriggers = 1;
|
||||
shm()->nBursts = 1;
|
||||
shm()->nAddStorageCells = 0;
|
||||
shm()->timingMode = AUTO_TIMING;
|
||||
shm()->burstMode = BURST_INTERNAL;
|
||||
shm()->deadTime = 0;
|
||||
sls::strcpy_safe(shm()->rxHostname, "none");
|
||||
shm()->rxTCPPort = DEFAULT_PORTNO + 2;
|
||||
@ -756,8 +759,8 @@ void slsDetector::updateCachedDetectorVariables() {
|
||||
n += client.Receive(&i64, sizeof(i64));
|
||||
shm()->nFrames = i64;
|
||||
|
||||
// storage cell
|
||||
if (shm()->myDetectorType == JUNGFRAU) {
|
||||
// storage cell
|
||||
n += client.Receive(&i64, sizeof(i64));
|
||||
shm()->nAddStorageCells = i64;
|
||||
}
|
||||
@ -766,6 +769,22 @@ void slsDetector::updateCachedDetectorVariables() {
|
||||
n += client.Receive(&i64, sizeof(i64));
|
||||
shm()->nTriggers = i64;
|
||||
|
||||
// bursts
|
||||
if (shm()->myDetectorType == GOTTHARD2) {
|
||||
n += client.Receive(&i64, sizeof(i64));
|
||||
shm()->nBursts = i64;
|
||||
}
|
||||
|
||||
// timing mode
|
||||
n += client.Receive(&i32, sizeof(i32));
|
||||
shm()->timingMode = static_cast<timingMode>(i32);
|
||||
|
||||
// burst mode
|
||||
if (shm()->myDetectorType == GOTTHARD2) {
|
||||
n += client.Receive(&i32, sizeof(i32));
|
||||
shm()->burstMode = static_cast<burstMode>(i32);
|
||||
}
|
||||
|
||||
// readout mode
|
||||
if (shm()->myDetectorType == CHIPTESTBOARD) {
|
||||
n += client.Receive(&i32, sizeof(i32));
|
||||
@ -1200,25 +1219,31 @@ uint64_t slsDetector::getStartingFrameNumber() {
|
||||
return retval;
|
||||
}
|
||||
|
||||
int64_t slsDetector::getTotalNumFramesToReceive() {
|
||||
int64_t repeats = shm()->nTriggers;
|
||||
// gotthard2 & auto & burst mode, use nBursts instead of nTriggers
|
||||
if (shm()->myDetectorType == GOTTHARD2) {
|
||||
if (shm()->burstMode != BURST_OFF && shm()->timingMode == AUTO_TIMING) {
|
||||
repeats = shm()->nBursts;
|
||||
}
|
||||
}
|
||||
return (shm()->nFrames * repeats * (int64_t)(shm()->nAddStorageCells + 1));
|
||||
}
|
||||
|
||||
void slsDetector::sendTotalNumFramestoReceiver() {
|
||||
if (shm()->useReceiverFlag) {
|
||||
int64_t arg = shm()->nFrames * shm()->nTriggers * (shm()->nAddStorageCells + 1);
|
||||
int64_t arg = getTotalNumFramesToReceive();
|
||||
FILE_LOG(logDEBUG1) << "Sending total number of frames (#f x #t x #s) to Receiver: " << arg;
|
||||
sendToReceiver(F_RECEIVER_SET_NUM_FRAMES, arg, nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
int64_t slsDetector::getNumberOfFramesFromShm() {
|
||||
return shm()->nFrames;
|
||||
}
|
||||
|
||||
int64_t slsDetector::getNumberOfFrames() {
|
||||
int64_t prevVal = shm()->nFrames;
|
||||
int64_t retval = -1;
|
||||
sendToDetector(F_GET_NUM_FRAMES, nullptr, retval);
|
||||
FILE_LOG(logDEBUG1) << "number of frames :" << retval;
|
||||
shm()->nFrames = retval;
|
||||
if (prevVal != retval) {
|
||||
if (shm()->nFrames != retval) {
|
||||
shm()->nFrames = retval;
|
||||
sendTotalNumFramestoReceiver();
|
||||
}
|
||||
return shm()->nFrames;
|
||||
@ -1231,17 +1256,12 @@ void slsDetector::setNumberOfFrames(int64_t value) {
|
||||
sendTotalNumFramestoReceiver();
|
||||
}
|
||||
|
||||
int64_t slsDetector::getNumberOfTriggersFromShm() {
|
||||
return shm()->nTriggers;
|
||||
}
|
||||
|
||||
int64_t slsDetector::getNumberOfTriggers() {
|
||||
int64_t prevVal = shm()->nTriggers;
|
||||
int64_t retval = -1;
|
||||
sendToDetector(F_GET_NUM_TRIGGERS, nullptr, retval);
|
||||
FILE_LOG(logDEBUG1) << "number of triggers :" << retval;
|
||||
shm()->nTriggers = retval;
|
||||
if (prevVal != retval) {
|
||||
if (shm()->nTriggers != retval) {
|
||||
shm()->nTriggers = retval;
|
||||
sendTotalNumFramestoReceiver();
|
||||
}
|
||||
return shm()->nTriggers;
|
||||
@ -1253,11 +1273,25 @@ void slsDetector::setNumberOfTriggers(int64_t value) {
|
||||
shm()->nTriggers = value;
|
||||
sendTotalNumFramestoReceiver();
|
||||
}
|
||||
|
||||
int slsDetector::getNumberOfAdditionalStorageCellsFromShm() {
|
||||
return shm()->nAddStorageCells;
|
||||
|
||||
int64_t slsDetector::getNumberOfBursts() {
|
||||
int64_t retval = -1;
|
||||
sendToDetector(F_GET_NUM_BURSTS, nullptr, retval);
|
||||
FILE_LOG(logDEBUG1) << "number of bursts :" << retval;
|
||||
if (shm()->nBursts != retval) {
|
||||
shm()->nBursts = retval;
|
||||
sendTotalNumFramestoReceiver();
|
||||
}
|
||||
return shm()->nBursts;
|
||||
}
|
||||
|
||||
void slsDetector::setNumberOfBursts(int64_t value) {
|
||||
FILE_LOG(logDEBUG1) << "Setting number of bursts to " << value;
|
||||
sendToDetector(F_SET_NUM_BURSTS, value, nullptr);
|
||||
shm()->nBursts = value;
|
||||
sendTotalNumFramestoReceiver();
|
||||
}
|
||||
|
||||
int slsDetector::getNumberOfAdditionalStorageCells() {
|
||||
int prevVal = shm()->nAddStorageCells;
|
||||
int retval = -1;
|
||||
@ -1367,6 +1401,18 @@ void slsDetector::setDelayAfterTrigger(int64_t value) {
|
||||
sendToDetector(F_SET_DELAY_AFTER_TRIGGER, value, nullptr);
|
||||
}
|
||||
|
||||
int64_t slsDetector::getBurstPeriod() {
|
||||
int64_t retval = -1;
|
||||
sendToDetector(F_GET_BURST_PERIOD, nullptr, retval);
|
||||
FILE_LOG(logDEBUG1) << "burst period :" << retval << "ns";
|
||||
return retval;
|
||||
}
|
||||
|
||||
void slsDetector::setBurstPeriod(int64_t value) {
|
||||
FILE_LOG(logDEBUG1) << "Setting burst period to " << value << "ns";
|
||||
sendToDetector(F_SET_BURST_PERIOD, value, nullptr);
|
||||
}
|
||||
|
||||
int64_t slsDetector::getSubExptime() {
|
||||
int64_t retval = -1;
|
||||
sendToDetector(F_GET_SUB_EXPTIME, nullptr, retval);
|
||||
@ -1498,6 +1544,7 @@ slsDetectorDefs::timingMode slsDetector::setTimingMode(timingMode value) {
|
||||
FILE_LOG(logDEBUG1) << "Setting communication to mode " << value;
|
||||
sendToDetector(fnum, static_cast<int>(value), retval);
|
||||
FILE_LOG(logDEBUG1) << "Timing Mode: " << retval;
|
||||
shm()->timingMode = retval;
|
||||
return retval;
|
||||
}
|
||||
|
||||
@ -2488,13 +2535,15 @@ slsDetectorDefs::burstMode slsDetector::getBurstMode() {
|
||||
int retval = -1;
|
||||
sendToDetector(F_GET_BURST_MODE, nullptr, retval);
|
||||
FILE_LOG(logDEBUG1) << "Burst mode:" << retval;
|
||||
return static_cast<slsDetectorDefs::burstMode>(retval);
|
||||
shm()->burstMode = static_cast<slsDetectorDefs::burstMode>(retval);
|
||||
return shm()->burstMode;
|
||||
}
|
||||
|
||||
void slsDetector::setBurstMode(slsDetectorDefs::burstMode value) {
|
||||
int arg = static_cast<int>(value);
|
||||
FILE_LOG(logDEBUG1) << "Setting burst mode to " << arg;
|
||||
sendToDetector(F_SET_BURST_MODE, arg, nullptr);
|
||||
shm()->burstMode = value;
|
||||
}
|
||||
|
||||
int slsDetector::setCounterBit(int cb) {
|
||||
|
@ -13,7 +13,7 @@
|
||||
class ServerInterface;
|
||||
|
||||
#define SLS_SHMAPIVERSION 0x190726
|
||||
#define SLS_SHMVERSION 0x191127
|
||||
#define SLS_SHMVERSION 0x200225
|
||||
|
||||
/**
|
||||
* @short structure allocated in shared memory to store detector settings for
|
||||
@ -86,8 +86,17 @@ struct sharedSlsDetector {
|
||||
/** number of triggers */
|
||||
int64_t nTriggers;
|
||||
|
||||
/** number of bursts */
|
||||
int64_t nBursts;
|
||||
|
||||
/** number of additional storage cells */
|
||||
int nAddStorageCells;
|
||||
|
||||
/** timing mode */
|
||||
slsDetectorDefs::timingMode timingMode;
|
||||
|
||||
/** burst mode */
|
||||
slsDetectorDefs::burstMode burstMode;
|
||||
|
||||
/** rate correction in ns */
|
||||
int64_t deadTime;
|
||||
@ -521,23 +530,24 @@ class slsDetector : public virtual slsDetectorDefs {
|
||||
*/
|
||||
uint64_t getStartingFrameNumber();
|
||||
|
||||
void sendTotalNumFramestoReceiver();
|
||||
int64_t getTotalNumFramesToReceive();
|
||||
|
||||
int64_t getNumberOfFramesFromShm();
|
||||
void sendTotalNumFramestoReceiver();
|
||||
|
||||
int64_t getNumberOfFrames();
|
||||
|
||||
void setNumberOfFrames(int64_t value);
|
||||
|
||||
int64_t getNumberOfTriggersFromShm();
|
||||
|
||||
int64_t getNumberOfTriggers();
|
||||
|
||||
void setNumberOfTriggers(int64_t value);
|
||||
|
||||
/** [Jungfrau] Advanced */
|
||||
int getNumberOfAdditionalStorageCellsFromShm();
|
||||
|
||||
/** [Gotthard2] only in burst mode and in auto timing mode */
|
||||
int64_t getNumberOfBursts();
|
||||
|
||||
/** [Gotthard2] only in burst mode and in auto timing mode */
|
||||
void setNumberOfBursts(int64_t value);
|
||||
|
||||
/** [Jungfrau] Advanced */
|
||||
int getNumberOfAdditionalStorageCells();
|
||||
|
||||
@ -564,14 +574,18 @@ class slsDetector : public virtual slsDetectorDefs {
|
||||
|
||||
void setPeriod(int64_t value);
|
||||
|
||||
/** [Gotthard][Jungfrau][CTB][Mythen3]
|
||||
* [Gotthard2] only in continuous mode */
|
||||
/** [Gotthard][Jungfrau][CTB][Mythen3][Gotthard2] */
|
||||
int64_t getDelayAfterTrigger();
|
||||
|
||||
/** [Gotthard][Jungfrau][CTB][Mythen3]
|
||||
* [Gotthard2] only in continuous mode */
|
||||
/** [Gotthard][Jungfrau][CTB][Mythen3][Gotthard2] */
|
||||
void setDelayAfterTrigger(int64_t value);
|
||||
|
||||
/** [Gotthard2] only in burst mode and in auto timing mode */
|
||||
int64_t getBurstPeriod();
|
||||
|
||||
/** [Gotthard2] only in burst mode and in auto timing mode */
|
||||
void setBurstPeriod(int64_t value);
|
||||
|
||||
/** [Eiger] in 32 bit mode */
|
||||
int64_t getSubExptime();
|
||||
|
||||
|
@ -227,3 +227,58 @@ TEST_CASE("inj_ch", "[.cmd]") {
|
||||
REQUIRE_THROWS(proxy.Call("inj_ch", {}, -1, GET));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
TEST_CASE("bursts", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
|
||||
if (det_type == defs::GOTTHARD2) {
|
||||
auto previous = det.getNumberOfBursts().squash(1);
|
||||
auto previousTrigger = det.getNumberOfTriggers().squash(1);
|
||||
|
||||
std::ostringstream oss_set, oss_get;
|
||||
proxy.Call("bursts", {"3"}, -1, PUT, oss_set);
|
||||
REQUIRE(oss_set.str() == "bursts 3\n");
|
||||
|
||||
// change to trigger and back (bursts should still be same)
|
||||
proxy.Call("timing", {"trigger"}, -1, PUT);
|
||||
proxy.Call("triggers", {"2"}, -1, PUT);
|
||||
proxy.Call("timing", {"auto"}, -1, PUT);
|
||||
|
||||
|
||||
proxy.Call("bursts", {}, -1, GET, oss_get);
|
||||
REQUIRE(oss_get.str() == "bursts 3\n");
|
||||
|
||||
|
||||
det.setNumberOfBursts(previous);
|
||||
det.setNumberOfTriggers(previousTrigger);
|
||||
} else {
|
||||
REQUIRE_THROWS(proxy.Call("bursts", {}, -1, GET));
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("burstperiod", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
|
||||
if (det_type == defs::GOTTHARD2) {
|
||||
auto previous = det.getBurstPeriod();
|
||||
|
||||
std::ostringstream oss_set, oss_get;
|
||||
proxy.Call("burstperiod", {"30ms"}, -1, PUT, oss_set);
|
||||
REQUIRE(oss_set.str() == "burstperiod 30ms\n");
|
||||
proxy.Call("burstperiod", {}, -1, GET, oss_get);
|
||||
REQUIRE(oss_get.str() == "burstperiod 30ms\n");
|
||||
// Reset all dacs to previous value
|
||||
for (int i = 0; i != det.size(); ++i) {
|
||||
det.setBurstPeriod(previous[i], {i});
|
||||
}
|
||||
} else {
|
||||
REQUIRE_THROWS(proxy.Call("burstperiod", {}, -1, GET));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -188,9 +188,14 @@ enum detFuncs{
|
||||
F_GET_ADC_ENABLE_MASK_10G,
|
||||
F_SET_COUNTER_MASK,
|
||||
F_GET_COUNTER_MASK,
|
||||
NUM_DET_FUNCTIONS,
|
||||
F_GET_NUM_BURSTS,
|
||||
F_SET_NUM_BURSTS,
|
||||
F_GET_BURST_PERIOD,
|
||||
F_SET_BURST_PERIOD,
|
||||
|
||||
NUM_DET_FUNCTIONS,
|
||||
RECEIVER_ENUM_START = 256, /**< detector function should not exceed this (detector server should not compile anyway) */
|
||||
|
||||
F_EXEC_RECEIVER_COMMAND,
|
||||
F_EXIT_RECEIVER,
|
||||
F_LOCK_RECEIVER,
|
||||
@ -443,6 +448,10 @@ static const char* getFunctionNameFromEnum(enum detFuncs func) {
|
||||
case F_GET_ADC_ENABLE_MASK_10G: return "F_GET_ADC_ENABLE_MASK_10G";
|
||||
case F_SET_COUNTER_MASK: return "F_SET_COUNTER_MASK";
|
||||
case F_GET_COUNTER_MASK: return "F_GET_COUNTER_MASK";
|
||||
case F_GET_NUM_BURSTS: return "F_GET_NUM_BURSTS";
|
||||
case F_SET_NUM_BURSTS: return "F_SET_NUM_BURSTS";
|
||||
case F_GET_BURST_PERIOD: return "F_GET_BURST_PERIOD";
|
||||
case F_SET_BURST_PERIOD: return "F_SET_BURST_PERIOD";
|
||||
|
||||
case NUM_DET_FUNCTIONS: return "NUM_DET_FUNCTIONS";
|
||||
case RECEIVER_ENUM_START: return "RECEIVER_ENUM_START";
|
||||
|
@ -9,4 +9,4 @@
|
||||
#define APIJUNGFRAU 0x200131
|
||||
#define APIMOENCH 0x200131
|
||||
#define APIMYTHEN3 0x200224
|
||||
#define APIGOTTHARD2 0x200224
|
||||
#define APIGOTTHARD2 0x200226
|
||||
|
Loading…
x
Reference in New Issue
Block a user