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

@ -85,3 +85,4 @@ then ` make`
- LVDSTrgMask cannot acess.
- The CoincidenceLengthT not loaded.
- 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,21 +220,22 @@ private:
RComboBox * cbbWaveRes[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RComboBox * cbbWaveSave[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RSpinBox * spbInputRiseTime[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RSpinBox * spbTriggerGuard[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RComboBox * cbbEvtTrigger[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RComboBox * cbbWaveTrigger[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RSpinBox * spbTrapRiseTime[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RSpinBox * spbTrapFlatTop[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RSpinBox * spbTrapPoleZero[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RComboBox * cbbCoinMask[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RComboBox * cbbAntiCoinMask[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RSpinBox * spbCoinLength[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RSpinBox * spbPeaking[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RSpinBox * spbBaselineGuard[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RSpinBox * spbPileupGuard[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
QLineEdit * leTriggerMask[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RComboBox * cbbPeakingAvg[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RComboBox * cbbBaselineAvg[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RSpinBox * spbFineGain[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RComboBox * cbbLowFilter[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];
@ -241,24 +245,48 @@ private:
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];
//........... PHA
RSpinBox * spbInputRiseTime[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RSpinBox * spbTriggerGuard[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RComboBox * cbbLowFilter[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RComboBox * cbbEventSelector[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RComboBox * cbbWaveSelector[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RSpinBox * spbTrapRiseTime[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RSpinBox * spbTrapFlatTop[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RSpinBox * spbTrapPoleZero[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RComboBox * cbbCoinMask[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RComboBox * cbbAntiCoinMask[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RSpinBox * spbPeaking[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RSpinBox * spbBaselineGuard[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RSpinBox * spbPileupGuard[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
QLineEdit * leTriggerMask[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RComboBox * cbbBaselineAvg[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RSpinBox * spbFineGain[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RComboBox * cbbPeakingAvg[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RSpinBox * spbCoinLength[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RSpinBox * spbADCVetoWidth[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];
RSpinBox * spbEnergySkimLow[MaxNumberOfDigitizer][MaxNumberOfChannel + 1];
RSpinBox * spbEnergySkimHigh[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];
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

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