added PSU UI in digiSetting Panel

This commit is contained in:
Ryan Tang 2023-09-25 14:29:27 -04:00
parent 795a80d3a4
commit dbb950d4df
5 changed files with 1093 additions and 556 deletions

View File

@ -941,6 +941,23 @@ void Digitizer2Gen::ProgramChannels(bool testPulse){
WriteValue("/ch/0..63/par/WaveSaving" , "OnRequest");
WriteValue("/ch/0..63/par/WaveResolution" , "RES8");
//======== Trigger setting
WriteValue("/ch/0..63/par/EventTriggerSource" , "ChSelfTrigger");
WriteValue("/ch/0..63/par/WaveTriggerSource" , "Disabled");
WriteValue("/ch/0..63/par/ChannelVetoSource" , "Disabled");
WriteValue("/ch/0..63/par/ChannelsTriggerMask" , "0x0");
WriteValue("/ch/0..63/par/CoincidenceMask" , "Disabled");
WriteValue("/ch/0..63/par/AntiCoincidenceMask" , "Disabled");
WriteValue("/ch/0..63/par/CoincidenceLengthT" , "0");
WriteValue("/ch/0..63/par/ADCVetoWidth" , "0");
//======== Other Setting
WriteValue("/ch/0..63/par/EventSelector" , "All");
WriteValue("/ch/0..63/par/WaveSelector" , "All");
WriteValue("/ch/0..63/par/EnergySkimLowDiscriminator" , "0");
WriteValue("/ch/0..63/par/EnergySkimHighDiscriminator" , "0");
WriteValue("/ch/0..63/par/ITLConnect" , "Disabled");
if( FPGAType == DPPType::PHA){
WriteValue("/ch/0..63/par/TimeFilterRiseTimeT" , "80"); // 80 ns
@ -1009,24 +1026,6 @@ void Digitizer2Gen::ProgramChannels(bool testPulse){
}
//======== Trigger setting
WriteValue("/ch/0..63/par/EventTriggerSource" , "ChSelfTrigger");
WriteValue("/ch/0..63/par/WaveTriggerSource" , "Disabled");
WriteValue("/ch/0..63/par/ChannelVetoSource" , "Disabled");
WriteValue("/ch/0..63/par/ChannelsTriggerMask" , "0x0");
WriteValue("/ch/0..63/par/CoincidenceMask" , "Disabled");
WriteValue("/ch/0..63/par/AntiCoincidenceMask" , "Disabled");
WriteValue("/ch/0..63/par/CoincidenceLengthT" , "0");
WriteValue("/ch/0..63/par/ADCVetoWidth" , "0");
//======== Other Setting
WriteValue("/ch/0..63/par/EventSelector" , "All");
WriteValue("/ch/0..63/par/WaveSelector" , "All");
WriteValue("/ch/0..63/par/EnergySkimLowDiscriminator" , "0");
WriteValue("/ch/0..63/par/EnergySkimHighDiscriminator" , "0");
WriteValue("/ch/0..63/par/ITLConnect" , "Disabled");
}
}

View File

@ -84,4 +84,5 @@ then ` make`
- The "Trig." Rate in the Scaler does not included the coincident condition. This is related to the ChSavedEventCnt from the firmware.
- LVDSTrgMask cannot acess.
- The CoincidenceLengthT not loaded.
- Sometime, the digitizer halt after sent the /cmd/armacquisition command. This is CAEN library problem.
- Sometime, the digitizer halt after sent the /cmd/armacquisition command. This is CAEN library problem.
- Event/Wave trig. Source cannot set as SWTrigger.

File diff suppressed because it is too large Load Diff

View File

