2022-08-23 13:43:05 -04:00
|
|
|
#include <TApplication.h>
|
|
|
|
#include <TGClient.h>
|
|
|
|
#include <TCanvas.h>
|
|
|
|
#include <TF1.h>
|
|
|
|
#include <TRandom.h>
|
|
|
|
#include <TRootEmbeddedCanvas.h>
|
|
|
|
#include <TGTableContainer.h>
|
|
|
|
#include <TGFileDialog.h>
|
2022-08-24 17:50:21 -04:00
|
|
|
|
2022-08-23 13:43:05 -04:00
|
|
|
#include "boardSetting.h"
|
|
|
|
|
2022-08-24 17:50:21 -04:00
|
|
|
TString boardSettingName[NUM_BOARD_INFO] = { "Model",
|
2022-08-23 13:43:05 -04:00
|
|
|
"Board Info",
|
|
|
|
"Link Type",
|
|
|
|
"Serial Number",
|
|
|
|
"Number of channels",
|
|
|
|
"Sampling rate",
|
|
|
|
"ADC bit",
|
|
|
|
"ROC version",
|
2022-08-24 17:50:21 -04:00
|
|
|
"AMC version"
|
|
|
|
};
|
|
|
|
|
|
|
|
///"Acquisition Status",
|
|
|
|
|
2022-08-23 13:43:05 -04:00
|
|
|
|
2022-08-24 17:50:21 -04:00
|
|
|
///"Channel Enable Mask", ( at channalSetting)
|
|
|
|
///"Board Config", OK
|
|
|
|
///"Aggregate Organization", OK
|
|
|
|
///"Max Num. Of Aggregate Per Block Transfer", OK
|
|
|
|
|
|
|
|
///"Acquisition Control",
|
|
|
|
|
|
|
|
///"Global Trigger Mask",
|
|
|
|
///"Trigger Validation Mask",
|
|
|
|
///"Front Panel TRG-OUT Enable Mask",
|
|
|
|
///"Disable External Trigger",
|
|
|
|
///"Extended Veto Delay",
|
|
|
|
|
|
|
|
|
|
|
|
///"Front Panel IO Control",
|
|
|
|
///"Front Panel LVDS IO New Features",
|
|
|
|
///"LVDS IO Data",
|
|
|
|
///"AnalogMonitor Mode",
|
|
|
|
///"FanSpeed Control",
|
|
|
|
///"Readout Control",
|
|
|
|
///"Readout Status"
|
2022-08-23 13:43:05 -04:00
|
|
|
|
|
|
|
BoardSetting::BoardSetting(const TGWindow *p, UInt_t w, UInt_t h, Digitizer ** digi, int nBoard){
|
|
|
|
|
|
|
|
this->digi = digi;
|
|
|
|
|
|
|
|
fMain = new TGMainFrame(p,w,h);
|
|
|
|
fMain->SetWindowName("Board Settings ");
|
|
|
|
fMain->Connect("CloseWindow()", "BoardSetting", this, "CloseWindow()");
|
|
|
|
|
2022-08-24 17:50:21 -04:00
|
|
|
TGVerticalFrame * vframe = new TGVerticalFrame(fMain); fMain->AddFrame(vframe, new TGLayoutHints(kLHintsCenterX, 2,2,2,2));
|
2022-08-23 13:43:05 -04:00
|
|
|
|
|
|
|
|
|
|
|
///==========Module choose
|
2022-08-24 17:50:21 -04:00
|
|
|
TGHorizontalFrame *hframe0 = new TGHorizontalFrame(vframe, w, 50 ); vframe->AddFrame(hframe0, new TGLayoutHints(kLHintsCenterX, 2,2,2,2));
|
|
|
|
|
|
|
|
TGLabel * lb0 = new TGLabel(hframe0, "Board ID :"); hframe0->AddFrame(lb0, new TGLayoutHints(kLHintsCenterX | kLHintsCenterY, 5, 5, 3, 4));
|
|
|
|
boardIDEntry = new TGNumberEntry(hframe0, 0, 0, 0, TGNumberFormat::kNESInteger, TGNumberFormat::kNEANonNegative);
|
|
|
|
hframe0->AddFrame(boardIDEntry, new TGLayoutHints(kLHintsCenterX , 5, 5, 3, 4));
|
2022-08-23 13:43:05 -04:00
|
|
|
|
|
|
|
boardIDEntry->SetWidth(50);
|
|
|
|
boardIDEntry->SetLimits(TGNumberFormat::kNELLimitMinMax, 0, nBoard);
|
|
|
|
boardIDEntry->Connect("Modified()", "BoardSetting", this, "ChangeBoard()");
|
|
|
|
if( nBoard <= 1 ) boardIDEntry->SetState(false);
|
2022-08-24 17:50:21 -04:00
|
|
|
|
|
|
|
int boardID = boardIDEntry->GetNumber();
|
2022-08-23 13:43:05 -04:00
|
|
|
|
|
|
|
|
2022-08-24 17:50:21 -04:00
|
|
|
///============ fixed info
|
|
|
|
TGHorizontalFrame * hframeInfo = new TGHorizontalFrame(vframe); vframe->AddFrame(hframeInfo);
|
2022-08-23 13:43:05 -04:00
|
|
|
|
2022-08-24 17:50:21 -04:00
|
|
|
int numCol = 3;
|
|
|
|
TGVerticalFrame * vframeInfo[numCol];
|
|
|
|
for( int i = 0; i < numCol ; i++) {
|
|
|
|
vframeInfo[i] = new TGVerticalFrame(hframeInfo); hframeInfo->AddFrame(vframeInfo[i]);
|
|
|
|
}
|
|
|
|
|
|
|
|
TGHorizontalFrame *hframe[NUM_BOARD_INFO];
|
|
|
|
TGLabel * lb[NUM_BOARD_INFO];
|
|
|
|
for( int i = 0 ; i < NUM_BOARD_INFO; i++){
|
|
|
|
hframe[i] = new TGHorizontalFrame(vframeInfo[i%3], 50, 50 ); vframeInfo[i%3]->AddFrame(hframe[i], new TGLayoutHints(kLHintsRight, 2,2,2,2));
|
|
|
|
|
2022-08-23 13:43:05 -04:00
|
|
|
//int temp = digi[0]->GetSerialNumber();
|
|
|
|
int temp = 0;
|
|
|
|
|
|
|
|
lb[i] = new TGLabel(hframe[i], boardSettingName[i]);
|
|
|
|
hframe[i]->AddFrame(lb[i], new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 5, 5, 3, 4));
|
|
|
|
|
|
|
|
entry[i] = new TGTextEntry(hframe[i], new TGTextBuffer(1));
|
|
|
|
entry[i]->SetEnabled(false);
|
|
|
|
entry[i]->SetText( Form("0x%x", temp) );
|
|
|
|
hframe[i]->AddFrame(entry[i], new TGLayoutHints(kLHintsRight, 5,5,3,4));
|
2022-08-24 17:50:21 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
///========= Board Configure
|
|
|
|
|
|
|
|
TGGroupFrame * gBdCfg = new TGGroupFrame(vframe, "Board Configure", kHorizontalFrame); vframe->AddFrame(gBdCfg );
|
|
|
|
TGVerticalFrame * vBdCfg = new TGVerticalFrame(gBdCfg); gBdCfg->AddFrame(vBdCfg);
|
|
|
|
|
|
|
|
TGHorizontalFrame * hframeBdCfg1 = new TGHorizontalFrame(vBdCfg); vBdCfg->AddFrame(hframeBdCfg1, new TGLayoutHints(kLHintsCenterY, 2,2,2,2));
|
|
|
|
TGHorizontalFrame * hframeBdCfg2 = new TGHorizontalFrame(vBdCfg); vBdCfg->AddFrame(hframeBdCfg2, new TGLayoutHints(kLHintsCenterY, 2,2,2,2));
|
|
|
|
|
|
|
|
TGCheckButton * bAutoDataFlush = new TGCheckButton(hframeBdCfg1, "Auto Data Flush", 1); hframeBdCfg1->AddFrame(bAutoDataFlush);
|
|
|
|
bAutoDataFlush->SetState(kButtonDown);
|
|
|
|
bAutoDataFlush->Connect("Clicked()", "BoardSetting", this, "SetAutoDataFlush()");
|
|
|
|
|
|
|
|
TGCheckButton * bDecimateWF = new TGCheckButton(hframeBdCfg1, "Decimate WaveForm", 1); hframeBdCfg1->AddFrame(bDecimateWF);
|
|
|
|
bDecimateWF->SetState(kButtonUp);
|
|
|
|
bDecimateWF->Connect("Clicked()", "BoardSetting", this, "SetDecimateWF()");
|
|
|
|
|
|
|
|
TGCheckButton * bWFRecord = new TGCheckButton(hframeBdCfg1, "Record WaveFrom", 1); hframeBdCfg1->AddFrame(bWFRecord);
|
|
|
|
bWFRecord->SetState(kButtonDown);
|
|
|
|
bWFRecord->Connect("Clicked()", "BoardSetting", this, "SetWaveFormRecord()");
|
|
|
|
|
|
|
|
TGCheckButton * bTrigPropa = new TGCheckButton(hframeBdCfg1, "Trigger Propagation (coincidence) ", 1); hframeBdCfg1->AddFrame(bTrigPropa);
|
|
|
|
bTrigPropa->SetState(kButtonUp);
|
|
|
|
bTrigPropa->Connect("Clicked()", "BoardSetting", this, "SetTriggerPropagation()");
|
|
|
|
|
|
|
|
TGCheckButton * bExtrac2 = new TGCheckButton(hframeBdCfg1, "Enable Extra2 word", 1); hframeBdCfg1->AddFrame(bExtrac2);
|
|
|
|
bExtrac2->SetState(kButtonDown);
|
|
|
|
bExtrac2->Connect("Clicked()", "BoardSetting", this, "SetEnableExtra2()");
|
|
|
|
|
|
|
|
bDualTrace = new TGCheckButton(hframeBdCfg2, "Dual Trace", 1); hframeBdCfg2->AddFrame(bDualTrace);
|
|
|
|
bDualTrace->SetState(kButtonUp);
|
|
|
|
bDualTrace->Connect("Clicked()", "BoardSetting", this, "SetDualTrace()");
|
|
|
|
|
|
|
|
TGLabel * lbAP1 = new TGLabel(hframeBdCfg2, "Ana. Prb. 1"); hframeBdCfg2->AddFrame(lbAP1, new TGLayoutHints(kLHintsLeft , 5, 5, 3, 4));
|
|
|
|
cbAP1 = new TGComboBox(hframeBdCfg2, "Ana. Pb. 1", 1); hframeBdCfg2->AddFrame(cbAP1);
|
|
|
|
cbAP1->EnableTextInput(false);
|
|
|
|
cbAP1->AddEntry("Input", 0);
|
|
|
|
cbAP1->AddEntry("RC-CR (1st derivative)", 1);
|
|
|
|
cbAP1->AddEntry("RC-CR2 (2st derivative)", 2);
|
|
|
|
cbAP1->AddEntry("Trapezoid", 3);
|
|
|
|
cbAP1->Resize(150, 20);
|
|
|
|
cbAP1->Select(0);
|
|
|
|
cbAP1->Connect("Changed()", "BoardSetting", this, "SetAnalogProbe1()");
|
|
|
|
|
|
|
|
|
|
|
|
TGLabel * lbAP2 = new TGLabel(hframeBdCfg2, "Ana. Prb. 2"); hframeBdCfg2->AddFrame(lbAP2, new TGLayoutHints(kLHintsLeft , 5, 5, 3, 4));
|
|
|
|
cbAP2 = new TGComboBox(hframeBdCfg2, "Ana. Pb. 2", 1); hframeBdCfg2->AddFrame(cbAP2);
|
|
|
|
cbAP2->EnableTextInput(false);
|
|
|
|
cbAP2->AddEntry("Input", 0);
|
|
|
|
cbAP2->AddEntry("Threshold", 1);
|
|
|
|
cbAP2->AddEntry("Trapezoid - Baseline", 2);
|
|
|
|
cbAP2->AddEntry("Baseline", 3);
|
|
|
|
cbAP2->Resize(150, 20);
|
|
|
|
cbAP2->Select(0);
|
|
|
|
cbAP2->SetEnabled(false);
|
|
|
|
cbAP2->Connect("Changed()", "BoardSetting", this, "SetAnalogProbe2()");
|
2022-08-23 13:43:05 -04:00
|
|
|
|
2022-08-24 17:50:21 -04:00
|
|
|
TGLabel * lbDP = new TGLabel(hframeBdCfg2, "Digi. Prb. "); hframeBdCfg2->AddFrame(lbDP, new TGLayoutHints(kLHintsLeft , 5, 5, 3, 4));
|
|
|
|
cbDP = new TGComboBox(hframeBdCfg2, "Digital. Pb.", 1); hframeBdCfg2->AddFrame(cbDP);
|
|
|
|
cbDP->EnableTextInput(false);
|
|
|
|
cbDP->AddEntry("Peaking", 0);
|
|
|
|
cbDP->AddEntry("Armed (Triggered)", 1);
|
|
|
|
cbDP->AddEntry("Peak Run", 2);
|
|
|
|
cbDP->AddEntry("Pile-Up", 3);
|
|
|
|
cbDP->AddEntry("Peaking", 4);
|
|
|
|
cbDP->AddEntry("TRG Validation Win.", 5);
|
|
|
|
cbDP->AddEntry("Baseline freeze", 6);
|
|
|
|
cbDP->AddEntry("TRG holdoff", 7);
|
|
|
|
cbDP->AddEntry("TRG Validation", 8);
|
|
|
|
cbDP->AddEntry("ACQ busy", 9);
|
|
|
|
cbDP->AddEntry("Zero Cross", 10);
|
|
|
|
cbDP->AddEntry("Ext. TRG", 11);
|
|
|
|
cbDP->AddEntry("Memory full", 12);
|
|
|
|
cbDP->Resize(150, 20);
|
|
|
|
cbDP->Select(0);
|
|
|
|
cbDP->Connect("Changed()", "BoardSetting", this, "SetDigitalProbe()");
|
|
|
|
|
|
|
|
TGHorizontalFrame * hframeBdCfg3 = new TGHorizontalFrame(vBdCfg); vBdCfg->AddFrame(hframeBdCfg3, new TGLayoutHints(kLHintsCenterY, 2,2,2,2));
|
|
|
|
TGLabel * lbAggOrg = new TGLabel(hframeBdCfg3, "Aggregate Organization"); hframeBdCfg3->AddFrame(lbAggOrg, new TGLayoutHints(kLHintsLeft , 5, 5, 3, 4));
|
|
|
|
cbAggOrg = new TGComboBox(hframeBdCfg3, "Aggregate Organization", 1); hframeBdCfg3->AddFrame(cbAggOrg);
|
|
|
|
cbAggOrg->EnableTextInput(false);
|
|
|
|
cbAggOrg->AddEntry("Not used", 0);
|
|
|
|
cbAggOrg->AddEntry("4", 2);
|
|
|
|
cbAggOrg->AddEntry("8", 3);
|
|
|
|
cbAggOrg->AddEntry("16", 4);
|
|
|
|
cbAggOrg->AddEntry("32", 5);
|
|
|
|
cbAggOrg->AddEntry("64", 6);
|
|
|
|
cbAggOrg->AddEntry("128", 7);
|
|
|
|
cbAggOrg->AddEntry("256", 8);
|
|
|
|
cbAggOrg->AddEntry("512", 9);
|
|
|
|
cbAggOrg->AddEntry("1024", 10);
|
|
|
|
cbAggOrg->Resize(150, 20);
|
|
|
|
cbAggOrg->Select(0);
|
|
|
|
cbAggOrg->Connect("Changed()", "BoardSetting", this, "SetAggregateOrganization()");
|
|
|
|
|
|
|
|
TGLabel * lbAggBLT = new TGLabel(hframeBdCfg3, "Aggregate pre Readout"); hframeBdCfg3->AddFrame(lbAggBLT, new TGLayoutHints(kLHintsLeft , 5, 5, 3, 4));
|
|
|
|
numAggBLT = new TGNumberEntry(hframeBdCfg3, 0, 0, 0, TGNumberFormat::kNESInteger, TGNumberFormat::kNEANonNegative); hframeBdCfg3->AddFrame(numAggBLT);
|
|
|
|
numAggBLT->SetWidth(60);
|
|
|
|
numAggBLT->SetLimits(TGNumberFormat::kNELLimitMinMax, 0, 0x3FF);
|
|
|
|
numAggBLT->Connect("Modified()", "BoardSetting", this, "SetReadOutAggregate()");
|
|
|
|
|
|
|
|
///========= Trigger Configure
|
|
|
|
TGGroupFrame * gTRGCfg = new TGGroupFrame(vframe, "Trigger Configure", kHorizontalFrame); vframe->AddFrame(gTRGCfg );
|
|
|
|
TGVerticalFrame * vTRGCfg = new TGVerticalFrame(gTRGCfg); gTRGCfg->AddFrame(vTRGCfg);
|
|
|
|
|
|
|
|
|
|
|
|
///"Global Trigger Mask",
|
|
|
|
TGHorizontalFrame * hframeGbTRGMsk = new TGHorizontalFrame(vTRGCfg); vTRGCfg->AddFrame(hframeGbTRGMsk, new TGLayoutHints(kLHintsCenterY, 2,2,2,2));
|
|
|
|
TGVerticalFrame * vGbTRGMskCh0 = new TGVerticalFrame(hframeGbTRGMsk); hframeGbTRGMsk->AddFrame(vGbTRGMskCh0, new TGLayoutHints(kLHintsCenterX , 5, 5, 3, 4));
|
|
|
|
|
|
|
|
TGLabel * lbdummy0 = new TGLabel(vGbTRGMskCh0, "");
|
|
|
|
vGbTRGMskCh0->AddFrame(lbdummy0, new TGLayoutHints(kLHintsLeft | kLHintsCenterY , 5, 5, 3, 4));
|
|
|
|
vGbTRGMskCh0->AddFrame(lbdummy0, new TGLayoutHints(kLHintsLeft | kLHintsCenterY , 5, 5, 3, 4));
|
|
|
|
TGLabel * lbGbTRGMsk = new TGLabel(vGbTRGMskCh0, "Global Trigger Mask"); vGbTRGMskCh0->AddFrame(lbGbTRGMsk, new TGLayoutHints(kLHintsRight | kLHintsCenterY , 5, 5, 3, 4));
|
|
|
|
|
|
|
|
TGVerticalFrame * vGbTRGMskCh[8];
|
|
|
|
TGLabel * lbGbTRGMskCh0[8];
|
|
|
|
TGLabel * lbGbTRGMskCh1[8];
|
|
|
|
TGCheckButton * cbGbTRGMskCh[8];
|
|
|
|
|
|
|
|
for( int i = 0; i < 8; i++){
|
|
|
|
vGbTRGMskCh[i] = new TGVerticalFrame(hframeGbTRGMsk); hframeGbTRGMsk->AddFrame(vGbTRGMskCh[i], new TGLayoutHints(kLHintsCenterX , 5, 5, 3, 4));
|
|
|
|
|
|
|
|
lbGbTRGMskCh0[i] = new TGLabel(vGbTRGMskCh[i], Form("%d", 2*i)); vGbTRGMskCh[i]->AddFrame(lbGbTRGMskCh0[i], new TGLayoutHints(kLHintsCenterX , 5, 5, 3, 4));
|
|
|
|
lbGbTRGMskCh1[i] = new TGLabel(vGbTRGMskCh[i], Form("%d", 2*i+1)); vGbTRGMskCh[i]->AddFrame(lbGbTRGMskCh1[i], new TGLayoutHints(kLHintsCenterX , 5, 5, 3, 4));
|
|
|
|
cbGbTRGMskCh[i] = new TGCheckButton(vGbTRGMskCh[i], ""); vGbTRGMskCh[i]->AddFrame(cbGbTRGMskCh[i], new TGLayoutHints(kLHintsCenterX , 5, 5, 3, 4));
|
|
|
|
}
|
|
|
|
|
|
|
|
///"Trigger Validation Mask",
|
|
|
|
TGLabel * lbTRGValMsk = new TGLabel(vGbTRGMskCh0, "Trigger Validation Mask"); vGbTRGMskCh0->AddFrame(lbTRGValMsk, new TGLayoutHints(kLHintsRight | kLHintsCenterY , 5, 5, 3, 4));
|
|
|
|
TGCheckButton * cbTRGValMskCh[8];
|
|
|
|
for( int i = 0; i < 8; i++){
|
|
|
|
cbTRGValMskCh[i] = new TGCheckButton(vGbTRGMskCh[i], ""); vGbTRGMskCh[i]->AddFrame(cbTRGValMskCh[i], new TGLayoutHints(kLHintsCenterX , 5, 5, 3, 4));
|
|
|
|
}
|
|
|
|
|
|
|
|
///"Front Panel TRG-OUT Enable Mask",
|
|
|
|
TGLabel * lbTRGOUTMsk = new TGLabel(vGbTRGMskCh0, "TRG-OUT Mask"); vGbTRGMskCh0->AddFrame(lbTRGOUTMsk, new TGLayoutHints(kLHintsRight | kLHintsCenterY , 5, 5, 3, 4));
|
|
|
|
TGCheckButton * cbTRGOUTMskCh[8];
|
|
|
|
for( int i = 0; i < 8; i++){
|
|
|
|
cbTRGOUTMskCh[i] = new TGCheckButton(vGbTRGMskCh[i], ""); vGbTRGMskCh[i]->AddFrame(cbTRGOUTMskCh[i], new TGLayoutHints(kLHintsCenterX , 5, 5, 3, 4));
|
2022-08-23 13:43:05 -04:00
|
|
|
}
|
|
|
|
|
2022-08-24 17:50:21 -04:00
|
|
|
TGVerticalFrame * vGbTRGMskCh1 = new TGVerticalFrame(hframeGbTRGMsk); hframeGbTRGMsk->AddFrame(vGbTRGMskCh1, new TGLayoutHints(kLHintsCenterX , 5, 5, 3, 4));
|
|
|
|
vGbTRGMskCh1->AddFrame(lbdummy0, new TGLayoutHints(kLHintsLeft | kLHintsCenterY , 5, 5, 3, 4));
|
|
|
|
vGbTRGMskCh1->AddFrame(lbdummy0, new TGLayoutHints(kLHintsLeft | kLHintsCenterY , 5, 5, 3, 4));
|
|
|
|
TGLabel * lbMajorCoinWin = new TGLabel(vGbTRGMskCh1, "Maj. Coin. Win."); vGbTRGMskCh1->AddFrame(lbMajorCoinWin, new TGLayoutHints(kLHintsRight | kLHintsCenterY , 5, 5, 3, 4));
|
|
|
|
TGLabel * lbTRGMODE = new TGLabel(vGbTRGMskCh1, "TRG MODE"); vGbTRGMskCh1->AddFrame(lbTRGMODE, new TGLayoutHints(kLHintsRight | kLHintsCenterY , 5, 5, 3, 4));
|
|
|
|
TGLabel * lbTRGOUTMODE = new TGLabel(vGbTRGMskCh1, "TRG-OUT MODE"); vGbTRGMskCh1->AddFrame(lbTRGOUTMODE, new TGLayoutHints(kLHintsRight | kLHintsCenterY , 5, 5, 3, 4));
|
|
|
|
|
|
|
|
TGVerticalFrame * vGbTRGMskCh2 = new TGVerticalFrame(hframeGbTRGMsk); hframeGbTRGMsk->AddFrame(vGbTRGMskCh2, new TGLayoutHints(kLHintsCenterX , 5, 5, 3, 4));
|
|
|
|
vGbTRGMskCh2->AddFrame(lbdummy0, new TGLayoutHints(kLHintsLeft | kLHintsCenterY , 5, 5, 3, 4));
|
|
|
|
vGbTRGMskCh2->AddFrame(lbdummy0, new TGLayoutHints(kLHintsLeft | kLHintsCenterY , 5, 5, 3, 4));
|
|
|
|
|
|
|
|
numMajorCoinWin = new TGNumberEntry(vGbTRGMskCh2, 0, 0, 0, TGNumberFormat::kNESInteger, TGNumberFormat::kNEANonNegative); vGbTRGMskCh2->AddFrame(numMajorCoinWin);
|
|
|
|
numMajorCoinWin->Resize(70, 20);
|
|
|
|
|
|
|
|
TGComboBox * cbTRGMODE = new TGComboBox(vGbTRGMskCh2, "TRG MODE",1); vGbTRGMskCh2->AddFrame(cbTRGMODE);
|
|
|
|
cbTRGMODE->EnableTextInput(false);
|
|
|
|
cbTRGMODE->AddEntry("OR", 0);
|
|
|
|
cbTRGMODE->AddEntry("AND", 1);
|
|
|
|
cbTRGMODE->AddEntry("Majority", 2);
|
|
|
|
cbTRGMODE->Resize(70, 20);
|
|
|
|
cbTRGMODE->Select(0);
|
|
|
|
TGComboBox * cbTRGOUTMODE = new TGComboBox(vGbTRGMskCh2, "TRG MODE",1); vGbTRGMskCh2->AddFrame(cbTRGOUTMODE);
|
|
|
|
cbTRGOUTMODE->EnableTextInput(false);
|
|
|
|
cbTRGOUTMODE->AddEntry("OR", 0);
|
|
|
|
cbTRGOUTMODE->AddEntry("AND", 1);
|
|
|
|
cbTRGOUTMODE->AddEntry("Majority", 2);
|
|
|
|
cbTRGOUTMODE->Resize(70, 20);
|
|
|
|
cbTRGOUTMODE->Select(0);
|
|
|
|
|
|
|
|
TGVerticalFrame * vGbTRGMskCh3 = new TGVerticalFrame(hframeGbTRGMsk); hframeGbTRGMsk->AddFrame(vGbTRGMskCh3, new TGLayoutHints(kLHintsCenterX , 5, 5, 3, 4));
|
|
|
|
vGbTRGMskCh3->AddFrame(lbdummy0, new TGLayoutHints(kLHintsLeft | kLHintsCenterY , 5, 5, 3, 4));
|
|
|
|
TGLabel * lbMajorLevel = new TGLabel(vGbTRGMskCh3, "Majority Level"); vGbTRGMskCh3->AddFrame(lbMajorLevel, new TGLayoutHints(kLHintsCenterX | kLHintsCenterY , 5, 5, 3, 4));
|
|
|
|
GlbMajorLevel = new TGNumberEntry(vGbTRGMskCh3, 0, 0, 0, TGNumberFormat::kNESInteger, TGNumberFormat::kNEANonNegative); vGbTRGMskCh3->AddFrame(GlbMajorLevel, new TGLayoutHints(kLHintsCenterY, 2,2,2,2));
|
|
|
|
GlbMajorLevel->Resize(70, 17);
|
|
|
|
TRGMajorLevel = new TGNumberEntry(vGbTRGMskCh3, 0, 0, 0, TGNumberFormat::kNESInteger, TGNumberFormat::kNEANonNegative); vGbTRGMskCh3->AddFrame(TRGMajorLevel, new TGLayoutHints(kLHintsCenterY, 2,2,2,2));
|
|
|
|
TRGMajorLevel->Resize(70, 17);
|
|
|
|
TRGOUTMajorLevel = new TGNumberEntry(vGbTRGMskCh3, 0, 0, 0, TGNumberFormat::kNESInteger, TGNumberFormat::kNEANonNegative); vGbTRGMskCh3->AddFrame(TRGOUTMajorLevel, new TGLayoutHints(kLHintsCenterY, 2,2,2,2));
|
|
|
|
TRGOUTMajorLevel->Resize(70, 17);
|
|
|
|
|
|
|
|
|
|
|
|
TGVerticalFrame * vGbTRGMskCh4 = new TGVerticalFrame(hframeGbTRGMsk); hframeGbTRGMsk->AddFrame(vGbTRGMskCh4, new TGLayoutHints(kLHintsCenterX , 5, 5, 3, 4));
|
|
|
|
TGLabel * lbLVDSTrigger = new TGLabel(vGbTRGMskCh4, "LVDS"); vGbTRGMskCh4->AddFrame(lbLVDSTrigger, new TGLayoutHints(kLHintsCenterX | kLHintsCenterY , 5, 5, 3, 4));
|
|
|
|
TGLabel * lbdummy1 = new TGLabel(vGbTRGMskCh4, "Trg."); vGbTRGMskCh4->AddFrame(lbdummy1, new TGLayoutHints(kLHintsCenterX | kLHintsCenterY , 5, 5, 3, 4));
|
|
|
|
|
|
|
|
TGCheckButton * bGLBLVDSTrigger = new TGCheckButton(vGbTRGMskCh4, "", 1); vGbTRGMskCh4->AddFrame(bGLBLVDSTrigger, new TGLayoutHints(kLHintsCenterX | kLHintsCenterY , 5, 5, 3, 4));
|
|
|
|
bGLBLVDSTrigger->SetState(kButtonUp);
|
|
|
|
vGbTRGMskCh4->AddFrame(lbdummy0, new TGLayoutHints(kLHintsCenterX | kLHintsCenterY , 5, 5, 3, 4));
|
|
|
|
|
|
|
|
TGCheckButton * bTRGOUTLVDSTrigger = new TGCheckButton(vGbTRGMskCh4, "", 1); vGbTRGMskCh4->AddFrame(bTRGOUTLVDSTrigger, new TGLayoutHints(kLHintsCenterX | kLHintsCenterY , 5, 5, 3, 4));
|
|
|
|
bTRGOUTLVDSTrigger->SetState(kButtonUp);
|
|
|
|
|
|
|
|
|
|
|
|
TGVerticalFrame * vGbTRGMskCh5 = new TGVerticalFrame(hframeGbTRGMsk); hframeGbTRGMsk->AddFrame(vGbTRGMskCh5, new TGLayoutHints(kLHintsCenterX , 5, 5, 3, 4));
|
|
|
|
TGLabel * lbExtTrigger = new TGLabel(vGbTRGMskCh5, "Ext."); vGbTRGMskCh5->AddFrame(lbExtTrigger, new TGLayoutHints(kLHintsCenterX | kLHintsCenterY , 5, 5, 3, 4));
|
|
|
|
TGLabel * lbdummy2 = new TGLabel(vGbTRGMskCh5, "Trg."); vGbTRGMskCh5->AddFrame(lbdummy2, new TGLayoutHints(kLHintsCenterX | kLHintsCenterY , 5, 5, 3, 4));
|
|
|
|
|
|
|
|
TGCheckButton * bGLBExtTrigger = new TGCheckButton(vGbTRGMskCh5, "", 1); vGbTRGMskCh5->AddFrame(bGLBExtTrigger, new TGLayoutHints(kLHintsCenterX | kLHintsCenterY , 5, 5, 3, 4));
|
|
|
|
bGLBExtTrigger->SetState(kButtonUp);
|
|
|
|
TGCheckButton * bTRGExtTrigger = new TGCheckButton(vGbTRGMskCh5, "", 1); vGbTRGMskCh5->AddFrame(bTRGExtTrigger, new TGLayoutHints(kLHintsCenterX | kLHintsCenterY , 5, 5, 3, 4));
|
|
|
|
bTRGExtTrigger->SetState(kButtonUp);
|
|
|
|
TGCheckButton * bTRGOUTExtTrigger = new TGCheckButton(vGbTRGMskCh5, "", 1); vGbTRGMskCh5->AddFrame(bTRGOUTExtTrigger, new TGLayoutHints(kLHintsCenterX | kLHintsCenterY , 5, 5, 3, 4));
|
|
|
|
bTRGExtTrigger->SetState(kButtonUp);
|
|
|
|
|
|
|
|
|
|
|
|
TGVerticalFrame * vGbTRGMskCh6 = new TGVerticalFrame(hframeGbTRGMsk); hframeGbTRGMsk->AddFrame(vGbTRGMskCh6, new TGLayoutHints(kLHintsCenterX , 5, 5, 3, 4));
|
|
|
|
TGLabel * lbSWTrigger = new TGLabel(vGbTRGMskCh6, "Software"); vGbTRGMskCh6->AddFrame(lbSWTrigger, new TGLayoutHints(kLHintsCenterX | kLHintsCenterY , 5, 5, 3, 4));
|
|
|
|
TGLabel * lbdummy3 = new TGLabel(vGbTRGMskCh6, "Trg."); vGbTRGMskCh6->AddFrame(lbdummy3, new TGLayoutHints(kLHintsCenterX | kLHintsCenterY , 5, 5, 3, 4));
|
|
|
|
|
|
|
|
TGCheckButton * bGLBSoftwareTrigger = new TGCheckButton(vGbTRGMskCh6, "", 1); vGbTRGMskCh6->AddFrame(bGLBSoftwareTrigger, new TGLayoutHints(kLHintsCenterX | kLHintsCenterY , 5, 5, 3, 4));
|
|
|
|
bGLBSoftwareTrigger->SetState(kButtonDown);
|
|
|
|
TGCheckButton * bTRGSoftwareTrigger = new TGCheckButton(vGbTRGMskCh6, "", 1); vGbTRGMskCh6->AddFrame(bTRGSoftwareTrigger, new TGLayoutHints(kLHintsCenterX | kLHintsCenterY , 5, 5, 3, 4));
|
|
|
|
bTRGSoftwareTrigger->SetState(kButtonDown);
|
|
|
|
TGCheckButton * bTRGOUTSoftwareTrigger = new TGCheckButton(vGbTRGMskCh6, "", 1); vGbTRGMskCh6->AddFrame(bTRGOUTSoftwareTrigger, new TGLayoutHints(kLHintsCenterX | kLHintsCenterY , 5, 5, 3, 4));
|
|
|
|
bTRGOUTSoftwareTrigger->SetState(kButtonDown);
|
|
|
|
|
|
|
|
TGHorizontalFrame * hframeGbTRGMsk2 = new TGHorizontalFrame(vTRGCfg); vTRGCfg->AddFrame(hframeGbTRGMsk2, new TGLayoutHints(kLHintsCenterY | kLHintsRight, 2,2,2,2));
|
|
|
|
TGCheckButton * bTRGValMskLVSDGLB = new TGCheckButton(hframeGbTRGMsk2, "LVSD Global Trg. Valid", 1); hframeGbTRGMsk2->AddFrame(bTRGValMskLVSDGLB);
|
|
|
|
TGCheckButton * bTRGValMskLVSDLCL = new TGCheckButton(hframeGbTRGMsk2, "LVSD Local Trg. Valid", 1); hframeGbTRGMsk2->AddFrame(bTRGValMskLVSDLCL);
|
|
|
|
|
|
|
|
///"Disable External Trigger",
|
|
|
|
TGCheckButton * bEnableExtTRG = new TGCheckButton(hframeGbTRGMsk2, "Enable Ext. Trigger", 1); hframeGbTRGMsk2->AddFrame(bEnableExtTRG);
|
|
|
|
|
|
|
|
///"Extended Veto Delay",
|
|
|
|
|
|
|
|
|
|
|
|
///=================="Front Panel IO Control",
|
|
|
|
TGGroupFrame * gFrontIOCtrl = new TGGroupFrame(vframe, "Front Panel IO Control", kHorizontalFrame); vframe->AddFrame(gFrontIOCtrl );
|
|
|
|
|
|
|
|
///"Front Panel LVDS IO New Features",
|
|
|
|
///"LVDS IO Data",
|
|
|
|
///"AnalogMonitor Mode",
|
|
|
|
///"FanSpeed Control",
|
|
|
|
///"Readout Control",
|
|
|
|
///"Readout Status"
|
|
|
|
|
2022-08-23 13:43:05 -04:00
|
|
|
fMain->MapSubwindows();
|
|
|
|
fMain->Resize(fMain->GetDefaultSize());
|
|
|
|
fMain->MapWindow();
|
|
|
|
|
|
|
|
isOpened = true;
|
|
|
|
}
|
|
|
|
BoardSetting::~BoardSetting(){
|
|
|
|
|
|
|
|
isOpened = false;
|
|
|
|
|
|
|
|
delete boardIDEntry;
|
|
|
|
|
2022-08-24 17:50:21 -04:00
|
|
|
//delete [] entry;
|
|
|
|
|
|
|
|
delete bDualTrace;
|
|
|
|
delete cbAP1;
|
|
|
|
delete cbAP2;
|
|
|
|
delete cbDP;
|
2022-08-23 13:43:05 -04:00
|
|
|
|
|
|
|
/// fMain must be delete last;
|
|
|
|
fMain->Cleanup();
|
|
|
|
delete fMain;
|
|
|
|
|
|
|
|
}
|
|
|
|
void BoardSetting::ChangeBoard(){
|
|
|
|
int boardID = boardIDEntry->GetNumber();
|
|
|
|
|
|
|
|
return;
|
|
|
|
}
|
2022-08-24 17:50:21 -04:00
|
|
|
|
|
|
|
void BoardSetting::SetAutoDataFlush(){
|
|
|
|
printf("========== Auto Data Flush \n");
|
|
|
|
}
|
|
|
|
|
|
|
|
void BoardSetting::SetDecimateWF(){
|
|
|
|
printf("========== Decimate WF \n");
|
|
|
|
}
|
|
|
|
|
|
|
|
void BoardSetting::SetWaveFormRecord(){
|
|
|
|
printf("========== WF Record \n");
|
|
|
|
}
|
|
|
|
|
|
|
|
void BoardSetting::SetDualTrace(){
|
|
|
|
printf("========== Dual trace \n");
|
|
|
|
cbAP2->SetEnabled(bDualTrace->IsDown());
|
|
|
|
}
|
|
|
|
|
|
|
|
void BoardSetting::SetTriggerPropagation(){
|
|
|
|
printf("========== Trigger Propagation \n");
|
|
|
|
}
|
|
|
|
|
|
|
|
void BoardSetting::SetEnableExtra2(){
|
|
|
|
printf("========== SetEnableExtra2 \n");
|
|
|
|
}
|
|
|
|
|
|
|
|
void BoardSetting::SetAnalogProbe1(){
|
|
|
|
printf("========== SetAnalogProbe1, %d \n", cbAP1->GetSelected());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
void BoardSetting::SetAnalogProbe2(){
|
|
|
|
printf("========== SetAnalogProbe2, %d \n", cbAP2->GetSelected());
|
|
|
|
}
|
|
|
|
|
|
|
|
void BoardSetting::SetDigitalProbe(){
|
|
|
|
printf("========== SetDigitalProbe, %d \n", cbDP->GetSelected());
|
|
|
|
}
|
|
|
|
|
|
|
|
void BoardSetting::SetAggregateOrganization(){
|
|
|
|
printf("========== SetAggregateOrganization, %d \n", cbAggOrg->GetSelected());
|
|
|
|
}
|
|
|
|
|
|
|
|
void BoardSetting::SetReadOutAggregate(){
|
|
|
|
printf("========== SetReadOutAggregate, %d \n", (int) numAggBLT->GetNumber());
|
|
|
|
}
|