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-31 20:01:27 -04:00
|
|
|
#define MaxDetGroup 10
|
2023-03-23 16:36:47 -04:00
|
|
|
#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,
|
2023-03-31 20:01:27 -04:00
|
|
|
QStringList detGroupName,
|
|
|
|
std::vector<int> detGroupID,
|
2023-03-17 17:08:56 -04:00
|
|
|
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-31 20:01:27 -04:00
|
|
|
void CreateDetGroup(int SettingID, QList<int> detIDArray, 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;
|
2023-04-03 12:25:23 -04:00
|
|
|
QStringList detTypeNameList;
|
2023-03-31 20:01:27 -04:00
|
|
|
std::vector<int> nDetinType;
|
2023-03-17 17:08:56 -04:00
|
|
|
std::vector<int> detMaxID;
|
2023-04-03 12:25:23 -04:00
|
|
|
QStringList detGroupNameList;
|
2023-03-31 20:01:27 -04:00
|
|
|
std::vector<int> detGroupID;
|
|
|
|
std::vector<int> nDetinGroup;
|
2023-04-03 12:25:23 -04:00
|
|
|
QList<QList<int>> detIDArrayList; // 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-31 20:01:27 -04:00
|
|
|
int FindDetTypeID(int detID);
|
|
|
|
int FindDetGroup(int detID);
|
2023-03-22 18:16:26 -04:00
|
|
|
|
2023-03-24 17:23:59 -04:00
|
|
|
RSpinBox * sbCoinTime;
|
|
|
|
|
2023-03-31 20:01:27 -04:00
|
|
|
QCheckBox * chkAll[MaxDetGroup][MaxSettingItem]; // checkBox for all setting on that tab;
|
2023-03-27 12:46:03 -04:00
|
|
|
|
2023-03-31 20:01:27 -04:00
|
|
|
QGroupBox * groupBox[MaxDetGroup][MaxSettingItem][MaxDetID];
|
2023-03-24 19:23:36 -04:00
|
|
|
|
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-31 20:01:27 -04:00
|
|
|
RComboBox * cbTrigger[MaxDetGroup][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
|