change program digitizer pause time to be 10 milli-sec
This commit is contained in:
parent
e4915a5a74
commit
aa5cce918c
|
@ -802,6 +802,8 @@ void Digitizer::ProgramSettingsToBoard(){
|
||||||
|
|
||||||
printf("========== %s \n", __func__);
|
printf("========== %s \n", __func__);
|
||||||
|
|
||||||
|
const short pauseMilliSec = 10;
|
||||||
|
|
||||||
Reg haha;
|
Reg haha;
|
||||||
|
|
||||||
if( DPPType == DPPType::DPP_PHA_CODE || DPPType == DPPType::DPP_PSD_CODE ){
|
if( DPPType == DPPType::DPP_PHA_CODE || DPPType == DPPType::DPP_PSD_CODE ){
|
||||||
|
@ -811,7 +813,7 @@ void Digitizer::ProgramSettingsToBoard(){
|
||||||
if( RegisterBoardList_PHAPSD[p].GetRWType() == RW::ReadWrite) {
|
if( RegisterBoardList_PHAPSD[p].GetRWType() == RW::ReadWrite) {
|
||||||
haha = RegisterBoardList_PHAPSD[p];
|
haha = RegisterBoardList_PHAPSD[p];
|
||||||
WriteRegister(haha, GetSettingFromMemory(haha), -1, false);
|
WriteRegister(haha, GetSettingFromMemory(haha), -1, false);
|
||||||
usleep(1 * 1000);
|
usleep(pauseMilliSec * 1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/// Channels Setting
|
/// Channels Setting
|
||||||
|
@ -821,7 +823,7 @@ void Digitizer::ProgramSettingsToBoard(){
|
||||||
if( RegisterChannelList_PHA[p].GetRWType() == RW::ReadWrite ){
|
if( RegisterChannelList_PHA[p].GetRWType() == RW::ReadWrite ){
|
||||||
haha = RegisterChannelList_PHA[p];
|
haha = RegisterChannelList_PHA[p];
|
||||||
WriteRegister(haha, GetSettingFromMemory(haha, ch), ch, false);
|
WriteRegister(haha, GetSettingFromMemory(haha, ch), ch, false);
|
||||||
usleep(1 * 1000);
|
usleep(pauseMilliSec * 1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -830,7 +832,7 @@ void Digitizer::ProgramSettingsToBoard(){
|
||||||
if( RegisterChannelList_PSD[p].GetRWType() == RW::ReadWrite){
|
if( RegisterChannelList_PSD[p].GetRWType() == RW::ReadWrite){
|
||||||
haha = RegisterChannelList_PSD[p];
|
haha = RegisterChannelList_PSD[p];
|
||||||
WriteRegister(haha, GetSettingFromMemory(haha, ch), ch, false);
|
WriteRegister(haha, GetSettingFromMemory(haha, ch), ch, false);
|
||||||
usleep(1 * 1000);
|
usleep(pauseMilliSec * 1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -842,7 +844,7 @@ void Digitizer::ProgramSettingsToBoard(){
|
||||||
if( RegisterBoardList_QDC[p].GetRWType() == RW::ReadWrite) {
|
if( RegisterBoardList_QDC[p].GetRWType() == RW::ReadWrite) {
|
||||||
haha = RegisterBoardList_QDC[p];
|
haha = RegisterBoardList_QDC[p];
|
||||||
WriteRegister(haha, GetSettingFromMemory(haha), -1, false);
|
WriteRegister(haha, GetSettingFromMemory(haha), -1, false);
|
||||||
usleep(1 * 1000);
|
usleep(pauseMilliSec * 1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/// Channels Setting
|
/// Channels Setting
|
||||||
|
@ -851,7 +853,7 @@ void Digitizer::ProgramSettingsToBoard(){
|
||||||
if( RegisterChannelList_QDC[p].GetRWType() == RW::ReadWrite ){
|
if( RegisterChannelList_QDC[p].GetRWType() == RW::ReadWrite ){
|
||||||
haha = RegisterChannelList_QDC[p];
|
haha = RegisterChannelList_QDC[p];
|
||||||
WriteRegister(haha, GetSettingFromMemory(haha, ch), ch, false);
|
WriteRegister(haha, GetSettingFromMemory(haha, ch), ch, false);
|
||||||
usleep(1 * 1000);
|
usleep(pauseMilliSec * 1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,10 +46,10 @@ private:
|
||||||
Histogram1D * h1g;
|
Histogram1D * h1g;
|
||||||
Histogram1D * hMulti;
|
Histogram1D * hMulti;
|
||||||
|
|
||||||
QCheckBox * runAnalyzer;
|
QCheckBox * chkRunAnalyzer;
|
||||||
RSpinBox * sbUpdateTime;
|
RSpinBox * sbUpdateTime;
|
||||||
|
|
||||||
QCheckBox * backWardBuilding;
|
QCheckBox * chkBackWardBuilding;
|
||||||
RSpinBox * sbBackwardCount;
|
RSpinBox * sbBackwardCount;
|
||||||
|
|
||||||
RSpinBox * sbBuildWindow;
|
RSpinBox * sbBuildWindow;
|
||||||
|
@ -78,8 +78,8 @@ inline void CoincidentAnalyzer::SetUpCanvas(){
|
||||||
boxLayout->setAlignment(Qt::AlignTop | Qt::AlignLeft);
|
boxLayout->setAlignment(Qt::AlignTop | Qt::AlignLeft);
|
||||||
box->setLayout(boxLayout);
|
box->setLayout(boxLayout);
|
||||||
|
|
||||||
runAnalyzer = new QCheckBox("Run Analyzer", this);
|
chkRunAnalyzer = new QCheckBox("Run Analyzer", this);
|
||||||
boxLayout->addWidget(runAnalyzer, 0, 0);
|
boxLayout->addWidget(chkRunAnalyzer, 0, 0);
|
||||||
|
|
||||||
QLabel * lbUpdateTime = new QLabel("Update Period [s]", this);
|
QLabel * lbUpdateTime = new QLabel("Update Period [s]", this);
|
||||||
lbUpdateTime->setAlignment(Qt::AlignRight | Qt::AlignCenter);
|
lbUpdateTime->setAlignment(Qt::AlignRight | Qt::AlignCenter);
|
||||||
|
@ -90,8 +90,10 @@ inline void CoincidentAnalyzer::SetUpCanvas(){
|
||||||
sbUpdateTime->setValue(1);
|
sbUpdateTime->setValue(1);
|
||||||
boxLayout->addWidget(sbUpdateTime, 0, 2);
|
boxLayout->addWidget(sbUpdateTime, 0, 2);
|
||||||
|
|
||||||
backWardBuilding = new QCheckBox("Use Backward builder", this);
|
connect(sbUpdateTime, &RSpinBox::valueChanged, this, [=](double sec){ SetUpdateTimeInSec(sec); });
|
||||||
boxLayout->addWidget(backWardBuilding, 1, 0);
|
|
||||||
|
chkBackWardBuilding = new QCheckBox("Use Backward builder", this);
|
||||||
|
boxLayout->addWidget(chkBackWardBuilding, 1, 0);
|
||||||
|
|
||||||
QLabel * lbBKWindow = new QLabel("No. Backward Event", this);
|
QLabel * lbBKWindow = new QLabel("No. Backward Event", this);
|
||||||
lbBKWindow->setAlignment(Qt::AlignRight | Qt::AlignCenter);
|
lbBKWindow->setAlignment(Qt::AlignRight | Qt::AlignCenter);
|
||||||
|
@ -102,9 +104,18 @@ inline void CoincidentAnalyzer::SetUpCanvas(){
|
||||||
sbBackwardCount->setValue(100);
|
sbBackwardCount->setValue(100);
|
||||||
boxLayout->addWidget(sbBackwardCount, 1, 2);
|
boxLayout->addWidget(sbBackwardCount, 1, 2);
|
||||||
|
|
||||||
backWardBuilding->setChecked(false);
|
chkBackWardBuilding->setChecked(false);
|
||||||
sbBackwardCount->setEnabled(false);
|
sbBackwardCount->setEnabled(false);
|
||||||
|
|
||||||
|
connect(chkBackWardBuilding, &QCheckBox::stateChanged, this, [=](int status){
|
||||||
|
SetBackwardBuild(status, sbBackwardCount->value());
|
||||||
|
sbBackwardCount->setEnabled(status);
|
||||||
|
});
|
||||||
|
|
||||||
|
connect(sbBackwardCount, &RSpinBox::valueChanged, this, [=](double value){
|
||||||
|
SetBackwardBuild(true, value);
|
||||||
|
});
|
||||||
|
|
||||||
QLabel * lbBuildWindow = new QLabel("Event Window [tick]", this);
|
QLabel * lbBuildWindow = new QLabel("Event Window [tick]", this);
|
||||||
lbBuildWindow->setAlignment(Qt::AlignRight | Qt::AlignCenter);
|
lbBuildWindow->setAlignment(Qt::AlignRight | Qt::AlignCenter);
|
||||||
boxLayout->addWidget(lbBuildWindow, 2, 1);
|
boxLayout->addWidget(lbBuildWindow, 2, 1);
|
||||||
|
@ -113,6 +124,10 @@ inline void CoincidentAnalyzer::SetUpCanvas(){
|
||||||
sbBuildWindow->setMaximum(9999999999);
|
sbBuildWindow->setMaximum(9999999999);
|
||||||
boxLayout->addWidget(sbBuildWindow, 2, 2);
|
boxLayout->addWidget(sbBuildWindow, 2, 2);
|
||||||
|
|
||||||
|
connect(sbBuildWindow, &RSpinBox::valueChanged, this, [=](double value){
|
||||||
|
evtbder->SetTimeWindow((int)value);
|
||||||
|
});
|
||||||
|
|
||||||
QFrame *separator = new QFrame(box);
|
QFrame *separator = new QFrame(box);
|
||||||
separator->setFrameShape(QFrame::HLine);
|
separator->setFrameShape(QFrame::HLine);
|
||||||
separator->setFrameShadow(QFrame::Sunken);
|
separator->setFrameShadow(QFrame::Sunken);
|
||||||
|
@ -172,6 +187,7 @@ inline void CoincidentAnalyzer::SetUpCanvas(){
|
||||||
for( int i = 0; i < digi[0]->GetNumInputCh(); i++) aCh->addItem("Ch-" + QString::number(i));
|
for( int i = 0; i < digi[0]->GetNumInputCh(); i++) aCh->addItem("Ch-" + QString::number(i));
|
||||||
boxLayout->addWidget(aCh, 7, 3);
|
boxLayout->addWidget(aCh, 7, 3);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//============ histograms
|
//============ histograms
|
||||||
|
@ -199,7 +215,7 @@ inline void CoincidentAnalyzer::SetUpCanvas(){
|
||||||
inline void CoincidentAnalyzer::UpdateHistograms(){
|
inline void CoincidentAnalyzer::UpdateHistograms(){
|
||||||
|
|
||||||
if( this->isVisible() == false ) return;
|
if( this->isVisible() == false ) return;
|
||||||
if( runAnalyzer->isChecked() == false ) return;
|
if( chkRunAnalyzer->isChecked() == false ) return;
|
||||||
|
|
||||||
BuildEvents(); // call the event builder to build events
|
BuildEvents(); // call the event builder to build events
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,7 @@ private:
|
||||||
|
|
||||||
Histogram1D * hMulti;
|
Histogram1D * hMulti;
|
||||||
|
|
||||||
QCheckBox * runAnalyzer;
|
QCheckBox * chkRunAnalyzer;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -76,8 +76,8 @@ inline void Encore::SetUpCanvas(){
|
||||||
|
|
||||||
setGeometry(0, 0, 1600, 1600);
|
setGeometry(0, 0, 1600, 1600);
|
||||||
|
|
||||||
runAnalyzer = new QCheckBox("Run Analyzer", this);
|
chkRunAnalyzer = new QCheckBox("Run Analyzer", this);
|
||||||
layout->addWidget(runAnalyzer, 0, 0);
|
layout->addWidget(chkRunAnalyzer, 0, 0);
|
||||||
|
|
||||||
hLeft = new Histogram2D("Left", "Ch", "Energy", 17, 0, 16, 200, 0, 20000, this);
|
hLeft = new Histogram2D("Left", "Ch", "Energy", 17, 0, 16, 200, 0, 20000, this);
|
||||||
layout->addWidget(hLeft, 1, 0);
|
layout->addWidget(hLeft, 1, 0);
|
||||||
|
@ -93,7 +93,7 @@ inline void Encore::SetUpCanvas(){
|
||||||
inline void Encore::UpdateHistograms(){
|
inline void Encore::UpdateHistograms(){
|
||||||
|
|
||||||
if( this->isVisible() == false ) return;
|
if( this->isVisible() == false ) return;
|
||||||
if( runAnalyzer->isChecked() == false ) return;
|
if( chkRunAnalyzer->isChecked() == false ) return;
|
||||||
|
|
||||||
BuildEvents(); // call the event builder to build events
|
BuildEvents(); // call the event builder to build events
|
||||||
|
|
||||||
|
|
|
@ -87,7 +87,7 @@ private:
|
||||||
RSpinBox * sbEnergy;
|
RSpinBox * sbEnergy;
|
||||||
RSpinBox * sbAngle;
|
RSpinBox * sbAngle;
|
||||||
|
|
||||||
QCheckBox * runAnalyzer;
|
QCheckBox * chkRunAnalyzer;
|
||||||
|
|
||||||
QLineEdit * leMassTablePath;
|
QLineEdit * leMassTablePath;
|
||||||
QLineEdit * leQValue;
|
QLineEdit * leQValue;
|
||||||
|
@ -212,8 +212,8 @@ inline void SplitPole::SetUpCanvas(){
|
||||||
FillConstants();
|
FillConstants();
|
||||||
});
|
});
|
||||||
|
|
||||||
runAnalyzer = new QCheckBox("Run Analyzer", this);
|
chkRunAnalyzer = new QCheckBox("Run Analyzer", this);
|
||||||
boxLayout->addWidget(runAnalyzer, 4, 1);
|
boxLayout->addWidget(chkRunAnalyzer, 4, 1);
|
||||||
|
|
||||||
|
|
||||||
QFrame *separator = new QFrame(box);
|
QFrame *separator = new QFrame(box);
|
||||||
|
@ -303,7 +303,7 @@ inline void SplitPole::SetUpCanvas(){
|
||||||
inline void SplitPole::UpdateHistograms(){
|
inline void SplitPole::UpdateHistograms(){
|
||||||
|
|
||||||
if( this->isVisible() == false ) return;
|
if( this->isVisible() == false ) return;
|
||||||
if( runAnalyzer->isChecked() == false ) return;
|
if( chkRunAnalyzer->isChecked() == false ) return;
|
||||||
|
|
||||||
BuildEvents(); // call the event builder to build events
|
BuildEvents(); // call the event builder to build events
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user