DigiPlanel: change button send clock sync to AutoSet reading conf.
This commit is contained in:
parent
db0859908b
commit
9921fbdd34
13
ClassData.h
13
ClassData.h
|
@ -52,19 +52,6 @@ class Data{
|
||||||
int LoopIndex[MaxNChannels]; /// number of loop in the circular memory
|
int LoopIndex[MaxNChannels]; /// number of loop in the circular memory
|
||||||
int DataIndex[MaxNChannels];
|
int DataIndex[MaxNChannels];
|
||||||
|
|
||||||
//unsigned long long Timestamp[MaxNChannels][MaxNData]; /// 47 bit
|
|
||||||
// unsigned short fineTime [MaxNChannels][MaxNData]; /// 10 bits, in unit of tick2ns / 1000 = ps
|
|
||||||
// unsigned short Energy [MaxNChannels][MaxNData]; /// 15 bit
|
|
||||||
// unsigned short Energy2 [MaxNChannels][MaxNData]; /// 15 bit, in PSD, Energy = Qshort, Energy2 = Qlong
|
|
||||||
// bool PileUp [MaxNChannels][MaxNData]; /// pile up flag
|
|
||||||
|
|
||||||
// std::vector<short> Waveform1 [MaxNChannels][MaxNData]; // used at least 14 MB
|
|
||||||
// std::vector<short> Waveform2 [MaxNChannels][MaxNData];
|
|
||||||
// std::vector<bool> DigiWaveform1[MaxNChannels][MaxNData];
|
|
||||||
// std::vector<bool> DigiWaveform2[MaxNChannels][MaxNData];
|
|
||||||
// std::vector<bool> DigiWaveform3[MaxNChannels][MaxNData];
|
|
||||||
// std::vector<bool> DigiWaveform4[MaxNChannels][MaxNData];
|
|
||||||
|
|
||||||
uShort GetDataSize() const {return dataSize;}
|
uShort GetDataSize() const {return dataSize;}
|
||||||
ullong ** Timestamp; /// 47 bit
|
ullong ** Timestamp; /// 47 bit
|
||||||
uShort ** fineTime; /// 10 bits, in unit of tick2ns / 1000 = ps
|
uShort ** fineTime; /// 10 bits, in unit of tick2ns / 1000 = ps
|
||||||
|
|
|
@ -297,7 +297,7 @@ int Digitizer::ProgramBoard_PHA(){
|
||||||
ret = CAEN_DGTZ_WriteRegister(handle, DPP::RecordLength_G + 0x7000, 62);
|
ret = CAEN_DGTZ_WriteRegister(handle, DPP::RecordLength_G + 0x7000, 62);
|
||||||
//ret = CAEN_DGTZ_WriteRegister(handle, DPP::BoardConfiguration, 0x0F8915); /// has Extra2, dual trace, input and trap-baseline
|
//ret = CAEN_DGTZ_WriteRegister(handle, DPP::BoardConfiguration, 0x0F8915); /// has Extra2, dual trace, input and trap-baseline
|
||||||
ret = CAEN_DGTZ_WriteRegister(handle, DPP::BoardConfiguration, 0x0E8915); /// has Extra2, no trace
|
ret = CAEN_DGTZ_WriteRegister(handle, DPP::BoardConfiguration, 0x0E8915); /// has Extra2, no trace
|
||||||
///ret = CAEN_DGTZ_WriteRegister(handle, DPP::BoardConfiguration, 0x0D8115); /// diable Extra2
|
//ret = CAEN_DGTZ_WriteRegister(handle, DPP::BoardConfiguration, 0x0D8115); /// diable Extra2
|
||||||
|
|
||||||
//TODO change to write register
|
//TODO change to write register
|
||||||
ret = CAEN_DGTZ_SetAcquisitionMode(handle, CAEN_DGTZ_SW_CONTROLLED); /// software command
|
ret = CAEN_DGTZ_SetAcquisitionMode(handle, CAEN_DGTZ_SW_CONTROLLED); /// software command
|
||||||
|
@ -343,10 +343,6 @@ int Digitizer::ProgramBoard_PHA(){
|
||||||
|
|
||||||
ret |= CAEN_DGTZ_WriteRegister(handle, (uint32_t)(DPP::PreTrigger) + 0x7000 , 32 );
|
ret |= CAEN_DGTZ_WriteRegister(handle, (uint32_t)(DPP::PreTrigger) + 0x7000 , 32 );
|
||||||
ret |= CAEN_DGTZ_WriteRegister(handle, (uint32_t)(DPP::InputDynamicRange) + 0x7000 , 0x0 );
|
ret |= CAEN_DGTZ_WriteRegister(handle, (uint32_t)(DPP::InputDynamicRange) + 0x7000 , 0x0 );
|
||||||
|
|
||||||
//ret |= CAEN_DGTZ_WriteRegister(handle, (int32_t)(DPP::NumberEventsPerAggregate_G) + 0x7000, 10);
|
|
||||||
//ret |= CAEN_DGTZ_WriteRegister(handle, (int32_t)(DPP::AggregateOrganization), 0);
|
|
||||||
//ret |= CAEN_DGTZ_WriteRegister(handle, (int32_t)(DPP::MaxAggregatePerBlockTransfer), 100);
|
|
||||||
ret |= CAEN_DGTZ_WriteRegister(handle, (int32_t)(DPP::DPPAlgorithmControl) + 0x7000, 0x030200f);
|
ret |= CAEN_DGTZ_WriteRegister(handle, (int32_t)(DPP::DPPAlgorithmControl) + 0x7000, 0x030200f);
|
||||||
|
|
||||||
if( ret != 0 ) { printf("!!!!!!!! set channels error.\n");}
|
if( ret != 0 ) { printf("!!!!!!!! set channels error.\n");}
|
||||||
|
|
|
@ -91,7 +91,7 @@ class Digitizer{
|
||||||
void PrintBoard();
|
void PrintBoard();
|
||||||
void ProgramBoard();
|
void ProgramBoard();
|
||||||
void AutoSetDPPEventAggregation(){
|
void AutoSetDPPEventAggregation(){
|
||||||
ret = CAEN_DGTZ_SetDPPAcquisitionMode(handle, CAEN_DGTZ_DPP_ACQ_MODE_List, CAEN_DGTZ_DPP_SAVE_PARAM_EnergyAndTime);
|
//ret = CAEN_DGTZ_SetDPPAcquisitionMode(handle, CAEN_DGTZ_DPP_ACQ_MODE_List, CAEN_DGTZ_DPP_SAVE_PARAM_EnergyAndTime);
|
||||||
ret |= CAEN_DGTZ_SetNumEventsPerAggregate(handle, 10);
|
ret |= CAEN_DGTZ_SetNumEventsPerAggregate(handle, 10);
|
||||||
ret |= CAEN_DGTZ_SetDPPEventAggregation(handle, 0, 0); // AutoSet
|
ret |= CAEN_DGTZ_SetDPPEventAggregation(handle, 0, 0); // AutoSet
|
||||||
if( ret != 0 ) { printf("!!!!!!!! set %s error.\n", __func__);}
|
if( ret != 0 ) { printf("!!!!!!!! set %s error.\n", __func__);}
|
||||||
|
|
|
@ -208,13 +208,14 @@ DigiSettingsPanel::DigiSettingsPanel(Digitizer ** digi, unsigned int nDigi, QStr
|
||||||
buttonLayout->addWidget(bnSendSoftwareTriggerSignal, rowID, 0);
|
buttonLayout->addWidget(bnSendSoftwareTriggerSignal, rowID, 0);
|
||||||
connect(bnSendSoftwareTriggerSignal, &QPushButton::clicked, this, [=](){ digi[ID]->WriteRegister(DPP::SoftwareTrigger_W, 1); UpdateBoardAndChannelsStatus();});
|
connect(bnSendSoftwareTriggerSignal, &QPushButton::clicked, this, [=](){ digi[ID]->WriteRegister(DPP::SoftwareTrigger_W, 1); UpdateBoardAndChannelsStatus();});
|
||||||
|
|
||||||
bnSendSoftwareClockSyncSignal = new QPushButton("Send SW Clock-Sync Signal", this);
|
bhAutoSetEventPulling = new QPushButton("Autoset Reading Conf.", this);
|
||||||
buttonLayout->addWidget(bnSendSoftwareClockSyncSignal, rowID, 1);
|
buttonLayout->addWidget(bhAutoSetEventPulling, rowID, 1);
|
||||||
connect(bnSendSoftwareClockSyncSignal, &QPushButton::clicked, this, [=](){ digi[ID]->WriteRegister(DPP::SoftwareClockSync_W, 1); UpdateBoardAndChannelsStatus();});
|
connect(bhAutoSetEventPulling, &QPushButton::clicked, this, [=](){ digi[ID]->AutoSetDPPEventAggregation(); 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); UpdateBoardAndChannelsStatus();});
|
||||||
|
|
||||||
bnSaveSettings = new QPushButton("Save Settings (bin)", this);
|
|
||||||
buttonLayout->addWidget(bnSaveSettings, rowID, 2);
|
|
||||||
connect(bnSaveSettings, &QPushButton::clicked, this, [=](){ SaveSetting(0);});
|
|
||||||
|
|
||||||
// bnSaveSettingsToText = new QPushButton("Save Settings (txt)", this);
|
// bnSaveSettingsToText = new QPushButton("Save Settings (txt)", this);
|
||||||
// buttonLayout->addWidget(bnSaveSettingsToText, rowID, 3);
|
// buttonLayout->addWidget(bnSaveSettingsToText, rowID, 3);
|
||||||
|
@ -222,7 +223,7 @@ DigiSettingsPanel::DigiSettingsPanel(Digitizer ** digi, unsigned int nDigi, QStr
|
||||||
|
|
||||||
//checkBox, to coupled or decouple the setting file.
|
//checkBox, to coupled or decouple the setting file.
|
||||||
chkCoupledSettingFile = new QCheckBox("Update Setting", this);
|
chkCoupledSettingFile = new QCheckBox("Update Setting", this);
|
||||||
buttonLayout->addWidget(chkCoupledSettingFile, rowID, 3);
|
buttonLayout->addWidget(chkCoupledSettingFile, rowID, 2);
|
||||||
chkCoupledSettingFile->setCheckState(Qt::CheckState::Unchecked);
|
chkCoupledSettingFile->setCheckState(Qt::CheckState::Unchecked);
|
||||||
connect(chkCoupledSettingFile, &QCheckBox::stateChanged, this, [=](int state){
|
connect(chkCoupledSettingFile, &QCheckBox::stateChanged, this, [=](int state){
|
||||||
digi[ID]->SetSettingFileUpdate(state);
|
digi[ID]->SetSettingFileUpdate(state);
|
||||||
|
@ -231,6 +232,10 @@ DigiSettingsPanel::DigiSettingsPanel(Digitizer ** digi, unsigned int nDigi, QStr
|
||||||
digi[ID]->SaveAllSettingsAsBin(filePath);
|
digi[ID]->SaveAllSettingsAsBin(filePath);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
bnSaveSettings = new QPushButton("Save Settings", this);
|
||||||
|
buttonLayout->addWidget(bnSaveSettings, rowID, 3);
|
||||||
|
connect(bnSaveSettings, &QPushButton::clicked, this, [=](){ SaveSetting(0);});
|
||||||
}
|
}
|
||||||
|
|
||||||
{//^======================= Board Settings
|
{//^======================= Board Settings
|
||||||
|
|
|
@ -107,7 +107,8 @@ private:
|
||||||
QPushButton * bnClearBuffer;
|
QPushButton * bnClearBuffer;
|
||||||
|
|
||||||
QPushButton * bnSendSoftwareTriggerSignal;
|
QPushButton * bnSendSoftwareTriggerSignal;
|
||||||
QPushButton * bnSendSoftwareClockSyncSignal;
|
QPushButton * bhAutoSetEventPulling;
|
||||||
|
//QPushButton * bnSendSoftwareClockSyncSignal;
|
||||||
QPushButton * bnSaveSettings;
|
QPushButton * bnSaveSettings;
|
||||||
QPushButton * bnLoadSettings;
|
QPushButton * bnLoadSettings;
|
||||||
//QPushButton * bnSaveSettingsToText;
|
//QPushButton * bnSaveSettingsToText;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user