kind of complete single channel scope for PHA

This commit is contained in:
Ryan Tang 2024-05-17 16:41:44 -04:00
parent ab61ee1bb0
commit b79fd72fe7
2 changed files with 21 additions and 4 deletions

View File

@ -113,9 +113,9 @@ int Digitizer::OpenDigitizer(int boardID, int portID, bool program, bool verbose
}
if( ret == 0 ){
if( LinkType == CAEN_DGTZ_USB ) printf("Open digitizer via USB, board : %d\n", boardID);
if( LinkType == CAEN_DGTZ_OpticalLink ) printf("Open digitizer via Optical Link, port : %d, board : %d\n", portID, boardID);
if( LinkType == CAEN_DGTZ_USB_A4818 ) printf("Open digitizer via A4818, port : %d, board : %d\n", portID, boardID);
if( LinkType == CAEN_DGTZ_USB ) printf("### Open digitizer via USB, board : %d\n", boardID);
if( LinkType == CAEN_DGTZ_OpticalLink ) printf("### Open digitizer via Optical Link, port : %d, board : %d\n", portID, boardID);
if( LinkType == CAEN_DGTZ_USB_A4818 ) printf("### Open digitizer via A4818, port : %d, board : %d\n", portID, boardID);
}
if (ret != 0) {

View File

@ -466,7 +466,24 @@ void Scope::StopScope(){
//restore setting
digi[ID]->SetBits(DPP::BoardConfiguration, DPP::Bit_BoardConfig::RecordTrace, traceOn[ID], -1);
//TODO =============
int ch = cbScopeCh->currentIndex();
if( digi[ID]->GetDPPType() == DPPTypeCode::DPP_PHA_CODE ){
digi[ID]->WriteRegister(DPP::DPPAlgorithmControl, dppAlg, ch);
digi[ID]->WriteRegister(DPP::PHA::DPPAlgorithmControl2_G, dppAlg2, ch);
digi[ID]->WriteRegister(DPP::RegChannelEnableMask, chMask);
}
if( digi[ID]->GetDPPType() == DPPTypeCode::DPP_PSD_CODE ){
digi[ID]->WriteRegister(DPP::DPPAlgorithmControl, dppAlg, ch);
digi[ID]->WriteRegister(DPP::PSD::DPPAlgorithmControl2_G, dppAlg2, ch);
digi[ID]->WriteRegister(DPP::RegChannelEnableMask, chMask);
}
if( digi[ID]->GetDPPType() == DPPTypeCode::DPP_QDC_CODE ){
digi[ID]->WriteRegister(DPP::QDC::DPPAlgorithmControl, dppAlg, ch);
digi[ID]->WriteRegister(DPP::RegChannelEnableMask, chMask);
}
}else{