mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-06 18:10:40 +02:00
enabling 10Gbe for eiger, advanced settings and also mV for dacs for all detectors
This commit is contained in:
parent
4d9bbeecc3
commit
7c58d3db46
@ -49,23 +49,13 @@
|
|||||||
<x>15</x>
|
<x>15</x>
|
||||||
<y>25</y>
|
<y>25</y>
|
||||||
<width>701</width>
|
<width>701</width>
|
||||||
<height>141</height>
|
<height>66</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_2">
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
<property name="verticalSpacing">
|
<property name="verticalSpacing">
|
||||||
<number>3</number>
|
<number>3</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QCheckBox" name="chkAngular">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Angular Conversion</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QCheckBox" name="chkFlatField">
|
<widget class="QCheckBox" name="chkFlatField">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
@ -107,55 +97,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="6">
|
|
||||||
<spacer name="horizontalSpacer_5">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeType">
|
|
||||||
<enum>QSizePolicy::Fixed</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0">
|
|
||||||
<widget class="QCheckBox" name="chkDiscardBad">
|
|
||||||
<property name="text">
|
|
||||||
<string>Discard Bad Channels</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="2">
|
|
||||||
<widget class="QRadioButton" name="radioAuto">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Auto</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="3">
|
|
||||||
<spacer name="horizontalSpacer_7">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeType">
|
|
||||||
<enum>QSizePolicy::Fixed</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="8">
|
<item row="0" column="8">
|
||||||
<widget class="QPushButton" name="btnFlatField">
|
<widget class="QPushButton" name="btnFlatField">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
@ -190,37 +131,15 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="8">
|
<item row="1" column="2">
|
||||||
<spacer name="horizontalSpacer_8">
|
<widget class="QRadioButton" name="radioAuto">
|
||||||
<property name="orientation">
|
<property name="enabled">
|
||||||
<enum>Qt::Horizontal</enum>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeType">
|
<property name="text">
|
||||||
<enum>QSizePolicy::Fixed</enum>
|
<string>Auto</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" stdset="0">
|
</widget>
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="7">
|
|
||||||
<spacer name="horizontalSpacer_9">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeType">
|
|
||||||
<enum>QSizePolicy::Fixed</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="6" colspan="3">
|
<item row="1" column="6" colspan="3">
|
||||||
<widget class="QDoubleSpinBox" name="spinDeadTime">
|
<widget class="QDoubleSpinBox" name="spinDeadTime">
|
||||||
@ -257,7 +176,23 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="4">
|
<item row="1" column="3">
|
||||||
|
<spacer name="horizontalSpacer_7">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Fixed</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="4">
|
||||||
<spacer name="horizontalSpacer_6">
|
<spacer name="horizontalSpacer_6">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
@ -273,7 +208,71 @@
|
|||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="0">
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<widget class="QWidget" name="gridLayoutWidget_3">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>15</x>
|
||||||
|
<y>95</y>
|
||||||
|
<width>701</width>
|
||||||
|
<height>66</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_3">
|
||||||
|
<property name="verticalSpacing">
|
||||||
|
<number>3</number>
|
||||||
|
</property>
|
||||||
|
<item row="0" column="3">
|
||||||
|
<spacer name="horizontalSpacer_5">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Fixed</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>310</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="2">
|
||||||
|
<widget class="QCheckBox" name="chkDiscardBad">
|
||||||
|
<property name="text">
|
||||||
|
<string>Discard Bad Channels</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<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>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QCheckBox" name="chkAngular">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Angular Conversion</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
<widget class="QCheckBox" name="chkCompression">
|
<widget class="QCheckBox" name="chkCompression">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string><nobr>
|
<string><nobr>
|
||||||
@ -287,6 +286,23 @@ Compression using Root. Available only for Gotthard in Expert Mode.
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="1" column="2">
|
||||||
|
<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>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
@ -508,8 +524,6 @@ Directory where one saves the data.
|
|||||||
<tabstop>radioAuto</tabstop>
|
<tabstop>radioAuto</tabstop>
|
||||||
<tabstop>radioDeadTime</tabstop>
|
<tabstop>radioDeadTime</tabstop>
|
||||||
<tabstop>spinDeadTime</tabstop>
|
<tabstop>spinDeadTime</tabstop>
|
||||||
<tabstop>chkAngular</tabstop>
|
|
||||||
<tabstop>chkDiscardBad</tabstop>
|
|
||||||
</tabstops>
|
</tabstops>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="../include/icons.qrc"/>
|
<include location="../include/icons.qrc"/>
|
||||||
|
@ -117,6 +117,9 @@ void GetOutputDir();
|
|||||||
/** set compression */
|
/** set compression */
|
||||||
void SetCompression(bool enable);
|
void SetCompression(bool enable);
|
||||||
|
|
||||||
|
/** enable 10GbE */
|
||||||
|
void EnableTenGigabitEthernet(bool enable, int get=0);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
/**signal to enable/disable positions in Actions*/
|
/**signal to enable/disable positions in Actions*/
|
||||||
void AngularConversionSignal(bool);
|
void AngularConversionSignal(bool);
|
||||||
|
@ -100,6 +100,7 @@ private:
|
|||||||
QLabel *lblDacs[20];
|
QLabel *lblDacs[20];
|
||||||
QLabel *lblAdcs[20];
|
QLabel *lblAdcs[20];
|
||||||
MyDoubleSpinBox *spinDacs[20];
|
MyDoubleSpinBox *spinDacs[20];
|
||||||
|
QLabel *lblDacsmV[20];
|
||||||
QDoubleSpinBox *spinAdcs[20];
|
QDoubleSpinBox *spinAdcs[20];
|
||||||
QLabel *lblHV;
|
QLabel *lblHV;
|
||||||
QComboBox *comboHV;
|
QComboBox *comboHV;
|
||||||
|
@ -74,7 +74,15 @@ void qTabAdvanced::SetupWidgetWindow(){
|
|||||||
detType = myDet->getDetectorsType();
|
detType = myDet->getDetectorsType();
|
||||||
switch(detType){
|
switch(detType){
|
||||||
case slsDetectorDefs::MYTHEN: isEnergy = true; isAngular = true; break;
|
case slsDetectorDefs::MYTHEN: isEnergy = true; isAngular = true; break;
|
||||||
case slsDetectorDefs::EIGER: isEnergy = true; isAngular = false; break;
|
case slsDetectorDefs::EIGER:
|
||||||
|
isEnergy = true;
|
||||||
|
isAngular = false;
|
||||||
|
lblIP->setEnabled(true);
|
||||||
|
lblMAC->setEnabled(true);
|
||||||
|
dispIP->setEnabled(true);
|
||||||
|
dispMAC->setEnabled(true);
|
||||||
|
boxRxr->setEnabled(true);
|
||||||
|
break;
|
||||||
case slsDetectorDefs::MOENCH:
|
case slsDetectorDefs::MOENCH:
|
||||||
isEnergy = false;
|
isEnergy = false;
|
||||||
isAngular = false;
|
isAngular = false;
|
||||||
@ -223,7 +231,7 @@ void qTabAdvanced::Initialization(){
|
|||||||
connect(spinStopPort, SIGNAL(valueChanged(int)), this, SLOT(SetStopPort(int)));
|
connect(spinStopPort, SIGNAL(valueChanged(int)), this, SLOT(SetStopPort(int)));
|
||||||
connect(comboOnline, SIGNAL(currentIndexChanged(int)), this, SLOT(SetOnline(int)));
|
connect(comboOnline, SIGNAL(currentIndexChanged(int)), this, SLOT(SetOnline(int)));
|
||||||
|
|
||||||
if((detType==slsDetectorDefs::GOTTHARD) || (detType==slsDetectorDefs::MOENCH)){
|
if((detType==slsDetectorDefs::GOTTHARD) || (detType==slsDetectorDefs::MOENCH) || (detType==slsDetectorDefs::EIGER)){
|
||||||
|
|
||||||
//network
|
//network
|
||||||
connect(spinTCPPort, SIGNAL(valueChanged(int)), this, SLOT(SetRxrTCPPort(int)));
|
connect(spinTCPPort, SIGNAL(valueChanged(int)), this, SLOT(SetRxrTCPPort(int)));
|
||||||
@ -241,6 +249,8 @@ void qTabAdvanced::Initialization(){
|
|||||||
|
|
||||||
|
|
||||||
//roi
|
//roi
|
||||||
|
|
||||||
|
|
||||||
connect(btnClearRoi, SIGNAL(clicked()), this, SLOT(clearROIinDetector()));
|
connect(btnClearRoi, SIGNAL(clicked()), this, SLOT(clearROIinDetector()));
|
||||||
connect(btnGetRoi, SIGNAL(clicked()), this, SLOT(updateROIList()));
|
connect(btnGetRoi, SIGNAL(clicked()), this, SLOT(updateROIList()));
|
||||||
connect(btnSetRoi, SIGNAL(clicked()), this, SLOT(setROI()));
|
connect(btnSetRoi, SIGNAL(clicked()), this, SLOT(setROI()));
|
||||||
@ -297,7 +307,7 @@ void qTabAdvanced::SetThreshold(){
|
|||||||
#ifdef VERBOSE
|
#ifdef VERBOSE
|
||||||
cout << "Setting Threshold DACu:" << spinThreshold->value() << endl;
|
cout << "Setting Threshold DACu:" << spinThreshold->value() << endl;
|
||||||
#endif
|
#endif
|
||||||
spinThreshold->setValue((double)myDet->setDAC((dacs_t)spinThreshold->value(),slsDetectorDefs::THRESHOLD));
|
spinThreshold->setValue((double)myDet->setDAC((dacs_t)spinThreshold->value(),slsDetectorDefs::THRESHOLD,0));
|
||||||
qDefs::checkErrorMessage(myDet,"qTabAdvanced::SetThreshold");
|
qDefs::checkErrorMessage(myDet,"qTabAdvanced::SetThreshold");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1122,7 +1132,7 @@ void qTabAdvanced::Refresh(){
|
|||||||
|
|
||||||
|
|
||||||
//threshold
|
//threshold
|
||||||
double threshold = (double)myDet->setDAC(-1,slsDetectorDefs::THRESHOLD);
|
double threshold = (double)myDet->setDAC(-1,slsDetectorDefs::THRESHOLD,0);
|
||||||
#ifdef VERBOSE
|
#ifdef VERBOSE
|
||||||
cout << "Getting Threshold DACu : " << threshold << endl;
|
cout << "Getting Threshold DACu : " << threshold << endl;
|
||||||
#endif
|
#endif
|
||||||
@ -1168,7 +1178,7 @@ void qTabAdvanced::Refresh(){
|
|||||||
#ifdef VERBOSE
|
#ifdef VERBOSE
|
||||||
cout << "Getting Receiver Network Information" << endl;
|
cout << "Getting Receiver Network Information" << endl;
|
||||||
#endif
|
#endif
|
||||||
if ((detType==slsDetectorDefs::GOTTHARD) || (detType==slsDetectorDefs::MOENCH)){
|
if ((detType==slsDetectorDefs::GOTTHARD) || (detType==slsDetectorDefs::MOENCH)|| (detType==slsDetectorDefs::EIGER)){
|
||||||
//disconnect
|
//disconnect
|
||||||
disconnect(spinTCPPort, SIGNAL(valueChanged(int)), this, SLOT(SetRxrTCPPort(int)));
|
disconnect(spinTCPPort, SIGNAL(valueChanged(int)), this, SLOT(SetRxrTCPPort(int)));
|
||||||
disconnect(spinUDPPort, SIGNAL(valueChanged(int)), this, SLOT(SetRxrUDPPort(int)));
|
disconnect(spinUDPPort, SIGNAL(valueChanged(int)), this, SLOT(SetRxrUDPPort(int)));
|
||||||
|
@ -29,6 +29,7 @@ qTabDataOutput::qTabDataOutput(QWidget *parent,multiSlsDetector*& detector):
|
|||||||
QWidget(parent),myDet(detector){
|
QWidget(parent),myDet(detector){
|
||||||
setupUi(this);
|
setupUi(this);
|
||||||
SetupWidgetWindow();
|
SetupWidgetWindow();
|
||||||
|
Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -54,6 +55,9 @@ void qTabDataOutput::SetupWidgetWindow(){
|
|||||||
if((detType == slsDetectorDefs::MYTHEN)||(detType == slsDetectorDefs::GOTTHARD))
|
if((detType == slsDetectorDefs::MYTHEN)||(detType == slsDetectorDefs::GOTTHARD))
|
||||||
chkAngular->setEnabled(true);
|
chkAngular->setEnabled(true);
|
||||||
|
|
||||||
|
if(detType == slsDetectorDefs::EIGER)
|
||||||
|
chkTenGiga->setEnabled(true);
|
||||||
|
|
||||||
/** error message **/
|
/** error message **/
|
||||||
red = QPalette();
|
red = QPalette();
|
||||||
red.setColor(QPalette::Active,QPalette::WindowText,Qt::red);
|
red.setColor(QPalette::Active,QPalette::WindowText,Qt::red);
|
||||||
@ -157,6 +161,8 @@ void qTabDataOutput::Initialization(){
|
|||||||
connect(chkDiscardBad, SIGNAL(toggled(bool)), this, SLOT(DiscardBadChannels()));
|
connect(chkDiscardBad, SIGNAL(toggled(bool)), this, SLOT(DiscardBadChannels()));
|
||||||
//compression
|
//compression
|
||||||
connect(chkCompression, SIGNAL(toggled(bool)), this, SLOT(SetCompression(bool)));
|
connect(chkCompression, SIGNAL(toggled(bool)), this, SLOT(SetCompression(bool)));
|
||||||
|
//10GbE
|
||||||
|
connect(chkTenGiga, SIGNAL(toggled(bool)), this, SLOT(EnableTenGigabitEthernet(bool)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -735,6 +741,27 @@ void qTabDataOutput::SetCompression(bool enable){
|
|||||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
void qTabDataOutput::EnableTenGigabitEthernet(bool enable,int get){
|
||||||
|
#ifdef VERBOSE
|
||||||
|
cout << endl << "Enabling/Disabling 10GbE" << endl;
|
||||||
|
#endif
|
||||||
|
disconnect(chkTenGiga, SIGNAL(toggled(bool)), this, SLOT(EnableTenGigabitEthernet(bool)));
|
||||||
|
int ret;
|
||||||
|
if(get)
|
||||||
|
ret = myDet->enableTenGigabitEthernet(-1);
|
||||||
|
else
|
||||||
|
ret = myDet->enableTenGigabitEthernet(enable);
|
||||||
|
if(ret > 0) chkTenGiga->setChecked(true);
|
||||||
|
else chkTenGiga->setChecked(false);
|
||||||
|
connect(chkTenGiga, SIGNAL(toggled(bool)), this, SLOT(EnableTenGigabitEthernet(bool)));
|
||||||
|
|
||||||
|
qDefs::checkErrorMessage(myDet,"qTabDataOutput::EnableTenGigabitEthernet");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
void qTabDataOutput::Refresh(){
|
void qTabDataOutput::Refresh(){
|
||||||
#ifdef VERBOSE
|
#ifdef VERBOSE
|
||||||
cout << endl << "**Updating DataOutput Tab" << endl;
|
cout << endl << "**Updating DataOutput Tab" << endl;
|
||||||
@ -808,6 +835,16 @@ void qTabDataOutput::Refresh(){
|
|||||||
GetCompression();
|
GetCompression();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//getting 10GbE
|
||||||
|
if(chkTenGiga->isEnabled()){
|
||||||
|
#ifdef VERBOSE
|
||||||
|
cout << "Getting 10GbE enable" << endl;
|
||||||
|
#endif
|
||||||
|
EnableTenGigabitEthernet(-1,1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef VERBOSE
|
#ifdef VERBOSE
|
||||||
cout << "**Updated DataOutput Tab" << endl << endl;
|
cout << "**Updated DataOutput Tab" << endl << endl;
|
||||||
|
@ -38,6 +38,7 @@ qTabDeveloper::qTabDeveloper(QWidget *parent,multiSlsDetector*& detector):
|
|||||||
lblAdcs[i]=0;
|
lblAdcs[i]=0;
|
||||||
spinDacs[i]=0;
|
spinDacs[i]=0;
|
||||||
spinAdcs[i]=0;
|
spinAdcs[i]=0;
|
||||||
|
lblDacsmV[i]=0;
|
||||||
}
|
}
|
||||||
SetupWidgetWindow();
|
SetupWidgetWindow();
|
||||||
Initialization();
|
Initialization();
|
||||||
@ -81,21 +82,23 @@ void qTabDeveloper::SetupWidgetWindow(){
|
|||||||
NUM_ADC_WIDGETS = 0;
|
NUM_ADC_WIDGETS = 0;
|
||||||
|
|
||||||
dacNames.push_back("v SvP:");
|
dacNames.push_back("v SvP:");
|
||||||
dacNames.push_back("v Vtr:");
|
dacNames.push_back("v SvN");
|
||||||
dacNames.push_back("v Vrf:");
|
dacNames.push_back("v Vrf:");
|
||||||
dacNames.push_back("v Vrs:");
|
dacNames.push_back("v Vrs:");
|
||||||
dacNames.push_back("v SvN");
|
dacNames.push_back("v Vtr:");
|
||||||
dacNames.push_back("v Vtgstv:");
|
dacNames.push_back("v Vtgstv:");
|
||||||
dacNames.push_back("v Vcmp_ll:");
|
|
||||||
dacNames.push_back("v Vcmp_lr:");
|
|
||||||
dacNames.push_back("v cal:");
|
dacNames.push_back("v cal:");
|
||||||
dacNames.push_back("v Vcmp_rl:");
|
|
||||||
dacNames.push_back("v rxb_rb:");
|
|
||||||
dacNames.push_back("v rxb_lb:");
|
|
||||||
dacNames.push_back("v Vcmp_rr:");
|
|
||||||
dacNames.push_back("v Vcp");
|
dacNames.push_back("v Vcp");
|
||||||
dacNames.push_back("v Vcn:");
|
dacNames.push_back("v Vcn:");
|
||||||
dacNames.push_back("v Vis:");
|
dacNames.push_back("v Vis:");
|
||||||
|
dacNames.push_back("v rxb_lb:");
|
||||||
|
dacNames.push_back("v rxb_rb:");
|
||||||
|
dacNames.push_back("v Vcmp_ll:");
|
||||||
|
dacNames.push_back("v Vcmp_lr:");
|
||||||
|
dacNames.push_back("v Vcmp_rl:");
|
||||||
|
dacNames.push_back("v Vcmp_rr:");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case slsDetectorDefs::GOTTHARD:
|
case slsDetectorDefs::GOTTHARD:
|
||||||
@ -218,13 +221,16 @@ void qTabDeveloper::CreateDACWidgets(){
|
|||||||
lblDacs[i] = new QLabel(QString(dacNames[i].c_str()),boxDacs);
|
lblDacs[i] = new QLabel(QString(dacNames[i].c_str()),boxDacs);
|
||||||
spinDacs[i] = new MyDoubleSpinBox(i,boxDacs);
|
spinDacs[i] = new MyDoubleSpinBox(i,boxDacs);
|
||||||
spinDacs[i]->setMaximum(10000);
|
spinDacs[i]->setMaximum(10000);
|
||||||
|
lblDacsmV[i]= new QLabel("",boxDacs);
|
||||||
|
|
||||||
dacLayout->addWidget(lblDacs[i],(int)(i/2),((i%2)==0)?1:4);
|
|
||||||
dacLayout->addWidget(spinDacs[i],(int)(i/2),((i%2)==0)?2:5);
|
dacLayout->addWidget(lblDacs[i],(int)(i/2),((i%2)==0)?1:5);
|
||||||
|
dacLayout->addWidget(spinDacs[i],(int)(i/2),((i%2)==0)?2:6);
|
||||||
|
dacLayout->addWidget(lblDacsmV[i],(int)(i/2),((i%2)==0)?3:7);
|
||||||
if(!(i%2)){
|
if(!(i%2)){
|
||||||
dacLayout->addItem(new QSpacerItem(20,20,QSizePolicy::Fixed,QSizePolicy::Fixed),(int)(i/2),0);
|
dacLayout->addItem(new QSpacerItem(20,20,QSizePolicy::Fixed,QSizePolicy::Fixed),(int)(i/2),0);
|
||||||
dacLayout->addItem(new QSpacerItem(60,20,QSizePolicy::Fixed,QSizePolicy::Fixed),(int)(i/2),3);
|
dacLayout->addItem(new QSpacerItem(60,20,QSizePolicy::Fixed,QSizePolicy::Fixed),(int)(i/2),4);
|
||||||
dacLayout->addItem(new QSpacerItem(20,20,QSizePolicy::Fixed,QSizePolicy::Fixed),(int)(i/2),6);
|
dacLayout->addItem(new QSpacerItem(20,20,QSizePolicy::Fixed,QSizePolicy::Fixed),(int)(i/2),8);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -261,7 +267,8 @@ void qTabDeveloper::SetDacValues(int id){
|
|||||||
cout << "Setting dac:" << dacNames[id] << " : " << spinDacs[id]->value() << endl;
|
cout << "Setting dac:" << dacNames[id] << " : " << spinDacs[id]->value() << endl;
|
||||||
#endif
|
#endif
|
||||||
//spinDacs[id]->setValue((double)myDet->setDAC((dacs_t)spinDacs[id]->value(),getSLSIndex(id)));
|
//spinDacs[id]->setValue((double)myDet->setDAC((dacs_t)spinDacs[id]->value(),getSLSIndex(id)));
|
||||||
myDet->setDAC((dacs_t)spinDacs[id]->value(),getSLSIndex(id));
|
myDet->setDAC((dacs_t)spinDacs[id]->value(),getSLSIndex(id),0);
|
||||||
|
lblDacsmV[id]->setText(QString("%1mV").arg(myDet->setDAC(-1,getSLSIndex(id),1),-10));
|
||||||
|
|
||||||
qDefs::checkErrorMessage(myDet,"qTabDeveloper::SetDacValues");
|
qDefs::checkErrorMessage(myDet,"qTabDeveloper::SetDacValues");
|
||||||
}
|
}
|
||||||
@ -275,7 +282,7 @@ void qTabDeveloper::SetHighVoltage(){
|
|||||||
cout << "Setting high voltage:" << comboHV->currentText().toAscii().constData() << endl;
|
cout << "Setting high voltage:" << comboHV->currentText().toAscii().constData() << endl;
|
||||||
#endif
|
#endif
|
||||||
int highvoltage = comboHV->currentText().toInt();
|
int highvoltage = comboHV->currentText().toInt();
|
||||||
int ret = myDet->setDAC(highvoltage,slsDetectorDefs::HV_POT);
|
int ret = myDet->setDAC(highvoltage,slsDetectorDefs::HV_POT,0);
|
||||||
qDefs::checkErrorMessage(myDet,"qTabDeveloper::SetHighVoltage");
|
qDefs::checkErrorMessage(myDet,"qTabDeveloper::SetHighVoltage");
|
||||||
//error
|
//error
|
||||||
if(ret != highvoltage){
|
if(ret != highvoltage){
|
||||||
@ -317,21 +324,24 @@ slsDetectorDefs::dacIndex qTabDeveloper::getSLSIndex(int index){
|
|||||||
case slsDetectorDefs::EIGER:
|
case slsDetectorDefs::EIGER:
|
||||||
switch(index){
|
switch(index){
|
||||||
case 0: return slsDetectorDefs::E_SvP;
|
case 0: return slsDetectorDefs::E_SvP;
|
||||||
case 1: return slsDetectorDefs::E_Vtr;
|
case 1: return slsDetectorDefs::E_SvN;
|
||||||
case 2: return slsDetectorDefs::E_Vrf;
|
case 2: return slsDetectorDefs::E_Vrf;
|
||||||
case 3: return slsDetectorDefs::E_Vrs;
|
case 3: return slsDetectorDefs::E_Vrs;
|
||||||
case 4: return slsDetectorDefs::E_SvN;
|
case 4: return slsDetectorDefs::E_Vtr;
|
||||||
case 5: return slsDetectorDefs::E_Vtgstv;
|
case 5: return slsDetectorDefs::E_Vtgstv;
|
||||||
case 6: return slsDetectorDefs::E_Vcmp_ll;
|
case 6: return slsDetectorDefs::E_cal;
|
||||||
case 7: return slsDetectorDefs::E_Vcmp_lr;
|
case 7: return slsDetectorDefs::E_Vcp;
|
||||||
case 8: return slsDetectorDefs::E_cal;
|
case 8: return slsDetectorDefs::E_Vcn;
|
||||||
case 9: return slsDetectorDefs::E_Vcmp_rl;
|
case 9: return slsDetectorDefs::E_Vis;
|
||||||
case 10:return slsDetectorDefs::E_rxb_rb;
|
case 10:return slsDetectorDefs::E_rxb_lb;
|
||||||
case 11:return slsDetectorDefs::E_rxb_lb;
|
case 11:return slsDetectorDefs::E_rxb_rb;
|
||||||
case 12:return slsDetectorDefs::E_Vcmp_rr;
|
case 12:return slsDetectorDefs::E_Vcmp_ll;
|
||||||
case 13:return slsDetectorDefs::E_Vcp;
|
case 13:return slsDetectorDefs::E_Vcmp_lr;
|
||||||
case 14:return slsDetectorDefs::E_Vcn;
|
case 14:return slsDetectorDefs::E_Vcmp_rl;
|
||||||
case 15:return slsDetectorDefs::E_Vis;
|
case 15:return slsDetectorDefs::E_Vcmp_rr;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
qDefs::Message(qDefs::CRITICAL,"Unknown DAC/ADC Index. Weird Error","qTabDeveloper::getSLSIndex");
|
qDefs::Message(qDefs::CRITICAL,"Unknown DAC/ADC Index. Weird Error","qTabDeveloper::getSLSIndex");
|
||||||
Refresh();
|
Refresh();
|
||||||
@ -394,8 +404,10 @@ void qTabDeveloper::Refresh(){
|
|||||||
cout << "Gettings DACs" << endl;
|
cout << "Gettings DACs" << endl;
|
||||||
#endif
|
#endif
|
||||||
//dacs
|
//dacs
|
||||||
for(int i=0;i<NUM_DAC_WIDGETS;i++)
|
for(int i=0;i<NUM_DAC_WIDGETS;i++){
|
||||||
spinDacs[i]->setValue((double)myDet->setDAC(-1,getSLSIndex(i)));
|
spinDacs[i]->setValue((double)myDet->setDAC(-1,getSLSIndex(i),0));
|
||||||
|
lblDacsmV[i]->setText(QString("%1mV").arg(myDet->setDAC(-1,getSLSIndex(i),1),-10));
|
||||||
|
}
|
||||||
//adcs
|
//adcs
|
||||||
if(NUM_ADC_WIDGETS) RefreshAdcs();
|
if(NUM_ADC_WIDGETS) RefreshAdcs();
|
||||||
|
|
||||||
@ -409,7 +421,7 @@ void qTabDeveloper::Refresh(){
|
|||||||
lblHV->setToolTip(tipHV);
|
lblHV->setToolTip(tipHV);
|
||||||
comboHV->setToolTip(tipHV);
|
comboHV->setToolTip(tipHV);
|
||||||
//getting hv value
|
//getting hv value
|
||||||
int ret = (int)myDet->setDAC(-1,slsDetectorDefs::HV_POT);
|
int ret = (int)myDet->setDAC(-1,slsDetectorDefs::HV_POT,0);
|
||||||
switch(ret){
|
switch(ret){
|
||||||
case 0: comboHV->setCurrentIndex(0);break;
|
case 0: comboHV->setCurrentIndex(0);break;
|
||||||
case 90: comboHV->setCurrentIndex(1);break;
|
case 90: comboHV->setCurrentIndex(1);break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user