in progress to added PSD Channel

This commit is contained in:
splitPoleDAQ 2023-05-09 12:16:08 -04:00
parent f0b2f0978e
commit d6c90c8b59
6 changed files with 655 additions and 179 deletions

View File

@ -226,8 +226,13 @@ DigiSettingsPanel::DigiSettingsPanel(Digitizer ** digi, unsigned int nDigi, QStr
QLabel * lbLVDSInfo = new QLabel(" LDVS settings will be implement later. ", bdLVDS);
bdLVDSLayout[iDigi]->addWidget(lbLVDSInfo);
SetUpChannelMask();
if( digi[ID]->GetDPPType() == V1730_DPP_PHA_CODE ) SetUpPHABoard();
if( digi[ID]->GetDPPType() == V1730_DPP_PSD_CODE ) SetUpPSDBoard();
SetUpGlobalTriggerMaskAndFrontPanelMask(bdGlbTRGOUTLayout[iDigi]);
SetUpACQReadOutTab();
}
@ -237,27 +242,11 @@ DigiSettingsPanel::DigiSettingsPanel(Digitizer ** digi, unsigned int nDigi, QStr
QVBoxLayout * tabLayout_V2 = new QVBoxLayout(temp_V2);
tabLayout_V2->setSpacing(0);
QTabWidget * chTab = new QTabWidget(tab);
chTab = new QTabWidget(tab);
tabLayout_V2->addWidget(chTab);
chAllSetting = new QWidget(this);
//chAllSetting->setStyleSheet("background-color: #ECECEC;");
chTab->addTab(chAllSetting, "Channel Settings");
chStatus = new QWidget(this);
//chStatus->setStyleSheet("background-color: #ECECEC;");
chTab->addTab(chStatus, "Status");
chInput = new QWidget(this);
chTab->addTab(chInput, "Input");
chTrap = new QWidget(this);
chTab->addTab(chTrap, "Trapezoid");
chOthers = new QWidget(this);
chTab->addTab(chOthers, "Others");
SetUpPHAChannel();
if( digi[iDigi]->GetDPPType() == V1730_DPP_PHA_CODE) SetUpPHAChannel();
if( digi[iDigi]->GetDPPType() == V1730_DPP_PSD_CODE) SetUpPSDChannel();
}
@ -269,10 +258,7 @@ DigiSettingsPanel::DigiSettingsPanel(Digitizer ** digi, unsigned int nDigi, QStr
connect(tabWidget, &QTabWidget::currentChanged, this, [=](int index){
if( index < (int) nDigi) {
ID = index;
// CleanUpGroupBox(boardSettingBox[ID]);
// if( digi[ID]->GetDPPType() == V1730_DPP_PHA_CODE ) SetUpPHABoard();
// if( digi[ID]->GetDPPType() == V1730_DPP_PSD_CODE ) SetUpPSDBoard();
UpdatePanelFromMemory();
if( digi[ID]->GetDPPType() == V1730_DPP_PHA_CODE ) UpdatePanelFromMemory();
}
});
@ -302,10 +288,10 @@ void DigiSettingsPanel::SetUpInfo(QString label, std::string value, QGridLayout
gLayout->addWidget(leInfo, row, col + 1);
}
void DigiSettingsPanel::SetUpCheckBox(QCheckBox * &chkBox, QString label, QGridLayout *gLayout, int row, int col, Reg para, std::pair<unsigned short, unsigned short> bit, int ch){
void DigiSettingsPanel::SetUpCheckBox(QCheckBox * &chkBox, QString label, QGridLayout *gLayout, int row, int col, Reg para, std::pair<unsigned short, unsigned short> bit, int ch, int colSpan){
chkBox = new QCheckBox(label, this);
gLayout->addWidget(chkBox, row, col);
gLayout->addWidget(chkBox, row, col, 1, colSpan);
connect(chkBox, &QCheckBox::stateChanged, this, [=](int state){
if( !enableSignalSlot ) return;
@ -335,7 +321,10 @@ void DigiSettingsPanel::SetUpComboBoxBit(RComboBox * &cb, QString label, QGridLa
connect(cb, &RComboBox::currentIndexChanged, this, [=](){
if( !enableSignalSlot ) return;
if( ch == -1 && cb->currentText() == "" ) return;
int chID = ch < 0 ? chSelection[ID]->currentData().toInt() : ch;
digi[ID]->SetBits(para, bit, cb->currentData().toUInt(), chID);
if( para.IsCoupled() == true && chID >= 0 ) digi[ID]->SetBits(para, bit, cb->currentData().toUInt(), chID%2 == 0 ? chID + 1 : chID - 1);
UpdatePanelFromMemory();
@ -360,6 +349,9 @@ void DigiSettingsPanel::SetUpComboBox(RComboBox * &cb, QString label, QGridLayou
connect(cb, &RComboBox::currentIndexChanged, this, [=](){
if( !enableSignalSlot ) return;
if( ch == -1 && cb->currentText() == "" ) return;
int chID = ch < 0 ? chSelection[ID]->currentData().toInt() : ch;
digi[ID]->WriteRegister(para, cb->currentData().toUInt(), chID);
if( para.IsCoupled() == true && chID >= 0 ) digi[ID]->WriteRegister(para, cb->currentData().toUInt(), chID%2 == 0 ? chID + 1 : chID - 1);
@ -395,6 +387,8 @@ void DigiSettingsPanel::SetUpSpinBox(RSpinBox * &sb, QString label, QGridLayout
connect(sb, &RSpinBox::returnPressed, this, [=](){
if( !enableSignalSlot ) return;
if( ch == -1 && sb->value() == -1 ) return;
if( sb->decimals() == 0 && sb->singleStep() != 1) {
double step = sb->singleStep();
double value = sb->value();
@ -812,8 +806,7 @@ void DigiSettingsPanel::SetUpGlobalTriggerMaskAndFrontPanelMask(QGridLayout * &
}
//&###########################################################
void DigiSettingsPanel::SetUpPHABoard(){
printf("============== %s \n", __func__);
void DigiSettingsPanel::SetUpChannelMask(){
QLabel * chMaskLabel = new QLabel("Channel Mask : ", this);
chMaskLabel->setAlignment(Qt::AlignRight | Qt::AlignCenter);
@ -849,28 +842,9 @@ void DigiSettingsPanel::SetUpPHABoard(){
});
}
SetUpCheckBox(chkAutoDataFlush[ID], "Auto Data Flush", bdCfgLayout[ID], 1, 0, DPP::BoardConfiguration, DPP::Bit_BoardConfig::EnableAutoDataFlush);
SetUpCheckBox(chkDecimateTrace[ID], "Decimate Trace", bdCfgLayout[ID], 2, 0, DPP::BoardConfiguration, DPP::Bit_BoardConfig::DecimateTrace);
SetUpCheckBox(chkTrigPropagation[ID], "Trig. Propagate", bdCfgLayout[ID], 3, 0, DPP::BoardConfiguration, DPP::Bit_BoardConfig::TrigPropagation);
SetUpCheckBox(chkDualTrace[ID], "Dual Trace", bdCfgLayout[ID], 1, 1, DPP::BoardConfiguration, DPP::Bit_BoardConfig::DualTrace);
connect(chkDualTrace[ID], &QCheckBox::stateChanged, this, [=](int state){
if( !enableSignalSlot) return;
cbAnaProbe2[ID]->setEnabled(state);
cbDigiProbe2[ID]->setEnabled(state);
});
SetUpCheckBox(chkTraceRecording[ID], "Record Trace", bdCfgLayout[ID], 2, 1, DPP::BoardConfiguration, DPP::Bit_BoardConfig::RecordTrace);
SetUpCheckBox(chkEnableExtra2[ID], "Enable Extra2", bdCfgLayout[ID], 3, 1, DPP::BoardConfiguration, DPP::Bit_BoardConfig::EnableExtra2);
SetUpComboBoxBit(cbAnaProbe1[ID], "Ana. Probe 1 ", bdCfgLayout[ID], 1, 2, DPP::Bit_BoardConfig::ListAnaProbe1_PHA, DPP::BoardConfiguration, DPP::Bit_BoardConfig::AnalogProbe1, 1, 0);
SetUpComboBoxBit(cbAnaProbe2[ID], "Ana. Probe 2 ", bdCfgLayout[ID], 2, 2, DPP::Bit_BoardConfig::ListAnaProbe2_PHA, DPP::BoardConfiguration, DPP::Bit_BoardConfig::AnalogProbe2, 1, 0);
SetUpComboBoxBit(cbDigiProbe1[ID], "Digi. Probe 1 ", bdCfgLayout[ID], 3, 2, DPP::Bit_BoardConfig::ListDigiProbe1_PHA, DPP::BoardConfiguration, DPP::Bit_BoardConfig::DigiProbel1, 1, 0);
SetUpComboBoxBit(cbDigiProbe2[ID], "Digi. Probe 2 ", bdCfgLayout[ID], 4, 2, DPP::Bit_BoardConfig::ListDigiProbe2_PHA, DPP::BoardConfiguration, DPP::Bit_BoardConfig::DigiProbel2, 1, 0);
//*======================= ACQ tab
}
void DigiSettingsPanel::SetUpACQReadOutTab(){
SetUpSpinBox(sbAggNum[ID], "Agg. Num. / read ", bdACQLayout[ID], 0, 0, DPP::MaxAggregatePerBlockTransfer);
SetUpComboBox(cbAggOrg[ID], "Aggregate Organization ", bdACQLayout[ID], 1, 0, DPP::AggregateOrganization, 0);
@ -880,13 +854,12 @@ void DigiSettingsPanel::SetUpPHABoard(){
SetUpComboBoxBit(cbAcqStartArm[ID], "Acq Start/Arm ", bdACQLayout[ID], 3, 0, DPP::Bit_AcquistionControl::ListACQStartArm,
DPP::AcquisitionControl, DPP::Bit_AcquistionControl::ACQStartArm, 1, 0);
SetUpComboBoxBit(cbPLLRefClock[ID], "PLL Ref. Clock ", bdACQLayout[ID], 4, 0, DPP::Bit_AcquistionControl::ListPLLRef,
DPP::AcquisitionControl, DPP::Bit_AcquistionControl::ACQStartArm, 1, 0);
SetUpSpinBox(sbRunDelay[ID], "Run Delay [ns] ", bdACQLayout[ID], 5, 0, DPP::RunStartStopDelay);
{//==================================
{//=======================
QGroupBox * readOutGroup = new QGroupBox("Readout Control (VME only)",this);
bdACQLayout[ID]->addWidget(readOutGroup, 6, 0, 1, 2);
@ -921,13 +894,53 @@ void DigiSettingsPanel::SetUpPHABoard(){
sbVMEInterruptLevel[ID]->setStyleSheet("");
digi[ID]->SetBits(DPP::ReadoutControl, DPP::Bit_ReadoutControl::VMEInterruptLevel, sbVMEInterruptLevel[ID]->value(), -1);
});
}
}
void DigiSettingsPanel::SetUpPHABoard(){
printf("============== %s \n", __func__);
SetUpCheckBox(chkAutoDataFlush[ID], "Auto Data Flush", bdCfgLayout[ID], 1, 0, DPP::BoardConfiguration, DPP::Bit_BoardConfig::EnableAutoDataFlush);
SetUpCheckBox(chkTrigPropagation[ID], "Trig. Propagate", bdCfgLayout[ID], 2, 0, DPP::BoardConfiguration, DPP::Bit_BoardConfig::TrigPropagation);
SetUpCheckBox(chkDecimateTrace[ID], "Decimate Trace", bdCfgLayout[ID], 3, 0, DPP::BoardConfiguration, DPP::Bit_BoardConfig::DecimateTrace);
SetUpCheckBox(chkDualTrace[ID], "Dual Trace", bdCfgLayout[ID], 1, 1, DPP::BoardConfiguration, DPP::Bit_BoardConfig::DualTrace);
connect(chkDualTrace[ID], &QCheckBox::stateChanged, this, [=](int state){
if( !enableSignalSlot) return;
cbAnaProbe2[ID]->setEnabled(state);
cbDigiProbe2[ID]->setEnabled(state);
});
SetUpCheckBox(chkTraceRecording[ID], "Record Trace", bdCfgLayout[ID], 2, 1, DPP::BoardConfiguration, DPP::Bit_BoardConfig::RecordTrace);
SetUpCheckBox(chkEnableExtra2[ID], "Enable Extra2", bdCfgLayout[ID], 3, 1, DPP::BoardConfiguration, DPP::Bit_BoardConfig::EnableExtra2);
SetUpComboBoxBit(cbAnaProbe1[ID], "Ana. Probe 1 ", bdCfgLayout[ID], 1, 2, DPP::Bit_BoardConfig::ListAnaProbe1_PHA, DPP::BoardConfiguration, DPP::Bit_BoardConfig::AnalogProbe1, 1, 0);
SetUpComboBoxBit(cbAnaProbe2[ID], "Ana. Probe 2 ", bdCfgLayout[ID], 2, 2, DPP::Bit_BoardConfig::ListAnaProbe2_PHA, DPP::BoardConfiguration, DPP::Bit_BoardConfig::AnalogProbe2, 1, 0);
SetUpComboBoxBit(cbDigiProbe1[ID], "Digi. Probe 1 ", bdCfgLayout[ID], 3, 2, DPP::Bit_BoardConfig::ListDigiProbe1_PHA, DPP::BoardConfiguration, DPP::Bit_BoardConfig::DigiProbel1, 1, 0);
SetUpComboBoxBit(cbDigiProbe2[ID], "Digi. Probe 2 ", bdCfgLayout[ID], 4, 2, DPP::Bit_BoardConfig::ListDigiProbe2_PHA, DPP::BoardConfiguration, DPP::Bit_BoardConfig::DigiProbel2, 1, 0);
}
//&###########################################################
void DigiSettingsPanel::SetUpPHAChannel(){
QWidget * chAllSetting = new QWidget(this);
//chAllSetting->setStyleSheet("background-color: #ECECEC;");
chTab->addTab(chAllSetting, "Channel Settings");
QWidget * chStatus = new QWidget(this);
//chStatus->setStyleSheet("background-color: #ECECEC;");
chTab->addTab(chStatus, "Status");
QWidget * chInput = new QWidget(this);
chTab->addTab(chInput, "Input");
QWidget * chTrap = new QWidget(this);
chTab->addTab(chTrap, "Trapezoid");
QWidget * chOthers = new QWidget(this);
chTab->addTab(chOthers, "Others");
//^======================== All Channels
QVBoxLayout * allSettingLayout = new QVBoxLayout(chAllSetting);
allSettingLayout->setAlignment(Qt::AlignTop);
@ -968,13 +981,27 @@ void DigiSettingsPanel::SetUpPHAChannel(){
SetUpSpinBox(sbInputRiseTime[ID][MaxNChannels], "Rise Time [ns] : ", inputLayout, 2, 0, DPP::PHA::InputRiseTime);
SetUpSpinBox(sbThreshold[ID][MaxNChannels], "Threshold [LSB] : ", inputLayout, 2, 2, DPP::PHA::TriggerThreshold);
SetUpSpinBox(sbRiseTimeValidWin[ID][MaxNChannels], "Rise Time Valid. Win. [ns] : ", inputLayout, 3, 0, DPP::PHA::RiseTimeValidationWindow);
SetUpSpinBox(sbTriggerHoldOff[ID][MaxNChannels], "Tigger Hold-off [ns] : ", inputLayout, 3, 2, DPP::PHA::TriggerHoldOffWidth);
SetUpSpinBox(sbShapedTrigWidth[ID][MaxNChannels], "Shaped Trig. Width [ns] : ", inputLayout, 4, 0, DPP::PHA::ShapedTriggerWidth);
SetUpSpinBox(sbDCOffset[ID][MaxNChannels], "DC Offset [%] : ", inputLayout, 4, 2, DPP::ChannelDCOffset);
SetUpComboBoxBit(cbPolarity[ID][MaxNChannels], "Polarity : ", inputLayout, 5, 0, DPP::Bit_DPPAlgorithmControl::ListPolarity, DPP::DPPAlgorithmControl, DPP::Bit_DPPAlgorithmControl::Polarity);
SetUpSpinBox(sbDCOffset[ID][MaxNChannels], "DC Offset [%] : ", inputLayout, 3, 2, DPP::ChannelDCOffset);
SetUpComboBoxBit(cbPolarity[ID][MaxNChannels], "Polarity : ", inputLayout, 5, 0, DPP::Bit_DPPAlgorithmControl_PHA::ListPolarity, DPP::DPPAlgorithmControl, DPP::Bit_DPPAlgorithmControl_PHA::Polarity);
}
{//*=================== Trigger
QGroupBox * trigBox = new QGroupBox("Trigger Settings", this);
allSettingLayout->addWidget(trigBox);
QGridLayout * trigLayout = new QGridLayout(trigBox);
trigLayout->setSpacing(2);
SetUpCheckBox(chkDisableSelfTrigger[ID][MaxNChannels], "Disable Self Trigger ", trigLayout, 0, 1, DPP::DPPAlgorithmControl, DPP::Bit_DPPAlgorithmControl_PHA::DisableSelfTrigger);
SetUpComboBoxBit(cbTrigMode[ID][MaxNChannels], "Trig Mode : ", trigLayout, 1, 0, DPP::Bit_DPPAlgorithmControl_PHA::ListTrigMode, DPP::DPPAlgorithmControl, DPP::Bit_DPPAlgorithmControl_PHA::TriggerMode, 1);
SetUpSpinBox(sbTriggerHoldOff[ID][MaxNChannels], "Tigger Hold-off [ns] : ", trigLayout, 1, 2, DPP::PHA::TriggerHoldOffWidth);
SetUpComboBoxBit(cbLocalTriggerValid[ID][MaxNChannels], "Local Trig. Valid. [G] : ", trigLayout, 2, 0, DPP::PHA::Bit_DPPAlgorithmControl2::ListLocalTrigValidMode, DPP::PHA::DPPAlgorithmControl2_G, DPP::PHA::Bit_DPPAlgorithmControl2::LocalTrigValidMode);
SetUpComboBoxBit(cbTrigCount[ID][MaxNChannels], "Trig. Counter Flag [G] : ", trigLayout, 2, 2, DPP::PHA::Bit_DPPAlgorithmControl2::ListTrigCounter, DPP::PHA::DPPAlgorithmControl2_G, DPP::PHA::Bit_DPPAlgorithmControl2::TriggerCounterFlag);
SetUpComboBoxBit(cbLocalShapedTrigger[ID][MaxNChannels], "Local Shaped Trig. [G] : ", trigLayout, 3, 0, DPP::PHA::Bit_DPPAlgorithmControl2::ListLocalShapeTrigMode, DPP::PHA::DPPAlgorithmControl2_G, DPP::PHA::Bit_DPPAlgorithmControl2::LocalShapeTriggerMode, 1);
SetUpSpinBox(sbShapedTrigWidth[ID][MaxNChannels], "Shaped Trig. Width [ns] : ", trigLayout, 3, 2, DPP::PHA::ShapedTriggerWidth);
}
{//*===================== Trapezoid
QGroupBox * trapBox = new QGroupBox("Trapezoid Settings", this);
allSettingLayout->addWidget(trapBox);
@ -988,8 +1015,8 @@ void DigiSettingsPanel::SetUpPHAChannel(){
SetUpSpinBox(sbTrapScaling[ID][MaxNChannels], "Rescaling : ", trapLayout, 1, 2, DPP::PHA::DPPAlgorithmControl2_G);
SetUpSpinBox(sbPeaking[ID][MaxNChannels], "Peaking [ns] : ", trapLayout, 2, 0, DPP::PHA::PeakingTime);
SetUpSpinBox(sbPeakingHoldOff[ID][MaxNChannels], "Peak Hold-off [ns] : ", trapLayout, 2, 2, DPP::PHA::PeakHoldOff);
SetUpComboBoxBit(cbPeakAvg[ID][MaxNChannels], "Peak Avg. : ", trapLayout, 3, 0, DPP::Bit_DPPAlgorithmControl::ListPeakMean, DPP::DPPAlgorithmControl, DPP::Bit_DPPAlgorithmControl::PeakMean);
SetUpComboBoxBit(cbBaseLineAvg[ID][MaxNChannels], "Baseline Avg. : ", trapLayout, 3, 2, DPP::Bit_DPPAlgorithmControl::ListBaselineAvg, DPP::DPPAlgorithmControl, DPP::Bit_DPPAlgorithmControl::BaselineAvg);
SetUpComboBoxBit(cbPeakAvg[ID][MaxNChannels], "Peak Avg. : ", trapLayout, 3, 0, DPP::Bit_DPPAlgorithmControl_PHA::ListPeakMean, DPP::DPPAlgorithmControl, DPP::Bit_DPPAlgorithmControl_PHA::PeakMean);
SetUpComboBoxBit(cbBaseLineAvg[ID][MaxNChannels], "Baseline Avg. : ", trapLayout, 3, 2, DPP::Bit_DPPAlgorithmControl_PHA::ListBaselineAvg, DPP::DPPAlgorithmControl, DPP::Bit_DPPAlgorithmControl_PHA::BaselineAvg);
SetUpCheckBox(chkActiveBaseline[ID][MaxNChannels], "Active basline [G]", trapLayout, 4, 0, DPP::PHA::DPPAlgorithmControl2_G, DPP::PHA::Bit_DPPAlgorithmControl2::ActivebaselineCalulation);
SetUpCheckBox(chkBaselineRestore[ID][MaxNChannels], "Baseline Restorer [G]", trapLayout, 4, 1, DPP::PHA::DPPAlgorithmControl2_G, DPP::PHA::Bit_DPPAlgorithmControl2::EnableActiveBaselineRestoration);
SetUpSpinBox(sbFineGain[ID][MaxNChannels], "Fine Gain : ", trapLayout, 4, 2, DPP::PHA::FineGain);
@ -1003,21 +1030,16 @@ void DigiSettingsPanel::SetUpPHAChannel(){
QGridLayout * otherLayout = new QGridLayout(otherBox);
otherLayout->setSpacing(2);
SetUpCheckBox(chkDisableSelfTrigger[ID][MaxNChannels], "Disable Self Trigger ", otherLayout, 0, 0, DPP::DPPAlgorithmControl, DPP::Bit_DPPAlgorithmControl::DisableSelfTrigger);
SetUpCheckBox(chkEnableRollOver[ID][MaxNChannels], "Enable Roll-Over Event", otherLayout, 0, 1, DPP::DPPAlgorithmControl, DPP::Bit_DPPAlgorithmControl::EnableRollOverFlag);
SetUpCheckBox(chkEnablePileUp[ID][MaxNChannels], "Allow Pile-up Event", otherLayout, 1, 0, DPP::DPPAlgorithmControl, DPP::Bit_DPPAlgorithmControl::EnablePileUpFlag);
SetUpCheckBox(chkEnableRollOver[ID][MaxNChannels], "Enable Roll-Over Event", otherLayout, 0, 1, DPP::DPPAlgorithmControl, DPP::Bit_DPPAlgorithmControl_PHA::EnableRollOverFlag);
SetUpCheckBox(chkEnablePileUp[ID][MaxNChannels], "Allow Pile-up Event", otherLayout, 0, 3, DPP::DPPAlgorithmControl, DPP::Bit_DPPAlgorithmControl_PHA::EnablePileUpFlag);
SetUpCheckBox(chkTagCorrelation[ID][MaxNChannels], "Tag Correlated events [G]", otherLayout, 1, 1, DPP::PHA::DPPAlgorithmControl2_G, DPP::PHA::Bit_DPPAlgorithmControl2::TagCorrelatedEvents);
SetUpComboBoxBit(cbDecimateTrace[ID][MaxNChannels], "Decimate Trace : ", otherLayout, 0, 2, DPP::Bit_DPPAlgorithmControl::ListTraceDecimation, DPP::DPPAlgorithmControl, DPP::Bit_DPPAlgorithmControl::TraceDecimation);
SetUpComboBoxBit(cbDecimateGain[ID][MaxNChannels], "Decimate Gain : ", otherLayout, 1, 2, DPP::Bit_DPPAlgorithmControl::ListDecimationGain, DPP::DPPAlgorithmControl, DPP::Bit_DPPAlgorithmControl::TraceDeciGain);
SetUpSpinBox(sbNumEventAgg[ID][MaxNChannels], "Events per Agg. [G] : ", otherLayout, 2, 0, DPP::NumberEventsPerAggregate_G);
SetUpComboBoxBit(cbTriggerValid[ID][MaxNChannels], "Local Trig. Valid. [G] : ", otherLayout, 2, 2, DPP::PHA::Bit_DPPAlgorithmControl2::ListLocalTrigValidMode, DPP::PHA::DPPAlgorithmControl2_G, DPP::PHA::Bit_DPPAlgorithmControl2::LocalTrigValidMode);
SetUpComboBoxBit(cbTrigMode[ID][MaxNChannels], "Trig Mode : ", otherLayout, 3, 0, DPP::Bit_DPPAlgorithmControl::ListTrigMode, DPP::DPPAlgorithmControl, DPP::Bit_DPPAlgorithmControl::TriggerMode, 1);
SetUpComboBoxBit(cbShapedTrigger[ID][MaxNChannels], "Local Shaped Trig. [G] : ", otherLayout, 3, 2, DPP::PHA::Bit_DPPAlgorithmControl2::ListLocalShapeTrigMode, DPP::PHA::DPPAlgorithmControl2_G, DPP::PHA::Bit_DPPAlgorithmControl2::LocalShapeTriggerMode, 1);
SetUpComboBoxBit(cbVetoSource[ID][MaxNChannels], "Veto Source [G] : ", otherLayout, 4, 0, DPP::PHA::Bit_DPPAlgorithmControl2::ListVetoSource, DPP::PHA::DPPAlgorithmControl2_G, DPP::PHA::Bit_DPPAlgorithmControl2::VetoSource);
SetUpSpinBox(sbVetoWidth[ID][MaxNChannels], "Veto Width : ", otherLayout, 4, 2, DPP::VetoWidth);
SetUpComboBoxBit(cbVetoStep[ID][MaxNChannels], "Veto Step : ", otherLayout, 5, 0, DPP::Bit_VetoWidth::ListVetoStep, DPP::VetoWidth, DPP::Bit_VetoWidth::VetoStep, 1);
SetUpComboBoxBit(cbTrigCount[ID][MaxNChannels], "Trig. Counter Flag [G] : ", otherLayout, 5, 2, DPP::PHA::Bit_DPPAlgorithmControl2::ListTrigCounter, DPP::PHA::DPPAlgorithmControl2_G, DPP::PHA::Bit_DPPAlgorithmControl2::TriggerCounterFlag);
SetUpComboBoxBit(cbExtra2Option[ID][MaxNChannels], "Extra2 Option [G] : ", otherLayout, 6, 0, DPP::PHA::Bit_DPPAlgorithmControl2::ListExtra2, DPP::PHA::DPPAlgorithmControl2_G, DPP::PHA::Bit_DPPAlgorithmControl2::Extra2Option, 3);
SetUpSpinBox(sbNumEventAgg[ID][MaxNChannels], "Events per Agg. [G] : ", otherLayout, 1, 2, DPP::NumberEventsPerAggregate_G);
SetUpComboBoxBit(cbDecimateTrace[ID][MaxNChannels], "Decimate Trace : ", otherLayout, 2, 0, DPP::Bit_DPPAlgorithmControl_PHA::ListTraceDecimation, DPP::DPPAlgorithmControl, DPP::Bit_DPPAlgorithmControl_PHA::TraceDecimation);
SetUpComboBoxBit(cbDecimateGain[ID][MaxNChannels], "Decimate Gain : ", otherLayout, 2, 2, DPP::Bit_DPPAlgorithmControl_PHA::ListDecimationGain, DPP::DPPAlgorithmControl, DPP::Bit_DPPAlgorithmControl_PHA::TraceDeciGain);
SetUpComboBoxBit(cbVetoSource[ID][MaxNChannels], "Veto Source [G] : ", otherLayout, 3, 0, DPP::PHA::Bit_DPPAlgorithmControl2::ListVetoSource, DPP::PHA::DPPAlgorithmControl2_G, DPP::PHA::Bit_DPPAlgorithmControl2::VetoSource);
SetUpSpinBox(sbVetoWidth[ID][MaxNChannels], "Veto Width : ", otherLayout, 3, 2, DPP::VetoWidth);
SetUpComboBoxBit(cbVetoStep[ID][MaxNChannels], "Veto Step : ", otherLayout, 4, 0, DPP::Bit_VetoWidth::ListVetoStep, DPP::VetoWidth, DPP::Bit_VetoWidth::VetoStep, 1);
SetUpComboBoxBit(cbExtra2Option[ID][MaxNChannels], "Extra2 Option [G] : ", otherLayout, 5, 0, DPP::PHA::Bit_DPPAlgorithmControl2::ListExtra2, DPP::PHA::DPPAlgorithmControl2_G, DPP::PHA::Bit_DPPAlgorithmControl2::Extra2Option, 3);
}
@ -1105,7 +1127,7 @@ void DigiSettingsPanel::SetUpPHAChannel(){
SetUpSpinBox(sbRecordLength[ID][ch], "", tabLayout, ch + 1, 5, DPP::RecordLength_G, ch);
SetUpSpinBox(sbPreTrigger[ID][ch], "", tabLayout, ch + 1, 7, DPP::PreTrigger, ch);
SetUpComboBox(cbDynamicRange[ID][ch], "", tabLayout, ch + 1, 9, DPP::InputDynamicRange, ch);
SetUpComboBoxBit(cbPolarity[ID][ch], "", tabLayout, ch + 1, 11, DPP::Bit_DPPAlgorithmControl::ListPolarity, DPP::DPPAlgorithmControl, DPP::Bit_DPPAlgorithmControl::Polarity, 1, ch);
SetUpComboBoxBit(cbPolarity[ID][ch], "", tabLayout, ch + 1, 11, DPP::Bit_DPPAlgorithmControl_PHA::ListPolarity, DPP::DPPAlgorithmControl, DPP::Bit_DPPAlgorithmControl_PHA::Polarity, 1, ch);
}
if ( i == 1 ){
@ -1172,8 +1194,8 @@ void DigiSettingsPanel::SetUpPHAChannel(){
SetUpSpinBox(sbTrapFlatTop[ID][ch], "", tabLayout, ch + 1, 3, DPP::PHA::TrapezoidFlatTop, ch);
SetUpSpinBox(sbDecay[ID][ch], "", tabLayout, ch + 1, 5, DPP::PHA::DecayTime, ch);
SetUpSpinBox(sbPeaking[ID][ch], "", tabLayout, ch + 1, 7, DPP::PHA::PeakingTime, ch);
SetUpComboBoxBit(cbPeakAvg[ID][ch], "", tabLayout, ch + 1, 9, DPP::Bit_DPPAlgorithmControl::ListPeakMean, DPP::DPPAlgorithmControl, DPP::Bit_DPPAlgorithmControl::PeakMean, 1, ch);
SetUpComboBoxBit(cbBaseLineAvg[ID][ch], "", tabLayout, ch + 1, 11, DPP::Bit_DPPAlgorithmControl::ListBaselineAvg, DPP::DPPAlgorithmControl, DPP::Bit_DPPAlgorithmControl::BaselineAvg, 1, ch);
SetUpComboBoxBit(cbPeakAvg[ID][ch], "", tabLayout, ch + 1, 9, DPP::Bit_DPPAlgorithmControl_PHA::ListPeakMean, DPP::DPPAlgorithmControl, DPP::Bit_DPPAlgorithmControl_PHA::PeakMean, 1, ch);
SetUpComboBoxBit(cbBaseLineAvg[ID][ch], "", tabLayout, ch + 1, 11, DPP::Bit_DPPAlgorithmControl_PHA::ListBaselineAvg, DPP::DPPAlgorithmControl, DPP::Bit_DPPAlgorithmControl_PHA::BaselineAvg, 1, ch);
}
if ( i == 1 ){
@ -1225,9 +1247,9 @@ void DigiSettingsPanel::SetUpPHAChannel(){
if( ch == 0 ){
QLabel * lb1 = new QLabel("Trig. Counter Flag [G]", this); lb1->setAlignment(Qt::AlignHCenter); tabLayout->addWidget(lb1, 0, 5);
}
SetUpCheckBox(chkDisableSelfTrigger[ID][ch], "Disable Self Trigger", tabLayout, ch + 1, 1, DPP::DPPAlgorithmControl, DPP::Bit_DPPAlgorithmControl::DisableSelfTrigger, ch);
SetUpCheckBox(chkEnableRollOver[ID][ch], "Enable Roll-Over Event", tabLayout, ch + 1, 2, DPP::DPPAlgorithmControl, DPP::Bit_DPPAlgorithmControl::EnableRollOverFlag, ch);
SetUpCheckBox(chkEnablePileUp[ID][ch], "Allow Pile-up Event", tabLayout, ch + 1, 3, DPP::DPPAlgorithmControl, DPP::Bit_DPPAlgorithmControl::EnablePileUpFlag, ch);
SetUpCheckBox(chkDisableSelfTrigger[ID][ch], "Disable Self Trigger", tabLayout, ch + 1, 1, DPP::DPPAlgorithmControl, DPP::Bit_DPPAlgorithmControl_PHA::DisableSelfTrigger, ch);
SetUpCheckBox(chkEnableRollOver[ID][ch], "Enable Roll-Over Event", tabLayout, ch + 1, 2, DPP::DPPAlgorithmControl, DPP::Bit_DPPAlgorithmControl_PHA::EnableRollOverFlag, ch);
SetUpCheckBox(chkEnablePileUp[ID][ch], "Allow Pile-up Event", tabLayout, ch + 1, 3, DPP::DPPAlgorithmControl, DPP::Bit_DPPAlgorithmControl_PHA::EnablePileUpFlag, ch);
SetUpComboBoxBit(cbTrigCount[ID][ch], "", tabLayout, ch + 1, 4, DPP::PHA::Bit_DPPAlgorithmControl2::ListTrigCounter, DPP::PHA::DPPAlgorithmControl2_G, DPP::PHA::Bit_DPPAlgorithmControl2::TriggerCounterFlag, 1, ch);
}
@ -1237,8 +1259,8 @@ void DigiSettingsPanel::SetUpPHAChannel(){
QLabel * lb2 = new QLabel("Decimate Gain", this); lb2->setAlignment(Qt::AlignHCenter); tabLayout->addWidget(lb2, 0, 4);
QLabel * lb3 = new QLabel("Events per Agg. [G]", this); lb3->setAlignment(Qt::AlignHCenter); tabLayout->addWidget(lb3, 0, 6);
}
SetUpComboBoxBit(cbDecimateTrace[ID][ch], "", tabLayout, ch + 1, 1, DPP::Bit_DPPAlgorithmControl::ListTraceDecimation, DPP::DPPAlgorithmControl, DPP::Bit_DPPAlgorithmControl::TraceDecimation, 1, ch);
SetUpComboBoxBit(cbDecimateGain[ID][ch], "", tabLayout, ch + 1, 3, DPP::Bit_DPPAlgorithmControl::ListDecimationGain, DPP::DPPAlgorithmControl, DPP::Bit_DPPAlgorithmControl::TraceDeciGain, 1, ch);
SetUpComboBoxBit(cbDecimateTrace[ID][ch], "", tabLayout, ch + 1, 1, DPP::Bit_DPPAlgorithmControl_PHA::ListTraceDecimation, DPP::DPPAlgorithmControl, DPP::Bit_DPPAlgorithmControl_PHA::TraceDecimation, 1, ch);
SetUpComboBoxBit(cbDecimateGain[ID][ch], "", tabLayout, ch + 1, 3, DPP::Bit_DPPAlgorithmControl_PHA::ListDecimationGain, DPP::DPPAlgorithmControl, DPP::Bit_DPPAlgorithmControl_PHA::TraceDeciGain, 1, ch);
SetUpSpinBox(sbNumEventAgg[ID][ch], "", tabLayout, ch + 1, 5, DPP::NumberEventsPerAggregate_G, ch);
}
@ -1259,9 +1281,9 @@ void DigiSettingsPanel::SetUpPHAChannel(){
QLabel * lb4 = new QLabel("Local Trig. Valid. [G]", this); lb4->setAlignment(Qt::AlignHCenter); tabLayout->addWidget(lb4, 0, 4);
QLabel * lb2 = new QLabel("Local Shaped Trig. [G]", this); lb2->setAlignment(Qt::AlignHCenter); tabLayout->addWidget(lb2, 0, 6);
}
SetUpComboBoxBit(cbTrigMode[ID][ch], "", tabLayout, ch + 1, 1, DPP::Bit_DPPAlgorithmControl::ListTrigMode, DPP::DPPAlgorithmControl, DPP::Bit_DPPAlgorithmControl::TriggerMode, 1, ch);
SetUpComboBoxBit(cbTriggerValid[ID][ch], "", tabLayout, ch + 1, 3, DPP::PHA::Bit_DPPAlgorithmControl2::ListLocalTrigValidMode, DPP::PHA::DPPAlgorithmControl2_G, DPP::PHA::Bit_DPPAlgorithmControl2::LocalTrigValidMode, 1, ch);
SetUpComboBoxBit(cbShapedTrigger[ID][ch], "", tabLayout, ch + 1, 5, DPP::PHA::Bit_DPPAlgorithmControl2::ListLocalShapeTrigMode, DPP::PHA::DPPAlgorithmControl2_G, DPP::PHA::Bit_DPPAlgorithmControl2::LocalShapeTriggerMode, 1, ch);
SetUpComboBoxBit(cbTrigMode[ID][ch], "", tabLayout, ch + 1, 1, DPP::Bit_DPPAlgorithmControl_PHA::ListTrigMode, DPP::DPPAlgorithmControl, DPP::Bit_DPPAlgorithmControl_PHA::TriggerMode, 1, ch);
SetUpComboBoxBit(cbLocalTriggerValid[ID][ch], "", tabLayout, ch + 1, 3, DPP::PHA::Bit_DPPAlgorithmControl2::ListLocalTrigValidMode, DPP::PHA::DPPAlgorithmControl2_G, DPP::PHA::Bit_DPPAlgorithmControl2::LocalTrigValidMode, 1, ch);
SetUpComboBoxBit(cbLocalShapedTrigger[ID][ch], "", tabLayout, ch + 1, 5, DPP::PHA::Bit_DPPAlgorithmControl2::ListLocalShapeTrigMode, DPP::PHA::DPPAlgorithmControl2_G, DPP::PHA::Bit_DPPAlgorithmControl2::LocalShapeTriggerMode, 1, ch);
SetUpCheckBox(chkTagCorrelation[ID][ch], "Tag Correlated events [G]", tabLayout, ch + 1, 8, DPP::PHA::DPPAlgorithmControl2_G, DPP::PHA::Bit_DPPAlgorithmControl2::TagCorrelatedEvents, ch);
}
@ -1281,6 +1303,229 @@ void DigiSettingsPanel::SetUpPHAChannel(){
//&###########################################################
void DigiSettingsPanel::SetUpPSDBoard(){
printf("============== %s \n", __func__);
SetUpCheckBox(chkAutoDataFlush[ID], "Auto Data Flush", bdCfgLayout[ID], 1, 0, DPP::BoardConfiguration, DPP::Bit_BoardConfig::EnableAutoDataFlush);
SetUpCheckBox(chkTrigPropagation[ID], "Trig. Propagate", bdCfgLayout[ID], 2, 0, DPP::BoardConfiguration, DPP::Bit_BoardConfig::TrigPropagation);
SetUpCheckBox(chkDecimateTrace[ID], "Disable Digi. Trace", bdCfgLayout[ID], 3, 0, DPP::BoardConfiguration, DPP::Bit_BoardConfig::DisableDigiTrace);
SetUpCheckBox(chkTraceRecording[ID], "Record Trace", bdCfgLayout[ID], 2, 1, DPP::BoardConfiguration, DPP::Bit_BoardConfig::RecordTrace);
SetUpCheckBox(chkEnableExtra2[ID], "Enable Extra", bdCfgLayout[ID], 3, 1, DPP::BoardConfiguration, DPP::Bit_BoardConfig::EnableExtra2);
SetUpComboBoxBit(cbAnaProbe1[ID], "Ana. Probe ", bdCfgLayout[ID], 1, 2, DPP::Bit_BoardConfig::ListAnaProbe_PSD, DPP::BoardConfiguration, DPP::Bit_BoardConfig::AnaProbe_PSD, 1, 0);
SetUpComboBoxBit(cbDigiProbe1[ID], "Digi. Probe 1 ", bdCfgLayout[ID], 3, 2, DPP::Bit_BoardConfig::ListDigiProbe1_PSD, DPP::BoardConfiguration, DPP::Bit_BoardConfig::DigiProbel1, 1, 0);
SetUpComboBoxBit(cbDigiProbe2[ID], "Digi. Probe 2 ", bdCfgLayout[ID], 4, 2, DPP::Bit_BoardConfig::ListDigiProbe2_PSD, DPP::BoardConfiguration, DPP::Bit_BoardConfig::DigiProbel2, 1, 0);
}
void DigiSettingsPanel::SetUpPSDChannel(){
QWidget * chAllSetting = new QWidget(this);
//chAllSetting->setStyleSheet("background-color: #ECECEC;");
chTab->addTab(chAllSetting, "Channel Settings");
QWidget * chStatus = new QWidget(this);
//chStatus->setStyleSheet("background-color: #ECECEC;");
chTab->addTab(chStatus, "Status");
QWidget * chInput = new QWidget(this);
chTab->addTab(chInput, "Input");
QWidget * chTrap = new QWidget(this);
chTab->addTab(chTrap, "Pulse Shape");
QWidget * chOthers = new QWidget(this);
chTab->addTab(chOthers, "Others");
//^========================= All Channels
QVBoxLayout * allSettingLayout = new QVBoxLayout(chAllSetting);
allSettingLayout->setAlignment(Qt::AlignTop);
allSettingLayout->setSpacing(2);
QWidget * jaja = new QWidget(this);
allSettingLayout->addWidget(jaja);
QHBoxLayout * papa = new QHBoxLayout(jaja);
papa->setAlignment(Qt::AlignLeft);
{//^============================== Channel selection
QLabel * lbChSel = new QLabel ("Ch : ", this);
lbChSel->setAlignment(Qt::AlignCenter | Qt::AlignRight);
papa->addWidget(lbChSel);
chSelection[ID] = new RComboBox(this);
chSelection[ID]->addItem("All Ch.", -1);
for( int i = 0; i < digi[ID]->GetNChannels(); i++) chSelection[ID]->addItem(QString::number(i), i);
papa->addWidget(chSelection[ID]);
connect(chSelection[ID], &RComboBox::currentIndexChanged, this, [=](){
SyncAllChannelsTab_PHA();
});
}
{//*=============== input
QGroupBox * inputBox = new QGroupBox("input Settings", this);
allSettingLayout->addWidget(inputBox);
QGridLayout * inputLayout = new QGridLayout(inputBox);
inputLayout->setSpacing(2);
SetUpSpinBox(sbRecordLength[ID][MaxNChannels], "Record Length [G][ns] : ", inputLayout, 0, 0, DPP::RecordLength_G);
SetUpComboBox(cbDynamicRange[ID][MaxNChannels], "Dynamic Range : ", inputLayout, 0, 2, DPP::InputDynamicRange);
SetUpSpinBox(sbPreTrigger[ID][MaxNChannels], "Pre-Trigger [ns] : ", inputLayout, 1, 0, DPP::PreTrigger);
SetUpSpinBox(sbThreshold[ID][MaxNChannels], "Threshold [LSB] : ", inputLayout, 1, 2, DPP::PSD::TriggerThreshold);
SetUpSpinBox(sbDCOffset[ID][MaxNChannels], "DC Offset [%] : ", inputLayout, 2, 0, DPP::ChannelDCOffset);
SetUpComboBoxBit(cbPolarity[ID][MaxNChannels], "Polarity : ", inputLayout, 2, 2, DPP::Bit_DPPAlgorithmControl_PSD::ListPolarity, DPP::DPPAlgorithmControl, DPP::Bit_DPPAlgorithmControl_PSD::Polarity);
SetUpCheckBox(chkChargePedestal[ID][MaxNChannels], "Add Charge Pedestal", inputLayout, 3, 1, DPP::DPPAlgorithmControl, DPP::Bit_DPPAlgorithmControl_PSD::ChargePedestal);
SetUpComboBoxBit(cbChargeSensitivity[ID][MaxNChannels], "Charge Sensitivity : ", inputLayout, 3, 2, DPP::Bit_DPPAlgorithmControl_PSD::ListChargeSensitivity_2Vpp, DPP::DPPAlgorithmControl, DPP::Bit_DPPAlgorithmControl_PSD::ChargeSensitivity);
connect( cbDynamicRange[ID][MaxNChannels], &RComboBox::currentTextChanged, this, [=](QString text){
cbChargeSensitivity[ID][MaxNChannels]->clear();
cbChargeSensitivity[ID][MaxNChannels]->addItem("", -999);
if ( text.contains("2") ){ // 2Vpp
const std::vector<std::pair<std::string, unsigned int>> list = DPP::Bit_DPPAlgorithmControl_PSD::ListChargeSensitivity_2Vpp;
for( int i = 0; i < (int) list.size(); i++){
cbChargeSensitivity[ID][MaxNChannels]->addItem(QString::fromStdString(list[i].first), list[i].second);
}
}
});
SetUpCheckBox(chkBaseLineCal[ID][MaxNChannels], "Baseline ReCal.", inputLayout, 4, 1, DPP::DPPAlgorithmControl, DPP::Bit_DPPAlgorithmControl_PSD::BaselineCal);
SetUpComboBoxBit(cbBaseLineAvg[ID][MaxNChannels], "Baseline Avg. : ", inputLayout, 4, 2, DPP::Bit_DPPAlgorithmControl_PSD::ListBaselineAvg, DPP::DPPAlgorithmControl, DPP::Bit_DPPAlgorithmControl_PSD::BaselineAvg);
SetUpCheckBox(chkDiscardQLong[ID][MaxNChannels], "Discard QLong < QThr ", inputLayout, 5, 1, DPP::DPPAlgorithmControl, DPP::Bit_DPPAlgorithmControl_PSD::DiscardQLongSmallerQThreshold);
SetUpSpinBox(sbChargeZeroSupZero[ID][MaxNChannels], "Q-Threshold : ", inputLayout, 5, 2, DPP::PSD::ChargeZeroSuppressionThreshold);
SetUpCheckBox(chkCutBelow[ID][MaxNChannels], "Cut Below Threshold ", inputLayout, 6, 1, DPP::DPPAlgorithmControl, DPP::Bit_DPPAlgorithmControl_PSD::EnablePSDCutBelow);
SetUpCheckBox(chkCutAbove[ID][MaxNChannels], "Cut Above Threshold ", inputLayout, 6, 2, DPP::DPPAlgorithmControl, DPP::Bit_DPPAlgorithmControl_PSD::EnablePSDCutAbove);
SetUpCheckBox(chkRejOverRange[ID][MaxNChannels], "Rej. Over-Range ", inputLayout, 6, 3, DPP::DPPAlgorithmControl, DPP::Bit_DPPAlgorithmControl_PSD::RejectOverRange);
}
{//*=================== Trigger
QGroupBox * trigBox = new QGroupBox("Trigger Settings", this);
allSettingLayout->addWidget(trigBox);
QGridLayout * trigLayout = new QGridLayout(trigBox);
trigLayout->setSpacing(2);
SetUpCheckBox(chkDisableOppositePulse[ID][MaxNChannels], "Disable 0-Xing inhibit from opp. pulse", trigLayout, 0, 0, DPP::DPPAlgorithmControl, DPP::Bit_DPPAlgorithmControl_PSD::DisableOppositePolarityInhibitZeroCrossingOnCFD, -1, 2);
SetUpCheckBox(chkDisableSelfTrigger[ID][MaxNChannels], "Disable Self Trigger ", trigLayout, 0, 2, DPP::DPPAlgorithmControl, DPP::Bit_DPPAlgorithmControl_PSD::DisableSelfTrigger);
SetUpCheckBox(chkRejPileUp[ID][MaxNChannels], "Rej. Pile-Up ", trigLayout, 1, 0, DPP::DPPAlgorithmControl, DPP::Bit_DPPAlgorithmControl_PSD::RejectPileup);
SetUpCheckBox(chkPileUpInGate[ID][MaxNChannels], "Pile-Up in Gate", trigLayout, 1, 2, DPP::DPPAlgorithmControl, DPP::Bit_DPPAlgorithmControl_PSD::PileupWithinGate);
SetUpCheckBox(chkDisableTriggerHysteresis[ID][MaxNChannels], "Disbale Trig. Hysteresis ", trigLayout, 2, 0, DPP::DPPAlgorithmControl, DPP::Bit_DPPAlgorithmControl_PSD::DisableTriggerHysteresis, -1, 2);
SetUpComboBoxBit(cbTrigMode[ID][MaxNChannels], "Trig Mode : ", trigLayout, 2, 1, DPP::Bit_DPPAlgorithmControl_PSD::ListTrigMode, DPP::DPPAlgorithmControl, DPP::Bit_DPPAlgorithmControl_PSD::TriggerMode, 2);
SetUpComboBoxBit(cbLocalTriggerValid[ID][MaxNChannels], "Local Trig. Valid. [G] : ", trigLayout, 3, 0, DPP::PSD::Bit_DPPAlgorithmControl2::ListLocalTrigValidMode, DPP::PSD::DPPAlgorithmControl2_G, DPP::PSD::Bit_DPPAlgorithmControl2::LocalTrigValidMode);
SetUpSpinBox(sbTriggerHoldOff[ID][MaxNChannels], "Tigger Hold-off [ns] : ", trigLayout, 3, 2, DPP::PSD::TriggerHoldOffWidth);
SetUpComboBoxBit(cbAdditionLocalTrigValid[ID][MaxNChannels], "Local Trig. Valid. Opt [G] : ", trigLayout, 4, 0, DPP::PSD::Bit_DPPAlgorithmControl2::ListAdditionLocalTrigValid, DPP::PSD::DPPAlgorithmControl2_G, DPP::PSD::Bit_DPPAlgorithmControl2::AdditionLocalTrigValid);
SetUpComboBoxBit(cbDiscriMode[ID][MaxNChannels], "Discri. Mode : ", trigLayout, 4, 2, DPP::Bit_DPPAlgorithmControl_PSD::ListDiscriminationMode, DPP::DPPAlgorithmControl, DPP::Bit_DPPAlgorithmControl_PSD::DiscriminationMode);
SetUpComboBoxBit(cbLocalShapedTrigger[ID][MaxNChannels], "Local Shaped Trig. [G] : ", trigLayout, 5, 0, DPP::PSD::Bit_DPPAlgorithmControl2::ListLocalShapeTrigMode, DPP::PSD::DPPAlgorithmControl2_G, DPP::PSD::Bit_DPPAlgorithmControl2::LocalShapeTriggerMode, 1);
SetUpSpinBox(sbShapedTrigWidth[ID][MaxNChannels], "Shaped Trig. Width [ns] : ", trigLayout, 5, 2, DPP::PSD::ShapedTriggerWidth);
SetUpComboBoxBit(cbTriggerOpt[ID][MaxNChannels], "Trigger Count opt : ", trigLayout, 6, 0, DPP::Bit_DPPAlgorithmControl_PSD::ListTriggerCountOpt, DPP::DPPAlgorithmControl, DPP::Bit_DPPAlgorithmControl_PSD::TriggerCountOpt, 2);
}
{//*===================== PSD
QGroupBox * trapBox = new QGroupBox("PSD Settings", this);
allSettingLayout->addWidget(trapBox);
QGridLayout * trapLayout = new QGridLayout(trapBox);
trapLayout->setSpacing(2);
SetUpSpinBox(sbShortGate[ID][MaxNChannels], "Short Gate [ns] : ", trapLayout, 1, 0, DPP::PSD::ShortGateWidth);
SetUpSpinBox(sbLongGate[ID][MaxNChannels], "Long Gate [ns] : ", trapLayout, 1, 2, DPP::PSD::LongGateWidth);
SetUpSpinBox(sbGateOffset[ID][MaxNChannels], "Gate Offset [ns] : ", trapLayout, 2, 0, DPP::PSD::GateOffset);
SetUpSpinBox(sbFixedBaseline[ID][MaxNChannels], "Fixed Baseline : ", trapLayout, 2, 2, DPP::PSD::FixedBaseline);
SetUpSpinBox(sbTriggerLatency[ID][MaxNChannels], "Trigger Latency [ns] : ", trapLayout, 3, 0, DPP::PSD::TriggerLatency);
SetUpSpinBox(sbPSDCutThreshold[ID][MaxNChannels], "PSD Cut Threshold : ", trapLayout, 3, 2, DPP::PSD::ThresholdForPSDCut);
SetUpSpinBox(sbPURGAPThreshold[ID][MaxNChannels], "PUR-GAP Threshold : ", trapLayout, 4, 0, DPP::PSD::PurGapThreshold);
SetUpSpinBox(sbCFDDely[ID][MaxNChannels], "CFD Delay [ns] : ", trapLayout, 5, 0, DPP::PSD::CFDSetting);
SetUpComboBoxBit(cbCFDFraction[ID][MaxNChannels], "CFD Fraction : ", trapLayout, 5, 2, DPP::PSD::Bit_CFDSetting::ListCFDFraction, DPP::PSD::CFDSetting, DPP::PSD::Bit_CFDSetting::CFDFraction, 1);
SetUpComboBoxBit(cbCFDInterpolation[ID][MaxNChannels], "CFD interpolaton : ", trapLayout, 6, 0, DPP::PSD::Bit_CFDSetting::ListItepolation, DPP::PSD::CFDSetting, DPP::PSD::Bit_CFDSetting::Interpolation, 3);
}
{//*====================== Others
QGroupBox * otherBox = new QGroupBox("Others Settings", this);
allSettingLayout->addWidget(otherBox);
QGridLayout * otherLayout = new QGridLayout(otherBox);
otherLayout->setSpacing(2);
SetUpCheckBox(chkTestPule[ID][MaxNChannels], "Int. Test Pulse : ", otherLayout, 7, 0, DPP::DPPAlgorithmControl, DPP::Bit_DPPAlgorithmControl_PSD::InternalTestPulse);
if( digi[ID]->GetBoardInfo().Model == CAEN_DGTZ_V1730 ){
SetUpComboBoxBit(cbTestPulseRate[ID][MaxNChannels], "Test Pulse Rate : ", otherLayout, 8, 0, DPP::Bit_DPPAlgorithmControl_PSD::ListTestPulseRate_730, DPP::DPPAlgorithmControl, DPP::Bit_DPPAlgorithmControl_PSD::TestPulseRate);
}
if( digi[ID]->GetBoardInfo().Model == CAEN_DGTZ_V1725 ){
SetUpComboBoxBit(cbTestPulseRate[ID][MaxNChannels], "Test Pulse Rate : ", otherLayout, 8, 0, DPP::Bit_DPPAlgorithmControl_PSD::ListTestPulseRate_725, DPP::DPPAlgorithmControl, DPP::Bit_DPPAlgorithmControl_PSD::TestPulseRate);
}
SetUpCheckBox(chkMarkSaturation[ID][MaxNChannels], "Mark Saturation Pulse [G]", otherLayout, 8, 0, DPP::PSD::DPPAlgorithmControl2_G, DPP::PSD::Bit_DPPAlgorithmControl2::MarkSaturation);
SetUpSpinBox(sbNumEventAgg[ID][MaxNChannels], "Events per Agg. [G] : ", otherLayout, 0, 0, DPP::NumberEventsPerAggregate_G);
SetUpSpinBox(sbVetoWidth[ID][MaxNChannels], "Veto Width : ", otherLayout, 0, 2, DPP::VetoWidth);
SetUpComboBoxBit(cbVetoStep[ID][MaxNChannels], "Veto Step : ", otherLayout, 1, 0, DPP::Bit_VetoWidth::ListVetoStep, DPP::VetoWidth, DPP::Bit_VetoWidth::VetoStep, 1);
SetUpComboBoxBit(cbExtra2Option[ID][MaxNChannels], "Extra word Option [G] : ", otherLayout, 4, 0, DPP::PSD::Bit_DPPAlgorithmControl2::ListExtraWordOpt, DPP::PSD::DPPAlgorithmControl2_G, DPP::PSD::Bit_DPPAlgorithmControl2::ExtraWordOption, 3);
SetUpComboBoxBit(cbSmoothedChargeIntegration[ID][MaxNChannels], "Smooth Q-integration [G] : ", otherLayout, 5, 0, DPP::PSD::Bit_DPPAlgorithmControl2::ListSmoothedChargeIntegration, DPP::PSD::DPPAlgorithmControl2_G, DPP::PSD::Bit_DPPAlgorithmControl2::SmoothedChargeIntegration, 1);
SetUpComboBoxBit(cbTrigCount[ID][MaxNChannels], "Trig. Counter Flag [G] : ", otherLayout, 6, 0, DPP::PSD::Bit_DPPAlgorithmControl2::ListTrigCounter, DPP::PSD::DPPAlgorithmControl2_G, DPP::PSD::Bit_DPPAlgorithmControl2::TriggerCounterFlag);
SetUpComboBoxBit(cbVetoSource[ID][MaxNChannels], "Veto Source [G] : ", otherLayout, 7, 0, DPP::PSD::Bit_DPPAlgorithmControl2::ListVetoSource, DPP::PSD::DPPAlgorithmControl2_G, DPP::PSD::Bit_DPPAlgorithmControl2::VetoSource);
SetUpComboBoxBit(cbVetoMode[ID][MaxNChannels], "Veto Mode [G] : ", otherLayout, 10, 0, DPP::PSD::Bit_DPPAlgorithmControl2::ListVetoMode, DPP::PSD::DPPAlgorithmControl2_G, DPP::PSD::Bit_DPPAlgorithmControl2::VetoMode);
SetUpCheckBox(chkResetTimestampByTRGIN[ID][MaxNChannels], "TRI-IN Reset Timestamp [G]", otherLayout, 11, 0, DPP::PSD::DPPAlgorithmControl2_G, DPP::PSD::Bit_DPPAlgorithmControl2::ResetTimestampByTRGIN);
}
{//^================== status
QGridLayout * statusLayout = new QGridLayout(chStatus);
statusLayout->setAlignment(Qt::AlignTop | Qt::AlignLeft);
statusLayout->setSpacing(2);
QLabel * lbCh = new QLabel ("Ch.", this); lbCh->setAlignment(Qt::AlignHCenter); statusLayout->addWidget(lbCh, 0, 0);
QLabel * lbLED = new QLabel ("Status", this); lbLED->setAlignment(Qt::AlignHCenter); statusLayout->addWidget(lbLED, 0, 1, 1, 3);
QLabel * lbTemp = new QLabel ("Temp [C]", this); lbTemp->setAlignment(Qt::AlignHCenter); statusLayout->addWidget(lbTemp, 0, 4);
QStringList chStatusInfo = {"SPI bus is busy.", "ADC Calibration is done.", "ADC shutdown, over-heat"};
for( int i = 0; i < MaxNChannels; i++){
QLabel * lbChID = new QLabel (QString::number(i), this);
lbChID->setAlignment(Qt::AlignRight | Qt::AlignCenter);
lbChID->setFixedWidth(20);
statusLayout->addWidget(lbChID, i + 1, 0);
for( int j = 0; j < 3; j++ ){
bnChStatus[ID][i][j] = new QPushButton(this);
bnChStatus[ID][i][j]->setToolTip(chStatusInfo[j]);
bnChStatus[ID][i][j]->setFixedSize(20, 20);
statusLayout->addWidget(bnChStatus[ID][i][j], i + 1, j + 1);
}
leADCTemp[ID][i] = new QLineEdit(this);
leADCTemp[ID][i]->setReadOnly(true);
leADCTemp[ID][i]->setFixedWidth(100);
statusLayout->addWidget(leADCTemp[ID][i], i +1, 3 + 1);
}
QPushButton * bnADCCali = new QPushButton("ADC Calibration", this);
statusLayout->addWidget(bnADCCali, MaxNChannels + 1, 0, 1, 5);
connect(bnADCCali, &QPushButton::clicked, this, [=](){
digi[ID]->WriteRegister(DPP::ADCCalibration_W, 1);
for( int i = 0 ; i < digi[ID]->GetNChannels(); i++ ) digi[ID]->ReadRegister(DPP::ChannelStatus_R, i);
UpdatePanelFromMemory();
});
}
}
@ -1341,28 +1586,12 @@ void DigiSettingsPanel::UpdatePanelFromMemory(){
uint32_t BdCfg = digi[ID]->GetSettingFromMemory(DPP::BoardConfiguration);
chkAutoDataFlush[ID]->setChecked( Digitizer::ExtractBits(BdCfg, DPP::Bit_BoardConfig::EnableAutoDataFlush) );
chkDecimateTrace[ID]->setChecked( Digitizer::ExtractBits(BdCfg, DPP::Bit_BoardConfig::DecimateTrace) );
chkTrigPropagation[ID]->setChecked( Digitizer::ExtractBits(BdCfg, DPP::Bit_BoardConfig::TrigPropagation) );
chkDualTrace[ID]->setChecked( Digitizer::ExtractBits(BdCfg, DPP::Bit_BoardConfig::DualTrace) );
chkDecimateTrace[ID]->setChecked( Digitizer::ExtractBits(BdCfg, DPP::Bit_BoardConfig::DecimateTrace) );
chkTraceRecording[ID]->setChecked( Digitizer::ExtractBits(BdCfg, DPP::Bit_BoardConfig::TrigPropagation) );
chkEnableExtra2[ID]->setChecked( Digitizer::ExtractBits(BdCfg, DPP::Bit_BoardConfig::EnableExtra2) );
int temp = Digitizer::ExtractBits(BdCfg, DPP::Bit_BoardConfig::AnalogProbe1);
for( int i = 0; i < cbAnaProbe1[ID]->count(); i++){
if( cbAnaProbe1[ID]->itemData(i).toInt() == temp) {
cbAnaProbe1[ID]->setCurrentIndex(i);
break;
}
}
temp = Digitizer::ExtractBits(BdCfg, DPP::Bit_BoardConfig::AnalogProbe2);
for(int i = 0; i < cbAnaProbe2[ID]->count(); i++){
if( cbAnaProbe2[ID]->itemData(i).toInt() == temp) {
cbAnaProbe2[ID]->setCurrentIndex(i);
break;
}
}
temp = Digitizer::ExtractBits(BdCfg, DPP::Bit_BoardConfig::DigiProbel1);
int temp = Digitizer::ExtractBits(BdCfg, DPP::Bit_BoardConfig::DigiProbel1);
for(int i = 0; i < cbDigiProbe1[ID]->count(); i++){
if( cbDigiProbe1[ID]->itemData(i).toInt() == temp) {
cbDigiProbe1[ID]->setCurrentIndex(i);
@ -1377,6 +1606,35 @@ void DigiSettingsPanel::UpdatePanelFromMemory(){
}
}
if( digi[ID]->GetDPPType() == V1730_DPP_PHA_CODE ) {
chkDualTrace[ID]->setChecked( Digitizer::ExtractBits(BdCfg, DPP::Bit_BoardConfig::DualTrace) );
temp = Digitizer::ExtractBits(BdCfg, DPP::Bit_BoardConfig::AnalogProbe1);
for( int i = 0; i < cbAnaProbe1[ID]->count(); i++){
if( cbAnaProbe1[ID]->itemData(i).toInt() == temp) {
cbAnaProbe1[ID]->setCurrentIndex(i);
break;
}
}
temp = Digitizer::ExtractBits(BdCfg, DPP::Bit_BoardConfig::AnalogProbe2);
for(int i = 0; i < cbAnaProbe2[ID]->count(); i++){
if( cbAnaProbe2[ID]->itemData(i).toInt() == temp) {
cbAnaProbe2[ID]->setCurrentIndex(i);
break;
}
}
}
if( digi[ID]->GetDPPType() == V1730_DPP_PSD_CODE ) {
temp = Digitizer::ExtractBits(BdCfg, DPP::Bit_BoardConfig::AnaProbe_PSD);
for( int i = 0; i < cbAnaProbe1[ID]->count(); i++){
if( cbAnaProbe1[ID]->itemData(i).toInt() == temp) {
cbAnaProbe1[ID]->setCurrentIndex(i);
break;
}
}
}
//*========================================
uint32_t chMask = digi[ID]->GetSettingFromMemory(DPP::ChannelEnableMask);
for( int i = 0; i < MaxNChannels; i++){
@ -1509,7 +1767,7 @@ void DigiSettingsPanel::UpdatePanelFromMemory(){
leADCTemp[ID][i]->setText( QString::number( digi[ID]->GetSettingFromMemory(DPP::ChannelADCTemperature_R, i) ) );
}
UpdatePHASetting();
if( digi[ID]->GetDPPType() == V1730_DPP_PHA_CODE ) UpdatePHASetting();
enableSignalSlot = true;
}
@ -1675,8 +1933,8 @@ void DigiSettingsPanel::SyncAllChannelsTab_PHA(){
SyncComboBox(cbBaseLineAvg);
SyncComboBox(cbDecimateGain);
SyncComboBox(cbTrigMode);
SyncComboBox(cbTriggerValid);
SyncComboBox(cbShapedTrigger);
SyncComboBox(cbLocalTriggerValid);
SyncComboBox(cbLocalShapedTrigger);
SyncComboBox(cbVetoSource);
SyncComboBox(cbTrigCount);
SyncComboBox(cbExtra2Option);
@ -1721,16 +1979,16 @@ void DigiSettingsPanel::UpdatePHASetting(){
uint32_t dpp = digi[ID]->GetSettingFromMemory(DPP::DPPAlgorithmControl, ch);
chkDisableSelfTrigger[ID][ch]->setChecked( Digitizer::ExtractBits(dpp, DPP::Bit_DPPAlgorithmControl::DisableSelfTrigger) );
chkEnableRollOver[ID][ch]->setChecked( Digitizer::ExtractBits(dpp, DPP::Bit_DPPAlgorithmControl::EnableRollOverFlag) );
chkEnablePileUp[ID][ch]->setChecked( Digitizer::ExtractBits(dpp, DPP::Bit_DPPAlgorithmControl::EnablePileUpFlag) );
chkDisableSelfTrigger[ID][ch]->setChecked( Digitizer::ExtractBits(dpp, DPP::Bit_DPPAlgorithmControl_PHA::DisableSelfTrigger) );
chkEnableRollOver[ID][ch]->setChecked( Digitizer::ExtractBits(dpp, DPP::Bit_DPPAlgorithmControl_PHA::EnableRollOverFlag) );
chkEnablePileUp[ID][ch]->setChecked( Digitizer::ExtractBits(dpp, DPP::Bit_DPPAlgorithmControl_PHA::EnablePileUpFlag) );
UpdateComboBoxBit(cbDecimateTrace[ID][ch], dpp, DPP::Bit_DPPAlgorithmControl::TraceDecimation);
UpdateComboBoxBit(cbPolarity[ID][ch], dpp, DPP::Bit_DPPAlgorithmControl::Polarity);
UpdateComboBoxBit(cbPeakAvg[ID][ch], dpp, DPP::Bit_DPPAlgorithmControl::PeakMean);
UpdateComboBoxBit(cbBaseLineAvg[ID][ch], dpp, DPP::Bit_DPPAlgorithmControl::BaselineAvg);
UpdateComboBoxBit(cbDecimateGain[ID][ch], dpp, DPP::Bit_DPPAlgorithmControl::TraceDeciGain);
UpdateComboBoxBit(cbTrigMode[ID][ch], dpp, DPP::Bit_DPPAlgorithmControl::TriggerMode);
UpdateComboBoxBit(cbDecimateTrace[ID][ch], dpp, DPP::Bit_DPPAlgorithmControl_PHA::TraceDecimation);
UpdateComboBoxBit(cbPolarity[ID][ch], dpp, DPP::Bit_DPPAlgorithmControl_PHA::Polarity);
UpdateComboBoxBit(cbPeakAvg[ID][ch], dpp, DPP::Bit_DPPAlgorithmControl_PHA::PeakMean);
UpdateComboBoxBit(cbBaseLineAvg[ID][ch], dpp, DPP::Bit_DPPAlgorithmControl_PHA::BaselineAvg);
UpdateComboBoxBit(cbDecimateGain[ID][ch], dpp, DPP::Bit_DPPAlgorithmControl_PHA::TraceDeciGain);
UpdateComboBoxBit(cbTrigMode[ID][ch], dpp, DPP::Bit_DPPAlgorithmControl_PHA::TriggerMode);
uint32_t dpp2 = digi[ID]->GetSettingFromMemory(DPP::PHA::DPPAlgorithmControl2_G, ch);
@ -1738,8 +1996,8 @@ void DigiSettingsPanel::UpdatePHASetting(){
chkBaselineRestore[ID][ch]->setChecked( Digitizer::ExtractBits(dpp2, DPP::PHA::Bit_DPPAlgorithmControl2::EnableActiveBaselineRestoration));
chkTagCorrelation[ID][ch]->setChecked( Digitizer::ExtractBits(dpp2, DPP::PHA::Bit_DPPAlgorithmControl2::TagCorrelatedEvents));
UpdateComboBoxBit(cbTriggerValid[ID][ch], dpp2, DPP::PHA::Bit_DPPAlgorithmControl2::LocalTrigValidMode);
UpdateComboBoxBit(cbShapedTrigger[ID][ch], dpp2, DPP::PHA::Bit_DPPAlgorithmControl2::LocalShapeTriggerMode);
UpdateComboBoxBit(cbLocalTriggerValid[ID][ch], dpp2, DPP::PHA::Bit_DPPAlgorithmControl2::LocalTrigValidMode);
UpdateComboBoxBit(cbLocalShapedTrigger[ID][ch], dpp2, DPP::PHA::Bit_DPPAlgorithmControl2::LocalShapeTriggerMode);
UpdateComboBoxBit(cbVetoSource[ID][ch], dpp2, DPP::PHA::Bit_DPPAlgorithmControl2::VetoSource);
UpdateComboBoxBit(cbTrigCount[ID][ch], dpp2, DPP::PHA::Bit_DPPAlgorithmControl2::TriggerCounterFlag);
UpdateComboBoxBit(cbExtra2Option[ID][ch], dpp2, DPP::PHA::Bit_DPPAlgorithmControl2::Extra2Option);

View File

@ -33,18 +33,22 @@ signals:
private:
void SetUpInfo(QString label, std::string value, QGridLayout *gLayout, int row, int col);
void SetUpCheckBox(QCheckBox * &chkBox, QString label, QGridLayout *gLayout, int row, int col, Reg para, std::pair<unsigned short, unsigned short> bit, int ch = -1);
void SetUpCheckBox(QCheckBox * &chkBox, QString label, QGridLayout *gLayout, int row, int col, Reg para, std::pair<unsigned short, unsigned short> bit, int ch = -1, int colSpan = 1);
void SetUpComboBoxBit(RComboBox * &cb, QString label, QGridLayout *gLayout, int row, int col, std::vector<std::pair<std::string, unsigned int>> items, Reg para, std::pair<unsigned short, unsigned short> bit, int colspan = 1, int ch = -1);
void SetUpComboBox(RComboBox * &cb, QString label, QGridLayout *gLayout, int row, int col, Reg para, int ch = -1);
void SetUpSpinBox(RSpinBox * &sb, QString label, QGridLayout *gLayout, int row, int col, Reg para, int ch = -1);
void CleanUpGroupBox(QGroupBox * & gBox);
void SetUpChannelMask();
void SetUpACQReadOutTab();
void SetUpGlobalTriggerMaskAndFrontPanelMask(QGridLayout * & gLayout);
void SetUpPHABoard();
void SetUpPHAChannel();
void SetUpPSDBoard();
void SetUpPSDChannel();
void UpdateSpinBox(RSpinBox * &sb, Reg para, int ch);
void UpdateComboBox(RComboBox * &cb, Reg para, int ch);
@ -152,26 +156,36 @@ private:
RComboBox * cbTRGOUTUseOtherTriggers[MaxNDigitizer]; // combine bit 30, 31
/// ============================ Channel
QWidget * chAllSetting;
QWidget * chStatus;
QWidget * chInput;
QWidget * chTrap;
QWidget * chOthers;
QTabWidget * chTab;
RComboBox * chSelection[MaxNDigitizer];
//---------- PHA
//----------- common for PHA and PSD
RSpinBox * sbRecordLength[MaxNDigitizer][MaxNChannels + 1];
RComboBox * cbDynamicRange[MaxNDigitizer][MaxNChannels + 1];
RSpinBox * sbPreTrigger[MaxNDigitizer][MaxNChannels + 1];
RComboBox * cbRCCR2Smoothing[MaxNDigitizer][MaxNChannels + 1];
RSpinBox * sbInputRiseTime[MaxNDigitizer][MaxNChannels + 1];
RSpinBox * sbThreshold[MaxNDigitizer][MaxNChannels + 1];
RSpinBox * sbRiseTimeValidWin[MaxNDigitizer][MaxNChannels + 1];
RSpinBox * sbTriggerHoldOff[MaxNDigitizer][MaxNChannels + 1];
RSpinBox * sbShapedTrigWidth[MaxNDigitizer][MaxNChannels + 1];
RSpinBox * sbDCOffset[MaxNDigitizer][MaxNChannels + 1];
RComboBox * cbPolarity[MaxNDigitizer][MaxNChannels + 1];
RSpinBox * sbShapedTrigWidth[MaxNDigitizer][MaxNChannels + 1];
RSpinBox * sbTriggerHoldOff[MaxNDigitizer][MaxNChannels + 1];
RComboBox * cbTrigMode[MaxNDigitizer][MaxNChannels + 1];
RComboBox * cbBaseLineAvg[MaxNDigitizer][MaxNChannels + 1];
RSpinBox * sbNumEventAgg[MaxNDigitizer][MaxNChannels + 1];
RSpinBox * sbVetoWidth[MaxNDigitizer][MaxNChannels + 1];
RComboBox * cbVetoStep[MaxNDigitizer][MaxNChannels + 1];
RComboBox * cbLocalShapedTrigger[MaxNDigitizer][MaxNChannels + 1];
RComboBox * cbLocalTriggerValid[MaxNDigitizer][MaxNChannels + 1];
RComboBox * cbExtra2Option[MaxNDigitizer][MaxNChannels + 1];
RComboBox * cbVetoSource[MaxNDigitizer][MaxNChannels + 1];
QCheckBox * chkDisableSelfTrigger[MaxNDigitizer][MaxNChannels + 1];
RComboBox * cbTrigCount[MaxNDigitizer][MaxNChannels + 1];
//---------- PHA
RComboBox * cbRCCR2Smoothing[MaxNDigitizer][MaxNChannels + 1];
RSpinBox * sbInputRiseTime[MaxNDigitizer][MaxNChannels + 1];
RSpinBox * sbRiseTimeValidWin[MaxNDigitizer][MaxNChannels + 1];
RSpinBox * sbTrapRiseTime[MaxNDigitizer][MaxNChannels + 1];
RSpinBox * sbTrapFlatTop[MaxNDigitizer][MaxNChannels + 1];
@ -180,27 +194,56 @@ private:
RSpinBox * sbPeaking[MaxNDigitizer][MaxNChannels + 1];
RSpinBox * sbPeakingHoldOff[MaxNDigitizer][MaxNChannels + 1];
RComboBox * cbPeakAvg[MaxNDigitizer][MaxNChannels + 1];
RComboBox * cbBaseLineAvg[MaxNDigitizer][MaxNChannels + 1];
QCheckBox * chkActiveBaseline[MaxNDigitizer][MaxNChannels + 1];
QCheckBox * chkBaselineRestore[MaxNDigitizer][MaxNChannels + 1];
RSpinBox * sbFineGain[MaxNDigitizer][MaxNChannels + 1];
QCheckBox * chkDisableSelfTrigger[MaxNDigitizer][MaxNChannels + 1];
QCheckBox * chkEnableRollOver[MaxNDigitizer][MaxNChannels + 1];
QCheckBox * chkEnablePileUp[MaxNDigitizer][MaxNChannels + 1];
QCheckBox * chkTagCorrelation[MaxNDigitizer][MaxNChannels + 1];
RComboBox * cbDecimateTrace[MaxNDigitizer][MaxNChannels + 1];
RComboBox * cbDecimateGain[MaxNDigitizer][MaxNChannels + 1];
RSpinBox * sbNumEventAgg[MaxNDigitizer][MaxNChannels + 1];
RComboBox * cbTriggerValid[MaxNDigitizer][MaxNChannels + 1];
RComboBox * cbTrigCount[MaxNDigitizer][MaxNChannels + 1];
RComboBox * cbTrigMode[MaxNDigitizer][MaxNChannels + 1];
RComboBox * cbShapedTrigger[MaxNDigitizer][MaxNChannels + 1];
RComboBox * cbExtra2Option[MaxNDigitizer][MaxNChannels + 1];
RComboBox * cbVetoSource[MaxNDigitizer][MaxNChannels + 1];
RSpinBox * sbVetoWidth[MaxNDigitizer][MaxNChannels + 1];
RComboBox * cbVetoStep[MaxNDigitizer][MaxNChannels + 1];
//---------------- PSD
RComboBox * cbChargeSensitivity[MaxNDigitizer][MaxNChannels + 1];
QCheckBox * chkChargePedestal[MaxNDigitizer][MaxNChannels + 1];
RComboBox * cbTriggerOpt[MaxNDigitizer][MaxNChannels + 1];
RComboBox * cbDiscriMode[MaxNDigitizer][MaxNChannels + 1];
QCheckBox * chkPileUpInGate[MaxNDigitizer][MaxNChannels + 1];
QCheckBox * chkTestPule[MaxNDigitizer][MaxNChannels + 1];
RComboBox * cbTestPulseRate[MaxNDigitizer][MaxNChannels + 1];
QCheckBox * chkBaseLineCal[MaxNDigitizer][MaxNChannels + 1];
QCheckBox * chkDiscardQLong[MaxNDigitizer][MaxNChannels + 1];
QCheckBox * chkRejPileUp[MaxNDigitizer][MaxNChannels + 1];
QCheckBox * chkCutBelow[MaxNDigitizer][MaxNChannels + 1];
QCheckBox * chkCutAbove[MaxNDigitizer][MaxNChannels + 1];
QCheckBox * chkRejOverRange[MaxNDigitizer][MaxNChannels + 1];
QCheckBox * chkDisableTriggerHysteresis[MaxNDigitizer][MaxNChannels + 1];
QCheckBox * chkDisableOppositePulse[MaxNDigitizer][MaxNChannels + 1];
RSpinBox * sbChargeZeroSupZero[MaxNDigitizer][MaxNChannels + 1];
RSpinBox * sbShortGate[MaxNDigitizer][MaxNChannels + 1];
RSpinBox * sbLongGate[MaxNDigitizer][MaxNChannels + 1];
RSpinBox * sbGateOffset[MaxNDigitizer][MaxNChannels + 1];
RSpinBox * sbFixedBaseline[MaxNDigitizer][MaxNChannels + 1];
RSpinBox * sbTriggerLatency[MaxNDigitizer][MaxNChannels + 1];
RSpinBox * sbPSDCutThreshold[MaxNDigitizer][MaxNChannels + 1];
RSpinBox * sbPURGAPThreshold[MaxNDigitizer][MaxNChannels + 1];
RSpinBox * sbCFDDely[MaxNDigitizer][MaxNChannels + 1];
RComboBox * cbCFDFraction[MaxNDigitizer][MaxNChannels + 1];
RComboBox * cbCFDInterpolation[MaxNDigitizer][MaxNChannels + 1];
RComboBox * cbSmoothedChargeIntegration[MaxNDigitizer][MaxNChannels + 1];
QCheckBox * chkMarkSaturation[MaxNDigitizer][MaxNChannels + 1];
RComboBox * cbAdditionLocalTrigValid[MaxNDigitizer][MaxNChannels + 1];
RComboBox * cbVetoMode[MaxNDigitizer][MaxNChannels + 1];
QCheckBox * chkResetTimestampByTRGIN[MaxNDigitizer][MaxNChannels + 1];
//---------------- channel status
QPushButton * bnChStatus[MaxNDigitizer][MaxNChannels][3];
QLineEdit * leADCTemp[MaxNDigitizer][MaxNChannels];

View File

@ -19,7 +19,7 @@
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent){
setWindowTitle("FSU DAQ");
setGeometry(500, 100, 1000, 500);
setGeometry(500, 100, 1100, 500);
digi = nullptr;
nDigi = 0;
@ -358,8 +358,17 @@ void MainWindow::OpenDigitizers(){
QString fileName = rawDataPath + "/Digi-" + QString::number(digi[i]->GetSerialNumber()) + ".bin"; //TODO add DPP Type in File Name
QFile file(fileName);
if( !file.open(QIODevice::Text | QIODevice::ReadOnly) ) {
LogMsg("<b>" + fileName + "</b> not found. Program predefined PHA settings."); //TODO, PSD?
if( digi[i]->GetDPPType() == V1730_DPP_PHA_CODE ) {
digi[i]->ProgramPHABoard();
LogMsg("<b>" + fileName + "</b> not found. Program predefined PHA settings.");
}
if( digi[i]->GetDPPType() == V1730_DPP_PSD_CODE ){
LogMsg("<b>" + fileName + "</b> not found."); //TODO, PSD?
}
}else{
LogMsg("Found <b>" + fileName + "</b> for digitizer settings.");

View File

@ -208,6 +208,7 @@ namespace DPP {
const std::pair<unsigned short, unsigned short> EnableExtra2 = {1, 17} ;
const std::pair<unsigned short, unsigned short> DigiProbel1 = {4, 20} ;
const std::pair<unsigned short, unsigned short> DigiProbel2 = {3, 26} ;
const std::pair<unsigned short, unsigned short> DisableDigiTrace = {1, 31} ;
const std::vector<std::pair<std::string, unsigned int>> ListAnaProbe1_PHA = {{"Input", 0},
{"RC-CR", 1},
@ -233,9 +234,36 @@ namespace DPP {
{"Budy", 12}};
const std::vector<std::pair<std::string, unsigned int>> ListDigiProbe2_PHA = {{"Trigger", 0}};
///--------------------------
const std::pair<unsigned short, unsigned short> AnaProbe_PSD = {3, 11} ;
const std::vector<std::pair<std::string, unsigned int>> ListAnaProbe_PSD = {{"Input + N/A", 0},
{"CFD + N/A", 2},
{"Input + Baseline",1},
{"CFD + Baseline", 3},
{"Input + CFD", 5}};
const std::vector<std::pair<std::string, unsigned int>> ListDigiProbe1_PSD = {{"Long gate", 0},
{"Over Threshold", 1},
{"Shaped TRG", 2},
{"TRG Val. Accp. Win", 3},
{"Pile Up", 4},
{"Coincidence", 5},
{"Trigger", 7}};
const std::vector<std::pair<std::string, unsigned int>> ListDigiProbe2_PSD = {{"Short Gate", 0},
{"Over Threshold", 1},
{"TRG Valid.", 2},
{"TRG Holdoff", 3},
{"Pile Up Trigger", 4},
{"PSD cut high", 5},
{"Baseline Freeze", 6},
{"Trigger", 7}};
}
namespace Bit_DPPAlgorithmControl {
namespace Bit_DPPAlgorithmControl_PHA {
const std::pair<unsigned short, unsigned short> TrapRescaling = {6, 0} ; /// length, smallest pos
const std::pair<unsigned short, unsigned short> TraceDecimation = {2, 8};
const std::pair<unsigned short, unsigned short> TraceDeciGain = {2, 10,};
@ -266,8 +294,8 @@ namespace DPP {
{"Negative", 1}};
const std::vector<std::pair<std::string, unsigned int>> ListTrigMode = {{"Independent", 0},
{"Coincident (Shape Trig.)", 1},
{"Anti-Coincident (Shape Trig.)", 3}};
{"Coincident", 1},
{"Anti-Coincident", 3}};
const std::vector<std::pair<std::string, unsigned int>> ListBaselineAvg = {{"Not Used", 0},
{"16 samples", 1},
@ -276,6 +304,71 @@ namespace DPP {
{"1024 samples", 4},
{"4096 samples", 5},
{"16384 samples", 6}};
}
namespace Bit_DPPAlgorithmControl_PSD {
const std::pair<unsigned short, unsigned short> ChargeSensitivity = {3, 0} ; /// length, smallest pos
const std::pair<unsigned short, unsigned short> ChargePedestal = {1, 4};
const std::pair<unsigned short, unsigned short> TriggerCountOpt = {1, 5,};
const std::pair<unsigned short, unsigned short> DiscriminationMode = {1, 6};
const std::pair<unsigned short, unsigned short> PileupWithinGate = {1, 7};
const std::pair<unsigned short, unsigned short> InternalTestPulse = {1, 8};
const std::pair<unsigned short, unsigned short> TestPulseRate = {2, 9};
const std::pair<unsigned short, unsigned short> BaselineCal = {1, 15};
const std::pair<unsigned short, unsigned short> Polarity = {1, 16};
const std::pair<unsigned short, unsigned short> TriggerMode = {2, 18};
const std::pair<unsigned short, unsigned short> BaselineAvg = {3, 20};
const std::pair<unsigned short, unsigned short> DisableSelfTrigger = {1, 24};
const std::pair<unsigned short, unsigned short> DiscardQLongSmallerQThreshold = {1, 25};
const std::pair<unsigned short, unsigned short> RejectPileup = {1, 26};
const std::pair<unsigned short, unsigned short> EnablePSDCutBelow = {1, 27};
const std::pair<unsigned short, unsigned short> EnablePSDCutAbove = {1, 28};
const std::pair<unsigned short, unsigned short> RejectOverRange = {1, 29};
const std::pair<unsigned short, unsigned short> DisableTriggerHysteresis = {1, 30};
const std::pair<unsigned short, unsigned short> DisableOppositePolarityInhibitZeroCrossingOnCFD = {1, 31};
const std::vector<std::pair<std::string, unsigned int>> ListChargeSensitivity_2Vpp = {{"5 fC", 0},
{"20 fC", 1},
{"80 fC", 2},
{"320 fC", 3},
{"1.28 pC", 4},
{"5.12 pC", 5}};
const std::vector<std::pair<std::string, unsigned int>> ListChargeSensitivity_p5Vpp = {{"1.25 fC", 0},
{"5 fC", 1},
{"20 fC", 2},
{"80 fC", 3},
{"320 fC", 4},
{"1.28 pC", 5}};
const std::vector<std::pair<std::string, unsigned int>> ListTestPulseRate_730 = {{"1 kHz", 0},
{"10 kHz", 1},
{"100 kHz", 2},
{"1 MHz", 3}};
const std::vector<std::pair<std::string, unsigned int>> ListTestPulseRate_725 = {{"500 Hz", 0},
{"5 kHz", 1},
{"500 kHz", 2},
{"500 kHz", 3}};
const std::vector<std::pair<std::string, unsigned int>> ListTriggerCountOpt = {{"Only accepted self-Trigger", 0},
{"All self-trigger", 1}};
const std::vector<std::pair<std::string, unsigned int>> ListDiscriminationMode = {{"Leading Edge", 0},
{"Digital Const. Frac.", 1}};
const std::vector<std::pair<std::string, unsigned int>> ListPolarity = {{"Positive", 0},
{"Negative", 1}};
const std::vector<std::pair<std::string, unsigned int>> ListTrigMode = {{"Independent", 0},
{"Coincident ", 1},
{"Anti-Coincident", 3}};
const std::vector<std::pair<std::string, unsigned int>> ListBaselineAvg = {{"Fixed", 0},
{"16 samples", 1},
{"64 samples", 2},
{"256 samples", 3},
{"1024 samples", 4}};
}
@ -544,21 +637,94 @@ namespace DPP {
}
namespace PSD {
const Reg CFDSetting ("CFDSetting" , 0x103C, RW::ReadWrite, false, {}); /// R/W
const Reg CFDSetting ("CFDSetting" , 0x103C, RW::ReadWrite, false, 0xFF, 1); /// R/W
const Reg ForcedDataFlush_W ("ForcedDataFlush_W" , 0x1040, RW::WriteONLY, false, {}); /// W
const Reg ChargeZeroSuppressionThreshold ("ChargeZeroSuppressionThreshold" , 0x1044, RW::ReadWrite, false, {}); /// R/W
const Reg ShortGateWidth ("ShortGateWidth" , 0x1054, RW::ReadWrite, false, {}); /// R/W
const Reg LongGateWidth ("LongGateWidth" , 0x1058, RW::ReadWrite, false, {}); /// R/W
const Reg GateOffset ("GateOffset" , 0x105C, RW::ReadWrite, false, {}); /// R/W
const Reg TriggerThreshold ("TriggerThreshold" , 0x1060, RW::ReadWrite, false, {}); /// R/W
const Reg FixedBaseline ("FixedBaseline" , 0x1064, RW::ReadWrite, false, {}); /// R/W
const Reg TriggerLatency ("TriggerLatency" , 0x106C, RW::ReadWrite, false, {}); /// R/W
const Reg ShapedTriggerWidth ("ShapedTriggerWidth" , 0x1070, RW::ReadWrite, false, {}); /// R/W
const Reg TriggerHoldOffWidth ("TriggerHoldOffWidth" , 0x1074, RW::ReadWrite, false, {}); /// R/W
const Reg ThresholdForPSDCut ("ThresholdForPSDCut" , 0x1078, RW::ReadWrite, false, {}); /// R/W
const Reg PurGapThreshold ("PurGapThreshold" , 0x107C, RW::ReadWrite, false, {}); /// R/W
const Reg ChargeZeroSuppressionThreshold ("ChargeZeroSuppressionThreshold" , 0x1044, RW::ReadWrite, false, 0xFFFF, -1); /// R/W
const Reg ShortGateWidth ("ShortGateWidth" , 0x1054, RW::ReadWrite, false, 0xFFF, 1); /// R/W
const Reg LongGateWidth ("LongGateWidth" , 0x1058, RW::ReadWrite, false, 0xFFF, 1); /// R/W
const Reg GateOffset ("GateOffset" , 0x105C, RW::ReadWrite, false, 0xFF, 1); /// R/W
const Reg TriggerThreshold ("TriggerThreshold" , 0x1060, RW::ReadWrite, false, 0x3FFF, -1); /// R/W
const Reg FixedBaseline ("FixedBaseline" , 0x1064, RW::ReadWrite, false, 0x3FFF, -1); /// R/W
const Reg TriggerLatency ("TriggerLatency" , 0x106C, RW::ReadWrite, false, 0x3FF, 4); /// R/W
const Reg ShapedTriggerWidth ("ShapedTriggerWidth" , 0x1070, RW::ReadWrite, false, 0x3FF, 4); /// R/W
const Reg TriggerHoldOffWidth ("TriggerHoldOffWidth" , 0x1074, RW::ReadWrite, false, 0xFFFF, 4); /// R/W
const Reg ThresholdForPSDCut ("ThresholdForPSDCut" , 0x1078, RW::ReadWrite, false, 0x3FF, -1); /// R/W
const Reg PurGapThreshold ("PurGapThreshold" , 0x107C, RW::ReadWrite, false, 0xFFF, -1); /// R/W
const Reg DPPAlgorithmControl2_G ("DPPAlgorithmControl2_G" , 0x1084, RW::ReadWrite, true, {}); /// R/W
const Reg EarlyBaselineFreeze ("EarlyBaselineFreeze" , 0x10D8, RW::ReadWrite, true, {}); /// R/W
const Reg EarlyBaselineFreeze ("EarlyBaselineFreeze" , 0x10D8, RW::ReadWrite, true, 0x3FF, 4); /// R/W
namespace Bit_CFDSetting {
const std::pair<unsigned short, unsigned short> CFDDealy = {8, 0} ;
const std::pair<unsigned short, unsigned short> CFDFraction = {2, 8} ;
const std::pair<unsigned short, unsigned short> Interpolation = {2, 10} ;
const std::vector<std::pair<std::string, unsigned int>> ListCFDFraction = {{"25%", 0},
{"50%", 1},
{"75%", 2},
{"100%", 3}};
const std::vector<std::pair<std::string, unsigned int>> ListItepolation = {{"sample before and after 0-Xing", 0},
{"2nd sample before and after 0-Xing", 1},
{"3rd sample before and after 0-Xing", 2},
{"4th sample before and after 0-Xing", 3}};
}
namespace Bit_DPPAlgorithmControl2 {
const std::pair<unsigned short, unsigned short> LocalShapeTriggerMode = {3, 0} ;
const std::pair<unsigned short, unsigned short> LocalTrigValidMode = {3, 4} ;
const std::pair<unsigned short, unsigned short> ExtraWordOption = {3, 8} ;
const std::pair<unsigned short, unsigned short> SmoothedChargeIntegration = {5, 11} ;
const std::pair<unsigned short, unsigned short> TriggerCounterFlag = {2, 16} ;
const std::pair<unsigned short, unsigned short> VetoSource = {2, 18} ;
const std::pair<unsigned short, unsigned short> MarkSaturation = {1, 24} ;
const std::pair<unsigned short, unsigned short> AdditionLocalTrigValid = {2, 25} ;
const std::pair<unsigned short, unsigned short> VetoMode = {1, 27} ;
const std::pair<unsigned short, unsigned short> ResetTimestampByTRGIN = {1, 28} ;
const std::vector<std::pair<std::string, unsigned int>> ListLocalShapeTrigMode = {{"Disabled", 0},
{"AND", 4},
{"The even Channel", 5},
{"The odd Channel", 6},
{"OR", 7}};
const std::vector<std::pair<std::string, unsigned int>> ListLocalTrigValidMode = {{"Disabled", 0},
{"Crossed", 4},
{"Equal", 5},
{"AND", 6},
{"OR", 7}};
const std::vector<std::pair<std::string, unsigned int>> ListExtraWordOpt = {{"Extended timeStamp + baseline * 4", 0},
{"Extended timeStamp + Flag", 1},
{"Extended timeStamp + Flag + Fine Time Stamp", 2},
{"Lost Trig. Count + Total Trig. Count", 4},
{"Positive 0-Xing + Negative 0-Xing", 5},
{"Fixed value 0x12345678", 7}};
const std::vector<std::pair<std::string, unsigned int>> ListSmoothedChargeIntegration = {{"Disabled", 0},
{"2 samples", 2},
{"4 sample", 4},
{"8 sample", 6},
{"16 sample", 8}};
const std::vector<std::pair<std::string, unsigned int>> ListVetoSource = {{"Disabled", 0},
{"Common (Global Trig. Mask)", 1},
{"Difference (Trig. Mask)", 2},
{"Negative Saturation", 3}};
const std::vector<std::pair<std::string, unsigned int>> ListTrigCounter = {{"1024", 0},
{"128", 1},
{"8192", 2}};
const std::vector<std::pair<std::string, unsigned int>> ListAdditionLocalTrigValid = {{"No Addtional Opt.", 0},
{"AND motherboard", 1}, // must be crossed
{"OR motherboard", 2}}; // must be crossed
const std::vector<std::pair<std::string, unsigned int>> ListVetoMode = {{"after charge integration", 0},
{"inhibit self-trigger", 1}}; // must be crossed
}
}
namespace QDC {

View File

@ -449,7 +449,7 @@ void Scope::SetUpPHAPanel(){
cbPolarity->addItem("Negative", 1);
connect(cbPolarity, &RComboBox::currentIndexChanged, this, [=](){
if( !enableSignalSlot ) return;
digi[ID]->SetBits(DPP::DPPAlgorithmControl, DPP::Bit_DPPAlgorithmControl::Polarity, cbPolarity->currentData().toInt(), cbScopeCh->currentIndex());
digi[ID]->SetBits(DPP::DPPAlgorithmControl, DPP::Bit_DPPAlgorithmControl_PHA::Polarity, cbPolarity->currentData().toInt(), cbScopeCh->currentIndex());
});
SetUpComboBoxSimple(cbBaselineAvg, "Baseline Avg. ", rowID, 2);
@ -462,7 +462,7 @@ void Scope::SetUpPHAPanel(){
cbBaselineAvg->addItem("16384 sample", 6);
connect(cbBaselineAvg, &RComboBox::currentIndexChanged, this, [=](){
if( !enableSignalSlot ) return;
digi[ID]->SetBits(DPP::DPPAlgorithmControl, DPP::Bit_DPPAlgorithmControl::BaselineAvg, cbBaselineAvg->currentData().toInt(), cbScopeCh->currentIndex());
digi[ID]->SetBits(DPP::DPPAlgorithmControl, DPP::Bit_DPPAlgorithmControl_PHA::BaselineAvg, cbBaselineAvg->currentData().toInt(), cbScopeCh->currentIndex());
});
SetUpComboBoxSimple(cbPeakAvg, "Peak Avg. ", rowID, 4);
@ -472,7 +472,7 @@ void Scope::SetUpPHAPanel(){
cbPeakAvg->addItem("64 sample", 3);
connect(cbPeakAvg, &RComboBox::currentIndexChanged, this, [=](){
if( !enableSignalSlot ) return;
digi[ID]->SetBits(DPP::DPPAlgorithmControl, DPP::Bit_DPPAlgorithmControl::PeakMean, cbPeakAvg->currentData().toInt(), cbScopeCh->currentIndex());
digi[ID]->SetBits(DPP::DPPAlgorithmControl, DPP::Bit_DPPAlgorithmControl_PHA::PeakMean, cbPeakAvg->currentData().toInt(), cbScopeCh->currentIndex());
});
SetUpSpinBox(sbPeakHoldOff, "Peak HoldOff [ns] ", rowID, 6, DPP::PHA::PeakHoldOff);
@ -545,7 +545,7 @@ void Scope::SetUpPSDPanel(){
cbPolarity->addItem("Negative", 1);
connect(cbPolarity, &RComboBox::currentIndexChanged, this, [=](){
if( !enableSignalSlot ) return;
digi[ID]->SetBits(DPP::DPPAlgorithmControl, DPP::Bit_DPPAlgorithmControl::Polarity, cbPolarity->currentData().toInt(), cbScopeCh->currentIndex());
digi[ID]->SetBits(DPP::DPPAlgorithmControl, DPP::Bit_DPPAlgorithmControl_PHA::Polarity, cbPolarity->currentData().toInt(), cbScopeCh->currentIndex());
});
}
@ -615,7 +615,7 @@ void Scope::UpdatePanelFromMomeory(){
UpdateComobox(cbDynamicRange, DPP::InputDynamicRange);
uint32_t DPPAlg = digi[ID]->GetSettingFromMemory(DPP::DPPAlgorithmControl, ch);
if( Digitizer::ExtractBits(DPPAlg, DPP::Bit_DPPAlgorithmControl::Polarity) ){
if( Digitizer::ExtractBits(DPPAlg, DPP::Bit_DPPAlgorithmControl_PHA::Polarity) ){
cbPolarity->setCurrentIndex(1);
}else{
cbPolarity->setCurrentIndex(0);
@ -633,7 +633,7 @@ void Scope::UpdatePanelFromMomeory(){
UpdateComobox(cbSmoothingFactor, DPP::PHA::RCCR2SmoothingFactor);
int temp = Digitizer::ExtractBits(DPPAlg, DPP::Bit_DPPAlgorithmControl::BaselineAvg);
int temp = Digitizer::ExtractBits(DPPAlg, DPP::Bit_DPPAlgorithmControl_PHA::BaselineAvg);
for(int i = 0; i < cbBaselineAvg->count(); i++){
if( cbBaselineAvg->itemData(i).toInt() == temp) {
cbBaselineAvg->setCurrentIndex(i);
@ -641,7 +641,7 @@ void Scope::UpdatePanelFromMomeory(){
}
}
temp = Digitizer::ExtractBits(DPPAlg, DPP::Bit_DPPAlgorithmControl::PeakMean);
temp = Digitizer::ExtractBits(DPPAlg, DPP::Bit_DPPAlgorithmControl_PHA::PeakMean);
for(int i = 0; i < cbPeakAvg->count(); i++){
if( cbPeakAvg->itemData(i).toInt() == temp) {
cbPeakAvg->setCurrentIndex(i);

View File

@ -1,8 +1,8 @@
#ifndef MACRO_H
#define MACRO_H
#define MaxNPorts 1
#define MaxNBoards 2
#define MaxNPorts 4
#define MaxNBoards 4
#define MaxNDigitizer MaxNPorts * MaxNBoards