2022-08-23 13:43:05 -04:00
|
|
|
#ifndef BOARD_SETTING_H
|
|
|
|
#define BOARD_SETTING_H
|
2022-09-22 16:26:33 -04:00
|
|
|
|
2022-08-23 13:43:05 -04:00
|
|
|
#include <TQObject.h>
|
2022-09-22 16:26:33 -04:00
|
|
|
#include <RQ_OBJECT.h>
|
2022-08-23 13:43:05 -04:00
|
|
|
#include <TGNumberEntry.h>
|
2022-08-24 17:50:21 -04:00
|
|
|
#include <TGButton.h>
|
2022-08-23 13:43:05 -04:00
|
|
|
#include <TGComboBox.h>
|
2022-09-20 15:15:52 -04:00
|
|
|
#include <TThread.h>
|
2022-08-23 13:43:05 -04:00
|
|
|
#include <TGLabel.h>
|
2022-10-03 14:17:15 -04:00
|
|
|
#include "ClassDigitizer.h"
|
2022-08-23 13:43:05 -04:00
|
|
|
#include "macro.h"
|
|
|
|
|
2022-08-24 17:50:21 -04:00
|
|
|
#define NUM_BOARD_INFO 9
|
2022-08-23 13:43:05 -04:00
|
|
|
|
|
|
|
class TGWindow;
|
|
|
|
class TGMainFrame;
|
|
|
|
|
|
|
|
class BoardSetting{
|
2022-09-22 16:26:33 -04:00
|
|
|
RQ_OBJECT("BoardSetting")
|
2022-08-23 13:43:05 -04:00
|
|
|
private:
|
|
|
|
TGMainFrame * fMain;
|
|
|
|
|
2022-09-26 16:47:20 -04:00
|
|
|
TGNumberEntry * boardIDEntry;
|
2022-08-23 13:43:05 -04:00
|
|
|
|
2022-08-24 17:50:21 -04:00
|
|
|
TGTextEntry * entry[NUM_BOARD_INFO];
|
2022-10-06 18:25:35 -04:00
|
|
|
|
|
|
|
TGTextEntry * txtSettingFile;
|
2022-08-23 13:43:05 -04:00
|
|
|
|
2022-09-16 17:53:57 -04:00
|
|
|
/// board failure status
|
|
|
|
TGTextEntry * enPLLStatus;
|
|
|
|
TGTextEntry * enTempStatus;
|
|
|
|
TGTextEntry * enADCPwrStatus;
|
|
|
|
|
|
|
|
/// board settings
|
|
|
|
TGCheckButton * bAutoDataFlush;
|
|
|
|
TGCheckButton * bDecimateWF;
|
|
|
|
TGCheckButton * bWFRecord;
|
|
|
|
TGCheckButton * bTrigPropa;
|
|
|
|
TGCheckButton * bExtrac2;
|
2022-08-24 17:50:21 -04:00
|
|
|
TGCheckButton * bDualTrace;
|
|
|
|
TGComboBox * cbAP1;
|
|
|
|
TGComboBox * cbAP2; /// for ComboBox for analog probe 2
|
2022-09-21 16:05:51 -04:00
|
|
|
TGComboBox * cbDP1;
|
|
|
|
TGComboBox * cbDP2;
|
2022-08-24 17:50:21 -04:00
|
|
|
TGComboBox * cbAggOrg;
|
|
|
|
TGNumberEntry * numAggBLT; /// number of Agg pre Block transfer
|
2022-09-16 17:53:57 -04:00
|
|
|
TGComboBox * cbFanCtrl;
|
2022-08-24 17:50:21 -04:00
|
|
|
|
2022-10-18 17:23:29 -04:00
|
|
|
TGTextEntry * txtBufferSize;
|
|
|
|
|
2022-09-16 17:53:57 -04:00
|
|
|
/// ACQ control
|
|
|
|
TGComboBox * cbAcqMode;
|
|
|
|
TGCheckButton * bAcqArm;
|
|
|
|
TGComboBox * cbPLLref;
|
|
|
|
|
2022-09-19 12:46:27 -04:00
|
|
|
TGTextButton * bSWTrigger;
|
|
|
|
TGTextButton * bSWClockSync;
|
|
|
|
TGNumberEntry * numRunStartStopDelay;
|
|
|
|
|
2022-09-20 15:15:52 -04:00
|
|
|
/// ACQ Status
|
2022-09-26 16:47:20 -04:00
|
|
|
TGTextEntry * txtACQStatus;
|
|
|
|
TGTextEntry * txtACQEventReady;
|
|
|
|
TGTextEntry * txtACQEventFull;
|
|
|
|
TGTextEntry * txtACQClockSource;
|
|
|
|
TGTextEntry * txtACQPLLLock;
|
|
|
|
TGTextEntry * txtACQChDown;
|
|
|
|
TGTextEntry * txtACQSIN;
|
|
|
|
TGTextEntry * txtACQTRIGIN;
|
|
|
|
TGTextEntry * txtACQBoardReady;
|
|
|
|
TGTextEntry * txtACQTemp0;
|
|
|
|
TGTextEntry * txtACQTemp1;
|
|
|
|
TGTextEntry * txtACQTemp2;
|
|
|
|
TGTextEntry * txtACQTemp3;
|
2022-09-20 15:15:52 -04:00
|
|
|
|
2022-09-16 17:53:57 -04:00
|
|
|
/// Trigger control
|
|
|
|
TGCheckButton * cbGbTRGMskCh[8];
|
2022-10-18 16:38:27 -04:00
|
|
|
TGCheckButton * cbTRGOUTMsk[8];
|
2022-09-16 17:53:57 -04:00
|
|
|
|
2022-08-24 17:50:21 -04:00
|
|
|
TGNumberEntry * numMajorCoinWin;
|
2022-10-18 16:38:27 -04:00
|
|
|
TGComboBox * cbTRGOUTMode;
|
2022-09-16 17:53:57 -04:00
|
|
|
|
2022-08-24 17:50:21 -04:00
|
|
|
TGNumberEntry * GlbMajorLevel;
|
|
|
|
TGNumberEntry * TRGOUTMajorLevel;
|
|
|
|
|
2022-09-16 17:53:57 -04:00
|
|
|
TGCheckButton * bGLBExtTrigger;
|
|
|
|
TGCheckButton * bTRGOUTExtTrigger;
|
|
|
|
|
|
|
|
TGCheckButton * bGLBSoftwareTrigger;
|
|
|
|
TGCheckButton * bTRGOUTSoftwareTrigger;
|
|
|
|
|
2022-10-18 16:38:27 -04:00
|
|
|
//TGCheckButton * bTRGValMskLVSDGLB;
|
|
|
|
//TGCheckButton * bTRGValMskLVSDLCL;
|
2022-09-16 17:53:57 -04:00
|
|
|
TGCheckButton * bEnableExtTRG;
|
2022-10-26 14:55:06 -04:00
|
|
|
//TGNumberEntry * numExtendVetoDelay;
|
2022-09-16 17:53:57 -04:00
|
|
|
|
2022-10-18 16:38:27 -04:00
|
|
|
/// Trigger Validation Mask
|
|
|
|
TGCheckButton * cbTRGValMskCh[8][8];
|
|
|
|
TGComboBox * cbTRGValMODE[8];
|
|
|
|
TGNumberEntry * TRGValMajorLevel[8];
|
|
|
|
TGCheckButton * bTRGValExtTrigger[8];
|
|
|
|
TGCheckButton * bTRGValSoftwareTrigger[8];
|
|
|
|
|
2022-09-16 17:53:57 -04:00
|
|
|
/// Front Panel IO Control
|
|
|
|
TGComboBox * cbLEMOIO;
|
2022-10-18 16:38:27 -04:00
|
|
|
TGComboBox * cbTRGOUTMODE2;
|
2022-09-16 17:53:57 -04:00
|
|
|
TGComboBox * cbTRGINCtrl;
|
|
|
|
TGComboBox * cbTRGINMezzanines;
|
|
|
|
TGComboBox * cbAnaMonitor;
|
|
|
|
TGNumberEntry * numBufferOccpGain;
|
2022-09-20 15:15:52 -04:00
|
|
|
|
|
|
|
/// Readout Control
|
|
|
|
TGComboBox * cbVMEInterrupLevel;
|
|
|
|
TGCheckButton * bOpticalLinkInterrupt;
|
|
|
|
TGCheckButton * bEventAligned;
|
|
|
|
TGCheckButton * bVMEAlogn64Mode;
|
|
|
|
TGCheckButton * bInteruptReleaseMode;
|
|
|
|
TGCheckButton * bEnableExtendedBlockTransfer;
|
|
|
|
|
|
|
|
/// Redaout Status
|
2022-09-26 16:47:20 -04:00
|
|
|
TGTextEntry * txtEventReady;
|
|
|
|
TGTextEntry * txtBusError;
|
|
|
|
TGTextEntry * txtVMEFIFO;
|
|
|
|
|
2022-08-23 13:43:05 -04:00
|
|
|
public:
|
2022-10-26 13:23:21 -04:00
|
|
|
BoardSetting(const TGWindow *p, UInt_t w, UInt_t h);
|
2022-08-23 13:43:05 -04:00
|
|
|
virtual ~BoardSetting();
|
2022-09-21 16:05:51 -04:00
|
|
|
|
2022-11-01 18:38:01 -04:00
|
|
|
static bool isOpened;
|
|
|
|
|
2022-09-22 16:26:33 -04:00
|
|
|
void CloseWindow() { delete this;}
|
|
|
|
void ChangeBoard();
|
2022-09-21 16:05:51 -04:00
|
|
|
|
2022-10-07 17:03:27 -04:00
|
|
|
void DisableEdit();
|
|
|
|
void EnableEdit();
|
2022-09-26 16:47:20 -04:00
|
|
|
|
|
|
|
void ReadStatus();
|
|
|
|
|
2022-09-21 16:05:51 -04:00
|
|
|
///=== Button
|
|
|
|
void ResetSettingToDefault();
|
|
|
|
void ClearBuffer();
|
2022-09-23 17:43:30 -04:00
|
|
|
void OpenChannelSetting();
|
|
|
|
|
2022-08-24 17:50:21 -04:00
|
|
|
///=== Board Configure
|
2022-09-21 16:05:51 -04:00
|
|
|
void SetBoardConfiguration();
|
2022-08-24 17:50:21 -04:00
|
|
|
|
|
|
|
void SetAggregateOrganization();
|
|
|
|
void SetReadOutAggregate();
|
2022-09-21 16:05:51 -04:00
|
|
|
void SetFanSpeedControl();
|
2022-09-16 17:53:57 -04:00
|
|
|
|
2022-09-21 16:05:51 -04:00
|
|
|
///=== ACQ Control
|
|
|
|
void SetACQControl();
|
|
|
|
|
|
|
|
void SendSoftwareTriggerSignal();
|
|
|
|
void SendSoftwareClockSyncSignal();
|
|
|
|
void SetRunStartStopDelay();
|
|
|
|
|
|
|
|
///==== Trigger
|
|
|
|
void SetGlobalTriggerMask();
|
|
|
|
void SetTriggerValidMask();
|
|
|
|
void SetTRGOUTMask();
|
|
|
|
|
|
|
|
void SetEnableExternalTrigger();
|
|
|
|
void SetExtendedVetoDelay();
|
|
|
|
|
|
|
|
///==== FrontPanelIO
|
|
|
|
void SetFrontPanelIO();
|
2022-09-16 17:53:57 -04:00
|
|
|
void SetAnalogMonitorMode();
|
2022-08-24 17:50:21 -04:00
|
|
|
|
2022-09-21 16:05:51 -04:00
|
|
|
///==== Readout Control
|
|
|
|
void SetReadOutControl();
|
|
|
|
|
2022-09-23 17:43:30 -04:00
|
|
|
///==== Others
|
2022-09-23 12:36:31 -04:00
|
|
|
void LogMsg(TString msg); // *SIGNAL*
|
2022-10-18 17:23:29 -04:00
|
|
|
/// Haha is for sending signal to mainwindow to open channel setting for the board
|
|
|
|
void Haha(Int_t boardID); // *SIGNAL*
|
|
|
|
/// this send signal to MainWindows, and tell channel setting to update
|
|
|
|
//TODO to merge to LogMsg
|
|
|
|
void TellChannelSettingtoUpdate(); // *SIGNAL*
|
2022-09-27 17:58:14 -04:00
|
|
|
|
|
|
|
void ReadData();
|
2022-10-06 17:10:54 -04:00
|
|
|
void ProgramDefaultBoard();
|
2022-10-06 18:25:35 -04:00
|
|
|
void ProgramBoardFromFile();
|
2022-10-07 16:15:58 -04:00
|
|
|
void SaveSettingFile();
|
2022-10-26 13:23:21 -04:00
|
|
|
void CaliADC();
|
2022-10-18 17:23:29 -04:00
|
|
|
|
|
|
|
void FillBufferSizeTextBox();
|
2022-08-23 13:43:05 -04:00
|
|
|
};
|
|
|
|
#endif
|