FSUDAQ/boardSetting.h

179 lines
4.4 KiB
C
Raw Normal View History

2022-08-23 13:43:05 -04:00
#ifndef BOARD_SETTING_H
#define BOARD_SETTING_H
#include <TQObject.h>
#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 "DigitizerPHA.h"
#include "DigitizerPSD.h"
#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{
private:
TGMainFrame * fMain;
static Pixel_t red, blue;
static TGNumberEntry * boardIDEntry;
2022-08-23 13:43:05 -04:00
2022-08-24 17:50:21 -04:00
TGTextEntry * entry[NUM_BOARD_INFO];
2022-08-23 13:43:05 -04:00
int nDigi;
static Digitizer ** digi;
static DigitizerPHA * pha;
static DigitizerPSD * psd;
/// 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
/// ACQ control
TGComboBox * cbAcqMode;
TGCheckButton * bAcqArm;
TGComboBox * cbPLLref;
TGTextButton * bSWTrigger;
TGTextButton * bSWClockSync;
TGNumberEntry * numRunStartStopDelay;
/// ACQ Status
static TGTextEntry * txtACQStatus;
static TGTextEntry * txtACQEventReady;
static TGTextEntry * txtACQEventFull;
static TGTextEntry * txtACQClockSource;
static TGTextEntry * txtACQPLLLock;
static TGTextEntry * txtACQChDown;
static TGTextEntry * txtACQSIN;
static TGTextEntry * txtACQTRIGIN;
static TGTextEntry * txtACQBoardReady;
static TGTextEntry * txtACQTemp0;
static TGTextEntry * txtACQTemp1;
static TGTextEntry * txtACQTemp2;
static TGTextEntry * txtACQTemp3;
/// Trigger control
TGCheckButton * cbGbTRGMskCh[8];
TGCheckButton * cbTRGValMskCh[8];
TGCheckButton * cbTRGOUTMskCh[8];
2022-08-24 17:50:21 -04:00
TGNumberEntry * numMajorCoinWin;
TGComboBox * cbTRGMODE;
TGComboBox * cbTRGOUTMODE;
2022-08-24 17:50:21 -04:00
TGNumberEntry * GlbMajorLevel;
TGNumberEntry * TRGMajorLevel;
TGNumberEntry * TRGOUTMajorLevel;
TGCheckButton * bGLBExtTrigger;
TGCheckButton * bTRGExtTrigger;
TGCheckButton * bTRGOUTExtTrigger;
TGCheckButton * bGLBSoftwareTrigger;
TGCheckButton * bTRGSoftwareTrigger;
TGCheckButton * bTRGOUTSoftwareTrigger;
TGCheckButton * bTRGValMskLVSDGLB;
TGCheckButton * bTRGValMskLVSDLCL;
TGCheckButton * bEnableExtTRG;
TGNumberEntry * numExtendVetoDelay;
/// Front Panel IO Control
TGComboBox * cbLEMOIO;
TGComboBox * cbTRGOUTmode;
2022-09-21 16:05:51 -04:00
//TGCheckButton * bTRGOUTImp;
TGComboBox * cbTRGINCtrl;
TGComboBox * cbTRGINMezzanines;
TGComboBox * cbAnaMonitor;
TGNumberEntry * numBufferOccpGain;
/// Readout Control
TGComboBox * cbVMEInterrupLevel;
TGCheckButton * bOpticalLinkInterrupt;
TGCheckButton * bEventAligned;
TGCheckButton * bVMEAlogn64Mode;
TGCheckButton * bInteruptReleaseMode;
TGCheckButton * bEnableExtendedBlockTransfer;
/// Redaout Status
static TGTextEntry * txtEventReady;
static TGTextEntry * txtBusError;
static TGTextEntry * txtVMEFIFO;
TThread * readStatusThread;
2022-09-21 16:05:51 -04:00
static bool isOpened;
2022-08-23 13:43:05 -04:00
public:
BoardSetting(const TGWindow *p, UInt_t w, UInt_t h, Digitizer ** digi, int nBoard);
virtual ~BoardSetting();
2022-09-21 16:05:51 -04:00
bool IsOpen() {return isOpened;}
2022-08-23 13:43:05 -04:00
void CloseWindow() {
2022-09-21 16:05:51 -04:00
delete this;
}
2022-08-23 13:43:05 -04:00
void ChangeBoard();
static void * ReadStatus(void * ptr); /// thread.
2022-09-21 16:05:51 -04:00
///=== Button
void ResetSettingToDefault();
void ClearBuffer();
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-08-23 13:43:05 -04:00
};
#endif