2023-03-17 17:08:56 -04:00
|
|
|
#ifndef SOLARIS_PANEL_H
|
|
|
|
#define SOLARIS_PANEL_H
|
|
|
|
|
|
|
|
#include <QWidget>
|
|
|
|
#include <QLineEdit>
|
|
|
|
#include <QSpinBox>
|
|
|
|
#include <QDoubleSpinBox>
|
|
|
|
#include <QGridLayout>
|
|
|
|
#include <QScrollArea>
|
|
|
|
#include <QTabWidget>
|
|
|
|
#include <QGroupBox>
|
|
|
|
#include <QRadioButton>
|
|
|
|
#include <QCheckBox>
|
|
|
|
#include <QComboBox>
|
|
|
|
#include <QTableWidget>
|
|
|
|
#include <QDebug>
|
|
|
|
#include <QPushButton>
|
|
|
|
#include <QFrame>
|
|
|
|
#include <QSignalMapper>
|
|
|
|
|
|
|
|
#include "ClassDigitizer2Gen.h"
|
|
|
|
#include "CustomWidgets.h"
|
|
|
|
#include "macro.h"
|
|
|
|
|
2023-03-23 16:36:47 -04:00
|
|
|
#define MaxDetType 10
|
|
|
|
#define MaxDetID 60
|
2023-03-24 17:23:59 -04:00
|
|
|
#define MaxSettingItem 3
|
2023-03-23 16:36:47 -04:00
|
|
|
|
2023-03-17 17:08:56 -04:00
|
|
|
class SOLARISpanel : public QWidget{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
SOLARISpanel(Digitizer2Gen ** digi,
|
|
|
|
unsigned short nDigi,
|
2023-03-27 15:48:41 -04:00
|
|
|
QString analysisPath,
|
2023-03-17 17:08:56 -04:00
|
|
|
std::vector<std::vector<int>> mapping,
|
|
|
|
QStringList detType,
|
|
|
|
std::vector<int> detMaxID,
|
|
|
|
QWidget * parent = nullptr);
|
|
|
|
~SOLARISpanel();
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
|
2023-03-23 19:57:14 -04:00
|
|
|
void RefreshSettings();
|
|
|
|
void SaveSettings();
|
|
|
|
void LoadSettings();
|
2023-03-20 15:52:04 -04:00
|
|
|
|
|
|
|
public slots:
|
|
|
|
void UpdateThreshold();
|
2023-03-24 17:23:59 -04:00
|
|
|
void UpdatePanelFromMemory();
|
2023-03-17 17:08:56 -04:00
|
|
|
|
|
|
|
signals:
|
2023-03-24 17:23:59 -04:00
|
|
|
|
2023-03-23 16:36:47 -04:00
|
|
|
void UpdateOtherPanels();
|
2023-03-20 15:52:04 -04:00
|
|
|
void SendLogMsg(const QString str);
|
2023-03-17 17:08:56 -04:00
|
|
|
|
|
|
|
private:
|
2023-03-24 19:23:36 -04:00
|
|
|
void CreateDetGroup(int detTypeID, int SettingID, QList<int> detID, QGridLayout * &layout, int row, int col);
|
2023-03-17 17:08:56 -04:00
|
|
|
|
|
|
|
Digitizer2Gen ** digi;
|
|
|
|
unsigned short nDigi;
|
|
|
|
std::vector<std::vector<int>> mapping;
|
|
|
|
QStringList detType;
|
2023-03-23 16:36:47 -04:00
|
|
|
std::vector<int> nDet; // number of distgish detector
|
2023-03-17 17:08:56 -04:00
|
|
|
std::vector<int> detMaxID;
|
2023-03-20 19:53:47 -04:00
|
|
|
QList<QList<int>> detIDList; // 1-D array of { detID, (Digi << 8 ) + ch}
|
2023-03-20 15:52:04 -04:00
|
|
|
|
2023-03-27 15:48:41 -04:00
|
|
|
QString digiSettingPath;
|
|
|
|
|
2023-03-27 12:46:03 -04:00
|
|
|
int FindDetTypeID(QList<int> detIDListElement);
|
2023-03-22 18:16:26 -04:00
|
|
|
|
2023-03-24 17:23:59 -04:00
|
|
|
RSpinBox * sbCoinTime;
|
|
|
|
|
2023-03-24 19:23:36 -04:00
|
|
|
QCheckBox * chkAll[MaxDetType][MaxSettingItem]; // checkBox for all setting on that tab;
|
2023-03-27 12:46:03 -04:00
|
|
|
|
2023-03-24 19:23:36 -04:00
|
|
|
QGroupBox * groupBox[MaxDetType][MaxSettingItem][MaxDetID];
|
|
|
|
|
2023-03-23 16:36:47 -04:00
|
|
|
QLineEdit * leDisplay[MaxSettingItem][MaxNumberOfDigitizer][MaxNumberOfChannel]; // [SettingID][DigiID][ChID]
|
|
|
|
RSpinBox * sbSetting[MaxSettingItem][MaxNumberOfDigitizer][MaxNumberOfChannel];
|
|
|
|
QCheckBox * chkOnOff[MaxSettingItem][MaxNumberOfDigitizer][MaxNumberOfChannel];
|
2023-03-20 19:53:47 -04:00
|
|
|
|
2023-03-23 16:36:47 -04:00
|
|
|
RComboBox * cbTrigger[MaxDetType][MaxDetID]; //[detTypeID][detID] for array only
|
2023-03-20 15:52:04 -04:00
|
|
|
|
|
|
|
bool enableSignalSlot;
|
|
|
|
|
2023-03-17 17:08:56 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|