snapshot
This commit is contained in:
parent
8bead5a54b
commit
c895037896
|
@ -188,6 +188,7 @@ inline void Data::ClearData(){
|
|||
}
|
||||
|
||||
inline void Data::ClearBuffer(){
|
||||
printf("==== %s \n", __func__);
|
||||
delete buffer;
|
||||
buffer = nullptr;
|
||||
AllocatedSize = 0;
|
||||
|
|
|
@ -662,7 +662,7 @@ void Digitizer::ProgramSettingsToBoard(){
|
|||
if( DPPType == V1730_DPP_PSD_CODE ){
|
||||
for( int p = 0; p < (int) RegisterPSDList.size(); p++){
|
||||
if( RegisterPSDList[p].GetType() == RW::ReadWrite){
|
||||
haha = RegisterPHAList[p];
|
||||
haha = RegisterPSDList[p];
|
||||
WriteRegister(haha, GetSettingFromMemory(haha, ch), ch, false);
|
||||
usleep(1 * 1000);
|
||||
}
|
||||
|
@ -731,13 +731,13 @@ int Digitizer::LoadSettingBinaryToMemory(std::string fileName){
|
|||
}else{
|
||||
/// load binary to memoery
|
||||
DPPType = fileDPP;
|
||||
printf("DPPType in the file is %s(0x%X). \n", GetDPPString(fileDPP).c_str(), fileDPP);
|
||||
printf("DPPType in the file is %s(0x%X). Board Type is %s \n", GetDPPString(fileDPP).c_str(), fileDPP, GetDPPString().c_str());
|
||||
|
||||
settingFile = fopen(fileName.c_str(), "r");
|
||||
size_t dummy = fread( setting, SETTINGSIZE * sizeof(unsigned int), 1, settingFile);
|
||||
fclose (settingFile);
|
||||
|
||||
if( dummy == 0 ) printf("reach the end of file\n");
|
||||
if( dummy != 0 ) printf("reach the end of file (read %ld).\n", dummy);
|
||||
|
||||
uint32_t boardInfo = GetSettingFromMemory(DPP::BoardInfo_R);
|
||||
if( (boardInfo & 0xFF) == 0x0E ) ch2ns = 4.0;
|
||||
|
|
|
@ -194,7 +194,7 @@ DigiSettingsPanel::DigiSettingsPanel(Digitizer ** digi, unsigned int nDigi, QStr
|
|||
|
||||
bnClearBuffer = new QPushButton("Clear Buffer/FIFO", this);
|
||||
buttonLayout->addWidget(bnClearBuffer, rowID, 2);
|
||||
connect(bnClearBuffer, &QPushButton::clicked, this, [=](){ digi[ID]->WriteRegister(DPP::SoftwareClear_W, 1);});
|
||||
connect(bnClearBuffer, &QPushButton::clicked, this, [=](){ digi[ID]->WriteRegister(DPP::SoftwareClear_W, 1); UpdateBoardAndChannelsStatus();});
|
||||
|
||||
bnLoadSettings = new QPushButton("Load Settings", this);
|
||||
buttonLayout->addWidget(bnLoadSettings, rowID, 3);
|
||||
|
@ -203,11 +203,11 @@ DigiSettingsPanel::DigiSettingsPanel(Digitizer ** digi, unsigned int nDigi, QStr
|
|||
rowID ++; //---------------------------
|
||||
bnSendSoftwareTriggerSignal = new QPushButton("Send SW Trigger Signal", this);
|
||||
buttonLayout->addWidget(bnSendSoftwareTriggerSignal, rowID, 0);
|
||||
connect(bnSendSoftwareTriggerSignal, &QPushButton::clicked, this, [=](){ digi[ID]->WriteRegister(DPP::SoftwareTrigger_W, 1);});
|
||||
connect(bnSendSoftwareTriggerSignal, &QPushButton::clicked, this, [=](){ digi[ID]->WriteRegister(DPP::SoftwareTrigger_W, 1); UpdateBoardAndChannelsStatus();});
|
||||
|
||||
bnSendSoftwareClockSyncSignal = new QPushButton("Send SW Clock-Sync Signal", this);
|
||||
buttonLayout->addWidget(bnSendSoftwareClockSyncSignal, rowID, 1);
|
||||
connect(bnSendSoftwareClockSyncSignal, &QPushButton::clicked, this, [=](){ digi[ID]->WriteRegister(DPP::SoftwareClockSync_W, 1);});
|
||||
connect(bnSendSoftwareClockSyncSignal, &QPushButton::clicked, this, [=](){ digi[ID]->WriteRegister(DPP::SoftwareClockSync_W, 1); UpdateBoardAndChannelsStatus();});
|
||||
|
||||
bnSaveSettings = new QPushButton("Save Settings (bin)", this);
|
||||
buttonLayout->addWidget(bnSaveSettings, rowID, 2);
|
||||
|
@ -2226,7 +2226,7 @@ void DigiSettingsPanel::SetUpPSDChannel(){
|
|||
QTabWidget * othersTab = new QTabWidget(this);
|
||||
otherLayout->addWidget(othersTab);
|
||||
|
||||
QStringList tabName = {"Tab-1", "Test Pulse", "Veto", "Extra2"};
|
||||
QStringList tabName = {"Tab-1", "Test Pulse", "Veto", "Extra"};
|
||||
|
||||
const int nTab = tabName.count();
|
||||
|
||||
|
@ -2285,7 +2285,7 @@ void DigiSettingsPanel::SetUpPSDChannel(){
|
|||
|
||||
if( i == 3 ){
|
||||
if( ch == 0 ){
|
||||
QLabel * lb2 = new QLabel("Extra2 Option [G]", this); lb2->setAlignment(Qt::AlignHCenter); tabLayout->addWidget(lb2, 0, 2);
|
||||
QLabel * lb2 = new QLabel("Extra Option [G]", this); lb2->setAlignment(Qt::AlignHCenter); tabLayout->addWidget(lb2, 0, 2);
|
||||
}
|
||||
SetUpComboBoxBit(cbExtra2Option[ID][ch], "", tabLayout, ch + 1, 1, DPP::PHA::Bit_DPPAlgorithmControl2::ListExtra2, DPP::PHA::DPPAlgorithmControl2_G, DPP::PHA::Bit_DPPAlgorithmControl2::Extra2Option, 2, ch);
|
||||
}
|
||||
|
|
|
@ -432,6 +432,13 @@ void MainWindow::CloseDigitizers(){
|
|||
for(unsigned int i = 0; i < nDigi; i ++){
|
||||
digi[i]->CloseDigitizer();
|
||||
delete digi[i];
|
||||
|
||||
if(readDataThread[i]->isRunning()){
|
||||
readDataThread[i]->Stop();
|
||||
readDataThread[i]->quit();
|
||||
readDataThread[i]->wait();
|
||||
}
|
||||
|
||||
delete readDataThread[i];
|
||||
}
|
||||
delete [] digi;
|
||||
|
@ -637,6 +644,7 @@ void MainWindow::StartACQ(){
|
|||
}
|
||||
readDataThread[i]->SetSaveData(chkSaveData->isChecked());
|
||||
LogMsg("Digi-" + QString::number(digi[i]->GetSerialNumber()) + " is starting ACQ." );
|
||||
digi[i]->WriteRegister(DPP::SoftwareClear_W, 1);
|
||||
digi[i]->StartACQ();
|
||||
readDataThread[i]->start();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user