mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 10:07:59 +02:00
WIP
This commit is contained in:
@ -65,7 +65,7 @@ public:
|
||||
int GetFrameIndex(){return currentFrameIndex;};
|
||||
/** sets file write enable , if not enabled,
|
||||
* file index wont increase and so you need secondary titles to differentitate between plots*/
|
||||
void SetEnableFileWrite(bool enable){fileSaveEnable = enable;};
|
||||
void SetFileWriteEnable(bool enable){fileSaveEnable = enable;};
|
||||
|
||||
/** sets plot Title prefix*/
|
||||
void SetPlotTitlePrefix(QString title) {plotTitle_prefix = title;}
|
||||
|
@ -1,288 +1,75 @@
|
||||
#pragma once
|
||||
|
||||
#include "qDefs.h"
|
||||
#include "sls_detector_defs.h"
|
||||
|
||||
#include "ui_form_tab_advanced.h"
|
||||
|
||||
class multiSlsDetector;
|
||||
|
||||
#include <QStackedLayout>
|
||||
#include <QSpacerItem>
|
||||
/**
|
||||
*@short sets up the advanced parameters
|
||||
*/
|
||||
class qTabAdvanced:public QWidget, private Ui::TabAdvancedObject{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
/**
|
||||
* The constructor
|
||||
* @param parent is the parent tab widget
|
||||
* @param detector is the detector returned from the detector tab
|
||||
*/
|
||||
qTabAdvanced(QWidget *parent, multiSlsDetector* detector);
|
||||
|
||||
/**
|
||||
* Destructor
|
||||
*/
|
||||
~qTabAdvanced();
|
||||
|
||||
public slots:
|
||||
/**
|
||||
* To refresh and update widgets
|
||||
*/
|
||||
void Refresh();
|
||||
|
||||
private slots:
|
||||
|
||||
/**
|
||||
* Select Readout
|
||||
* @param index position index of readout
|
||||
*/
|
||||
void SetDetector(int index);
|
||||
|
||||
/**
|
||||
* Sets control port
|
||||
* @param port control port
|
||||
*/
|
||||
void SetControlPort(int port);
|
||||
|
||||
/**
|
||||
* Sets stop port
|
||||
* @param port stop port
|
||||
*/
|
||||
void SetStopPort(int port);
|
||||
|
||||
/**
|
||||
* Sets detector udp ip
|
||||
*/
|
||||
void SetDetectorUDPIP();
|
||||
|
||||
/**
|
||||
* Sets detector udp mac
|
||||
*/
|
||||
void SetDetectorUDPMAC();
|
||||
|
||||
/**
|
||||
* Sets client zmq port
|
||||
* @param port client zmq port
|
||||
*/
|
||||
void SetCltZMQPort(int port);
|
||||
|
||||
/**
|
||||
* Sets client zmq ip to listen to
|
||||
*/
|
||||
void SetCltZMQIP();
|
||||
|
||||
/**
|
||||
* Sets the receiver hostname
|
||||
*/
|
||||
void SetRxrHostname();
|
||||
|
||||
/**
|
||||
* Sets receiver tcp port
|
||||
* @param port receiver tcp port
|
||||
*/
|
||||
void SetRxrTCPPort(int port);
|
||||
|
||||
/**
|
||||
* Sets receiver udp port
|
||||
* @param port receiver udp port
|
||||
*/
|
||||
void SetRxrUDPPort(int port);
|
||||
|
||||
/**
|
||||
* Sets receiver ip
|
||||
*/
|
||||
void SetRxrUDPIP();
|
||||
|
||||
/**
|
||||
* Sets reciever mac
|
||||
*/
|
||||
void SetRxrUDPMAC();
|
||||
|
||||
/**
|
||||
* Sets receiver zmq port
|
||||
* @param port receiver zmq port
|
||||
*/
|
||||
void SetRxrZMQPort(int port);
|
||||
|
||||
/**
|
||||
* Sets receiver zmq ip to stream from
|
||||
*/
|
||||
void SetRxrZMQIP();
|
||||
|
||||
/**
|
||||
* Add ROI
|
||||
*/
|
||||
void AddROISlot();
|
||||
|
||||
/**
|
||||
* Gets ROIs from detector and updates it
|
||||
*/
|
||||
void GetROI();
|
||||
|
||||
/**
|
||||
* Clears ROI in detector
|
||||
*/
|
||||
void ClearROI();
|
||||
|
||||
/**
|
||||
* Sets ROI in detector
|
||||
*/
|
||||
void SetROI();
|
||||
|
||||
/**
|
||||
* Set all trimbits to a value
|
||||
*/
|
||||
void SetAllTrimbits();
|
||||
|
||||
|
||||
/**
|
||||
* Set number of additional storage cells
|
||||
* @param value value to set to
|
||||
*/
|
||||
void SetNumStoragecells(int value);
|
||||
|
||||
/**
|
||||
* Set sub frame exposure time
|
||||
*/
|
||||
void SetSubExposureTime();
|
||||
|
||||
/**
|
||||
* Set sub frame dead time
|
||||
*/
|
||||
void SetSubDeadTime();
|
||||
|
||||
|
||||
private:
|
||||
|
||||
/**
|
||||
* Sets up the widget
|
||||
*/
|
||||
void SetupWidgetWindow();
|
||||
|
||||
/**
|
||||
* Sets up all the slots and signals
|
||||
*/
|
||||
void Initialization();
|
||||
|
||||
/**
|
||||
* Populate detectors
|
||||
*/
|
||||
void PopulateDetectors();
|
||||
|
||||
/**
|
||||
* Gets detector online
|
||||
*/
|
||||
void GetOnline();
|
||||
|
||||
/**
|
||||
* Gets control port
|
||||
*/
|
||||
void GetControlPort();
|
||||
|
||||
/**
|
||||
* Gets stop port
|
||||
*/
|
||||
void GetStopPort();
|
||||
|
||||
/**
|
||||
* Gets detector udp ip
|
||||
*/
|
||||
void GetDetectorUDPIP();
|
||||
|
||||
/**
|
||||
* Gets detector udp mac
|
||||
*/
|
||||
void GetDetectorUDPMAC();
|
||||
|
||||
/**
|
||||
* Gets client zmq receiver port
|
||||
*/
|
||||
void GetCltZMQPort();
|
||||
|
||||
/**
|
||||
* Gets client zmq ip to listen to
|
||||
*/
|
||||
void GetCltZMQIP();
|
||||
|
||||
/**
|
||||
* Gets receiver hostname
|
||||
*/
|
||||
void GetRxrHostname();
|
||||
|
||||
/**
|
||||
* Sets receiver online
|
||||
*/
|
||||
void GetReceiverOnline();
|
||||
|
||||
/**
|
||||
* Gets receiver tcp port
|
||||
*/
|
||||
void GetRxrTCPPort();
|
||||
|
||||
/**
|
||||
* Gets receiver udp port
|
||||
*/
|
||||
void GetRxrUDPPort();
|
||||
|
||||
/**
|
||||
* Gets receiver udp ip
|
||||
*/
|
||||
void GetRxrUDPIP();
|
||||
|
||||
/**
|
||||
* Gets receiver udp mac
|
||||
*/
|
||||
void GetRxrUDPMAC();
|
||||
|
||||
/**
|
||||
* Gets receiver zmq transmitting port
|
||||
*/
|
||||
void GetRxrZMQPort();
|
||||
|
||||
/**
|
||||
* Gets receiver zmq transmitting ip
|
||||
*/
|
||||
void GetRxrZMQIP();
|
||||
|
||||
/**
|
||||
* Clears all the ROI widgets
|
||||
*/
|
||||
void ClearROIWidgets();
|
||||
|
||||
/**
|
||||
* Get all trimbits
|
||||
*/
|
||||
void GetAllTrimbits();
|
||||
|
||||
/**
|
||||
* Get number of additional storage cells
|
||||
*/
|
||||
void GetNumStoragecells();
|
||||
|
||||
/**
|
||||
* Get sub frame exposure time
|
||||
*/
|
||||
void GetSubExposureTime();
|
||||
|
||||
/**
|
||||
* Get sub frame dead time
|
||||
*/
|
||||
void GetSubDeadTime();
|
||||
|
||||
|
||||
/** The multi detector object */
|
||||
multiSlsDetector *myDet;
|
||||
|
||||
/** Tool Tip */
|
||||
QString errOnlineTip;
|
||||
QString detOnlineTip;
|
||||
QString rxrOnlineTip;
|
||||
QPalette red;
|
||||
|
||||
/** ROI */
|
||||
std::vector <QLabel*> lblFromX;
|
||||
std::vector <QSpinBox*> spinFromX;
|
||||
|
@ -1,167 +1,60 @@
|
||||
#pragma once
|
||||
|
||||
#include "qDefs.h"
|
||||
|
||||
#include "ui_form_tab_dataoutput.h"
|
||||
|
||||
class multiSlsDetector;
|
||||
|
||||
#include <QString>
|
||||
#include <QButtonGroup>
|
||||
|
||||
/**
|
||||
*@short sets up the DataOutput parameters
|
||||
*/
|
||||
class qTabDataOutput:public QWidget, private Ui::TabDataOutputObject{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
/**
|
||||
* The constructor
|
||||
* @param parent is the parent tab widget
|
||||
* @param detector is the detector returned from the detector tab
|
||||
*/
|
||||
qTabDataOutput(QWidget *parent,multiSlsDetector* detector);
|
||||
|
||||
/**
|
||||
* Destructor
|
||||
*/
|
||||
~qTabDataOutput();
|
||||
|
||||
/**
|
||||
* To refresh and update widgets
|
||||
*/
|
||||
void Refresh();
|
||||
|
||||
private slots:
|
||||
|
||||
/**
|
||||
* Get output directory
|
||||
*/
|
||||
void GetOutputDir();
|
||||
|
||||
/**
|
||||
* Open dialog to choose the output directory
|
||||
*/
|
||||
void BrowseOutputDir();
|
||||
|
||||
/**
|
||||
* Set output directory
|
||||
*/
|
||||
void SetOutputDir();
|
||||
|
||||
/**
|
||||
* Set file format
|
||||
* @param format file format
|
||||
*/
|
||||
void SetFileFormat(int format);
|
||||
|
||||
/**
|
||||
* Set overwrite enable
|
||||
* @param enable enable
|
||||
*/
|
||||
void SetOverwriteEnable(bool enable);
|
||||
|
||||
/**
|
||||
* Enable/Disable 10GbE
|
||||
* @param enable enable
|
||||
*/
|
||||
void SetTenGigaEnable(bool enable);
|
||||
|
||||
/**
|
||||
* Enable rate correction
|
||||
*/
|
||||
void EnableRateCorrection();
|
||||
|
||||
/**
|
||||
* Set rate correction
|
||||
*/
|
||||
void SetRateCorrection();
|
||||
|
||||
/**
|
||||
* Set speed
|
||||
* @param speed speed chosen
|
||||
*/
|
||||
void SetSpeed(int speed);
|
||||
|
||||
/**
|
||||
* Set flags
|
||||
*/
|
||||
void SetFlags();
|
||||
|
||||
private:
|
||||
|
||||
/**
|
||||
* Sets up the widget
|
||||
*/
|
||||
void SetupWidgetWindow();
|
||||
|
||||
/**
|
||||
* Sets up all the slots and signals
|
||||
*/
|
||||
void Initialization();
|
||||
|
||||
/**
|
||||
* Populate the readouts
|
||||
*/
|
||||
void PopulateDetectors();
|
||||
|
||||
/**
|
||||
* Enable browse
|
||||
*/
|
||||
void EnableBrowse();
|
||||
void GetFileEnable();
|
||||
void GetFileName();
|
||||
|
||||
/**
|
||||
* Get file format
|
||||
*/
|
||||
void GetFileFormat();
|
||||
|
||||
/**
|
||||
* Get overwrite enable
|
||||
*/
|
||||
void GetFileOverwrite();
|
||||
|
||||
/**
|
||||
* Get Ten Giga Enable
|
||||
*/
|
||||
void GetTenGigaEnable();
|
||||
|
||||
/**
|
||||
* Set Get rate correction
|
||||
*/
|
||||
void GetRateCorrection();
|
||||
|
||||
/**
|
||||
* Get speed
|
||||
*/
|
||||
void GetSpeed();
|
||||
|
||||
/**
|
||||
* Get flags
|
||||
*/
|
||||
void GetFlags();
|
||||
|
||||
/** The sls detector object */
|
||||
multiSlsDetector *myDet;
|
||||
|
||||
/** Button group for radiobuttons for rate*/
|
||||
// Button group for radiobuttons for rate
|
||||
QButtonGroup *btnGroupRate;
|
||||
|
||||
/** enum for the Eiger clock divider */
|
||||
// enum for the Eiger clock divider
|
||||
enum {
|
||||
FULLSPEED,
|
||||
HALFSPEED,
|
||||
QUARTERSPEED,
|
||||
NUMBEROFSPEEDS
|
||||
};
|
||||
|
||||
/** enum for the Eiger readout flags1 */
|
||||
// enum for the Eiger readout flags1
|
||||
enum {
|
||||
CONTINUOUS,
|
||||
STOREINRAM
|
||||
};
|
||||
|
||||
/** enum for the Eiger readout flags2 */
|
||||
// enum for the Eiger readout flags2
|
||||
enum {
|
||||
PARALLEL,
|
||||
NONPARALLEL
|
||||
|
@ -1,204 +1,86 @@
|
||||
#pragma once
|
||||
|
||||
#include "qDefs.h"
|
||||
|
||||
#include "ui_form_tab_measurement.h"
|
||||
|
||||
class qDrawPlot;
|
||||
|
||||
class multiSlsDetector;
|
||||
|
||||
#include <QStandardItemModel>
|
||||
#include "qDrawPlot.h"
|
||||
class qDetectorMain;
|
||||
class QStandardItemModel;
|
||||
|
||||
/**
|
||||
*@short sets up the measurement parameters
|
||||
*/
|
||||
class qTabMeasurement:public QWidget, private Ui::TabMeasurementObject{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
/**
|
||||
* The constructor
|
||||
* This tab allows to change measurement parameters and to start/stop an acquisition
|
||||
* @param parent is the parent tab widget
|
||||
* @param detector is the detector returned from the detector tab
|
||||
* @param plot plot object reference
|
||||
*/
|
||||
qTabMeasurement(QWidget *parent,multiSlsDetector* detector, qDrawPlot* plot);
|
||||
|
||||
/**
|
||||
* Destructor
|
||||
*/
|
||||
qTabMeasurement(QWidget *parent, multiSlsDetector* detector, qDrawPlot* plot);
|
||||
~qTabMeasurement();
|
||||
|
||||
/**
|
||||
* Returns the status of the acquisition in gui
|
||||
*/
|
||||
bool GetStartStatus();
|
||||
|
||||
/**
|
||||
* Click the Start/Stop Acquisition button
|
||||
* This is used if this command came from gui client
|
||||
*/
|
||||
void ClickStartStop();
|
||||
|
||||
/**
|
||||
* Returns progress bar value
|
||||
*/
|
||||
void ClentStartAcquisition();
|
||||
int GetProgress();
|
||||
|
||||
/**
|
||||
* Refresh and update widgets
|
||||
*/
|
||||
void Refresh();
|
||||
|
||||
|
||||
public slots:
|
||||
|
||||
/**
|
||||
* Update plot is finished,
|
||||
* changes start/stop text and enables/disables all widgets
|
||||
*/
|
||||
void UpdateFinished();
|
||||
|
||||
/**
|
||||
* Updates the current measurement
|
||||
* @param val the value to be updated
|
||||
*/
|
||||
void SetCurrentMeasurement(int val);
|
||||
void UpdateFinished();
|
||||
void StopAcquisition();
|
||||
|
||||
private slots:
|
||||
|
||||
/**
|
||||
* Set number of measurements
|
||||
* @param num number of measurements to be set
|
||||
*/
|
||||
void setNumMeasurements(int num);
|
||||
|
||||
/**
|
||||
* Set number of frames
|
||||
* @param val number of frames to be set
|
||||
*/
|
||||
void setNumFrames(int val);
|
||||
|
||||
/**
|
||||
* Set acquisition time
|
||||
*/
|
||||
void setExposureTime();
|
||||
|
||||
/**
|
||||
* Set frame period between exposures
|
||||
*/
|
||||
void setAcquisitionPeriod();
|
||||
|
||||
/**
|
||||
* Set number of triggers
|
||||
* @param val number of triggers to be set
|
||||
*/
|
||||
void setNumTriggers(int val);
|
||||
|
||||
/**
|
||||
* Set delay
|
||||
*/
|
||||
void setDelay();
|
||||
|
||||
/**
|
||||
* Set number of samples
|
||||
* @param val number of samples to be set
|
||||
*/
|
||||
void setNumSamples(int val);
|
||||
|
||||
/**
|
||||
* Set file name
|
||||
*/
|
||||
void setFileName();
|
||||
|
||||
/**
|
||||
* Enable write to file
|
||||
*/
|
||||
void EnableFileWrite(bool enable);
|
||||
|
||||
/**
|
||||
* Set index of file name
|
||||
* @param index index of selection
|
||||
*/
|
||||
void setRunIndex(int index);
|
||||
|
||||
/**
|
||||
* Update progress
|
||||
*/
|
||||
void UpdateProgress();
|
||||
|
||||
/**
|
||||
* starts Acquisition
|
||||
*/
|
||||
void startAcquisition();
|
||||
|
||||
/**
|
||||
* stops Acquisition
|
||||
*/
|
||||
void stopAcquisition();
|
||||
|
||||
/**
|
||||
* Sets the timing mode
|
||||
* @param mode timing mode
|
||||
*/
|
||||
void SetTimingMode(int mode);
|
||||
void SetNumMeasurements(int num);
|
||||
void SetNumFrames(int val);
|
||||
void SetNumTriggers(int val);
|
||||
void SetNumSamples(int val);
|
||||
void SetExposureTime();
|
||||
void SetAcquisitionPeriod();
|
||||
void SetDelay();
|
||||
void SetFileWriteEnable(bool enable);
|
||||
void SetFileName();
|
||||
void SetRunIndex(int val);
|
||||
void UpdateProgress();
|
||||
void StartAcquisition();
|
||||
|
||||
private:
|
||||
/**
|
||||
* Sets up the widget
|
||||
*/
|
||||
void SetupWidgetWindow();
|
||||
|
||||
/**
|
||||
* Sets up the timing mode
|
||||
*/
|
||||
void SetupTimingMode();
|
||||
|
||||
/**
|
||||
* Sets up all the slots and signals
|
||||
*/
|
||||
void Initialization();
|
||||
void SetupTimingMode();
|
||||
void EnableWidgetsforTimingMode();
|
||||
|
||||
/**
|
||||
* Get timing mode from detector
|
||||
* @param startup is true when gui has just started up
|
||||
*/
|
||||
void GetTimingModeFromDetector(bool startup = false);
|
||||
|
||||
/**
|
||||
* Enables/Disables widgetframes to avoid setting measurement during an acquisition
|
||||
*/
|
||||
void Enable(bool enable);
|
||||
|
||||
/**
|
||||
* Checks if acquisition period is greater than exposure time
|
||||
*/
|
||||
void GetTimingMode();
|
||||
void GetNumMeasurements();
|
||||
void GetNumFrames();
|
||||
void GetNumTriggers();
|
||||
void GetNumSamples();
|
||||
void GetExposureTime();
|
||||
void GetAcquisitionPeriod();
|
||||
void CheckAcqPeriodGreaterThanExp();
|
||||
void GetDelay();
|
||||
void GetFileWriteEnable();
|
||||
void GetFileName();
|
||||
void GetRunIndex();
|
||||
|
||||
/**
|
||||
* Verify if output directory existing error is set
|
||||
* @returns OK or FAIL
|
||||
*/
|
||||
void ResetProgress();
|
||||
|
||||
void Enable(bool enable);
|
||||
int VerifyOutputDirectoryError();
|
||||
|
||||
/** The sls detector object */
|
||||
multiSlsDetector *myDet;
|
||||
/** The Plot widget */
|
||||
qDrawPlot *myPlot;
|
||||
/** detector type */
|
||||
slsDetectorDefs::detectorType detType;
|
||||
/** enum for the timing mode */
|
||||
enum{AUTO, TRIGGER, GATED, BURST_TRIGGER, NUM_TIMING_MODES};
|
||||
/** timer to update the progress*/
|
||||
// enum for the timing mode
|
||||
enum{
|
||||
AUTO,
|
||||
TRIGGER,
|
||||
GATED,
|
||||
BURST_TRIGGER,
|
||||
NUMTIMINGMODES
|
||||
};
|
||||
QTimer *progressTimer;
|
||||
/** tool tip variables*/
|
||||
//tool tip variables
|
||||
QString acqPeriodTip;
|
||||
QString errPeriodTip;
|
||||
QPalette red;
|
||||
/** to access items in settings combobox */
|
||||
QStandardItemModel* model;
|
||||
bool delayImplemented;
|
||||
bool sampleImplemented;
|
||||
|
||||
signals:
|
||||
void StartSignal();
|
||||
|
@ -1,91 +1,32 @@
|
||||
#pragma once
|
||||
|
||||
#include "qDefs.h"
|
||||
|
||||
#include "ui_form_tab_settings.h"
|
||||
|
||||
class multiSlsDetector;
|
||||
|
||||
/**
|
||||
*@short sets up the Settings parameters
|
||||
*/
|
||||
class qTabSettings: public QWidget, private Ui::TabSettingsObject{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
/**
|
||||
* The constructor
|
||||
* @param parent is the parent tab widget
|
||||
* @param detector is the detector returned from the detector tab
|
||||
*/
|
||||
qTabSettings(QWidget *parent, multiSlsDetector* detector);
|
||||
|
||||
/**
|
||||
* Destructor
|
||||
*/
|
||||
~qTabSettings();
|
||||
|
||||
/**
|
||||
* Refresh and update widgets
|
||||
*/
|
||||
void Refresh();
|
||||
|
||||
|
||||
private slots:
|
||||
/**
|
||||
* Set settings according to selection
|
||||
* @param index index of selection
|
||||
*/
|
||||
void SetSettings(int index);
|
||||
|
||||
/**
|
||||
* Set dynamic range if possible
|
||||
* @param index selection
|
||||
*/
|
||||
void SetDynamicRange(int index);
|
||||
|
||||
/**
|
||||
* Set threshold energy
|
||||
* @param index selection
|
||||
*/
|
||||
void SetThresholdEnergy(int index);
|
||||
|
||||
|
||||
private:
|
||||
|
||||
/**
|
||||
* Sets up the widget
|
||||
*/
|
||||
void SetupWidgetWindow();
|
||||
|
||||
/**
|
||||
* Sets up the detector settings
|
||||
*/
|
||||
void SetupDetectorSettings();
|
||||
|
||||
/**
|
||||
* Sets up all the slots and signals
|
||||
*/
|
||||
void Initialization();
|
||||
|
||||
/**
|
||||
* Get Settings
|
||||
*/
|
||||
void GetSettings();
|
||||
|
||||
/**
|
||||
* Gets the dynamic range and sets it on the gui
|
||||
*/
|
||||
void GetDynamicRange();
|
||||
|
||||
/**
|
||||
* Gets the threshold energy and update widget
|
||||
*/
|
||||
void GetThresholdEnergy();
|
||||
|
||||
/** The sls detector object */
|
||||
multiSlsDetector *myDet;
|
||||
|
||||
enum {
|
||||
STANDARD,
|
||||
FAST,
|
||||
@ -104,7 +45,6 @@ private:
|
||||
UNINITIALIZED,
|
||||
NUMSETTINGS
|
||||
};
|
||||
|
||||
enum {
|
||||
DYNAMICRANGE_32,
|
||||
DYNAMICRANGE_16,
|
||||
|
Reference in New Issue
Block a user