FSUDAQ/boardSetting.h

192 lines
4.7 KiB
C
Raw Normal View History

2022-08-23 13:43:05 -04:00
#ifndef BOARD_SETTING_H
#define BOARD_SETTING_H
2022-08-23 13:43:05 -04:00
#include <TQObject.h>
#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>
#include <TThread.h>
2022-08-23 13:43:05 -04:00
#include <TGLabel.h>
#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{
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];
TGTextEntry * txtSettingFile;
2022-08-23 13:43:05 -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
TGComboBox * cbFanCtrl;
2022-08-24 17:50:21 -04:00
TGTextEntry * txtBufferSize;
/// ACQ control
TGComboBox * cbAcqMode;
TGCheckButton * bAcqArm;
TGComboBox * cbPLLref;
TGTextButton * bSWTrigger;
TGTextButton * bSWClockSync;
TGNumberEntry * numRunStartStopDelay;
/// 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;
/// Trigger control
TGCheckButton * cbGbTRGMskCh[8];
2022-10-18 16:38:27 -04:00
TGCheckButton * cbTRGOUTMsk[8];
2022-08-24 17:50:21 -04:00
TGNumberEntry * numMajorCoinWin;
2022-10-18 16:38:27 -04:00
TGComboBox * cbTRGOUTMode;
2022-08-24 17:50:21 -04:00
TGNumberEntry * GlbMajorLevel;
TGNumberEntry * TRGOUTMajorLevel;
TGCheckButton * bGLBExtTrigger;
TGCheckButton * bTRGOUTExtTrigger;
TGCheckButton * bGLBSoftwareTrigger;
TGCheckButton * bTRGOUTSoftwareTrigger;
2022-10-18 16:38:27 -04:00
//TGCheckButton * bTRGValMskLVSDGLB;
//TGCheckButton * bTRGValMskLVSDLCL;
TGCheckButton * bEnableExtTRG;
2022-10-26 14:55:06 -04:00
//TGNumberEntry * numExtendVetoDelay;
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];
/// Front Panel IO Control
TGComboBox * cbLEMOIO;
2022-10-18 16:38:27 -04:00
TGComboBox * cbTRGOUTMODE2;
TGComboBox * cbTRGINCtrl;
TGComboBox * cbTRGINMezzanines;
TGComboBox * cbAnaMonitor;
TGNumberEntry * numBufferOccpGain;
/// 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;
bool isOpened;
2022-08-23 13:43:05 -04:00
public:
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
bool IsOpen() {return isOpened;}
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-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();
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*
/// 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*
void ReadData();
void ProgramDefaultBoard();
void ProgramBoardFromFile();
2022-10-07 16:15:58 -04:00
void SaveSettingFile();
void CaliADC();
void FillBufferSizeTextBox();
2022-08-23 13:43:05 -04:00
};
#endif