@ -81,6 +81,9 @@ private:
QTabWidget * triggerTab[MaxNumberOfDigitizer];
QTabWidget * triggerMapTab[MaxNumberOfDigitizer];
QTabWidget * chTabWidget[MaxNumberOfDigitizer];
QWidget * digiTab[MaxNumberOfDigitizer];
bool enableSignalSlot;
//---------------- Inquiry and copy
@ -217,8 +220,35 @@ private:
RComboBox * cbbWaveRes[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RComboBox * cbbWaveSave[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RComboBox * cbbEvtTrigger[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RComboBox * cbbWaveTrigger[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RComboBox * cbbCoinMask[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RComboBox * cbbAntiCoinMask[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RSpinBox * spbCoinLength[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
QLineEdit * leTriggerMask[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RComboBox * cbbChVetoSrc[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RSpinBox * spbADCVetoWidth[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RComboBox * cbbEventSelector[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RComboBox * cbbWaveSelector[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RSpinBox * spbEnergySkimLow[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RSpinBox * spbEnergySkimHigh[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RComboBox * cbbAnaProbe0[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RComboBox * cbbAnaProbe1[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RComboBox * cbbDigProbe0[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RComboBox * cbbDigProbe1[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RComboBox * cbbDigProbe2[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RComboBox * cbbDigProbe3[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
//........... PHA
RSpinBox * spbInputRiseTime[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RSpinBox * spbTriggerGuard[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RComboBox * cbbLowFilter[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RSpinBox * spbTrapRiseTime[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RSpinBox * spbTrapFlatTop[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
@ -228,37 +258,35 @@ private:
RSpinBox * spbBaselineGuard[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RSpinBox * spbPileupGuard[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RComboBox * cbbPeakingAvg[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RComboBox * cbbBaselineAvg[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RSpinBox * spbFineGain[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RComboBox * cbbLowFilter[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RComboBox * cbbPeakingAvg[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RComboBox * cbbAnaProbe0[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RComboBox * cbbAnaProbe1[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
//.............. PSD
RComboBox * cbbADCInputBaselineAvg[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RSpinBox * spbAbsBaseline[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RSpinBox * spbADCInputBaselineGuard[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RSpinBox * spbTimeFilterReTriggerGuard[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RComboBox * cbbTriggerHysteresis[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RComboBox * cbbDigProbe0[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RComboBox * cbbDigProbe1[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RComboBox * cbbDigProbe2[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RComboBox * cbbDigProbe3[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RComboBox * cbbEvtTrigger[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RComboBox * cbbWaveTrigger[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RComboBox * cbbChVetoSrc[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RComboBox * cbbTriggerFilter[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RSpinBox * spbCFDDelay[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RSpinBox * spbCFDFraction[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RComboBox * cbbSmoothingFactor[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RComboBox * cbbChargeSmooting[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RComboBox * cbbTimeFilterSmoothing[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RSpinBox * spbPileupGap[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RComboBox * cbbEventSelector[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RComboBox * cbbWaveSelector[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RComboBox * cbbCoinMask[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RComboBox * cbbAntiCoinMask[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
QLineEdit * leTriggerMask[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RSpinBox * spbCoinLength[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RSpinBox * spbADCVetoWidth[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RSpinBox * spbEnergySkimLow[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RSpinBox * spbEnergySkimHigh[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RSpinBox * spbGateLong[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RSpinBox * spbGateShort[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RSpinBox * spbGateOffset[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RSpinBox * spbLongChargeIntergratorPedestal[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RSpinBox * spbShortChargeIntergratorPedestal[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RComboBox * cbbEnergyGain[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RSpinBox * spbNeutronThreshold[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RComboBox * cbbEventNeutronReject[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RComboBox * cbbWaveNeutronReject[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
//-------------------------
QLineEdit * leSettingFile[MaxNumberOfDigitizer];
@ -281,6 +309,9 @@ private:
void FillComboBoxValueFromMemory(RComboBox * &cbb, const Reg para, int ch_index = -1);
void FillSpinBoxValueFromMemory(RSpinBox * &spb, const Reg para, int ch_index = -1 );
void SetupPHAChannels(unsigned short digiID);
void SetupPSDChannels(unsigned short digiID);
void ReadBoardSetting(int cbIndex);
void ReadChannelSetting(int cbIndex);

View File

@ -698,9 +698,7 @@ void MainWindow::OpenDigitizers(){
//digi[i]->Reset();
//digi[i]->ProgramBoard(false);
}
digi[i]->ReadAllSettings();
nDigiConnected ++;
for( int ch = 0; ch < (int) digi[i]->GetNChannels(); ch++) {