add ITL-AB and LVDS setting parameters, re-structure the digiSetting UI, leave space for LVDS and ITL settings
This commit is contained in:
parent
38525125c4
commit
49fe750070
|
@ -40,10 +40,14 @@ void Digitizer2Gen::Initialization(){
|
|||
settingFileName = "";
|
||||
boardSettings = PHA::DIG::AllSettings;
|
||||
for( int ch = 0; ch < MaxNumberOfChannel ; ch ++) chSettings[ch] = PHA::CH::AllSettings;
|
||||
for( int index = 0 ; index < 4; index ++) VGASetting[index] = PHA::VGA::VGAGain;
|
||||
for( int index = 0 ; index < 4; index ++) {
|
||||
VGASetting[index] = PHA::VGA::VGAGain;
|
||||
LVDSSettings[index] = PHA::LVDS::AllSettings;
|
||||
}
|
||||
|
||||
//build map
|
||||
for( int i = 0; i < (int) PHA::DIG::AllSettings.size(); i++) boardMap[PHA::DIG::AllSettings[i].GetPara()] = i;
|
||||
for( int i = 0; i < (int) PHA::LVDS::AllSettings.size(); i++) LVDSMap[PHA::LVDS::AllSettings[i].GetPara()] = i;
|
||||
for( int i = 0; i < (int) PHA::CH::AllSettings.size(); i++) chMap[PHA::CH::AllSettings[i].GetPara()] = i;
|
||||
|
||||
}
|
||||
|
@ -98,7 +102,7 @@ int Digitizer2Gen::FindIndex(const Reg para){
|
|||
case TYPE::CH: return chMap[para.GetPara()];
|
||||
case TYPE::DIG: return boardMap[para.GetPara()];
|
||||
case TYPE::VGA: return 0;
|
||||
case TYPE::LVDS: return -1;
|
||||
case TYPE::LVDS: return LVDSMap[para.GetPara()];
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
@ -125,7 +129,7 @@ std::string Digitizer2Gen::ReadValue(const Reg para, int ch_index, bool verbose
|
|||
case TYPE::CH : chSettings[ch_index][index].SetValue(ans); break;
|
||||
case TYPE::DIG : boardSettings[index].SetValue(ans); break;
|
||||
case TYPE::VGA : VGASetting[ch_index].SetValue(ans); break;
|
||||
case TYPE::LVDS: return "LVDS not implemented.";
|
||||
case TYPE::LVDS: LVDSSettings[ch_index][index].SetValue(ans);break;
|
||||
}
|
||||
|
||||
return ans;
|
||||
|
@ -768,6 +772,14 @@ void Digitizer2Gen::ReadAllSettings(){
|
|||
|
||||
if( ModelName == "VX2745" && FPGAType == "DPP_PHA") for(int i = 0; i < 4 ; i ++) ReadValue(VGASetting[i], i);
|
||||
|
||||
for( int index = 0; index < 4; index++){
|
||||
for( int i = 0; i < (int) LVDSSettings[index].size(); i++){
|
||||
if( LVDSSettings[index][i].ReadWrite() == RW::WriteOnly) continue;
|
||||
ReadValue(LVDSSettings[index][i], index, false);
|
||||
//printf("%d %d | %s | %s \n", index, i, LVDSSettings[index][i].GetPara().c_str(), LVDSSettings[index][i].GetValue().c_str());
|
||||
}
|
||||
}
|
||||
|
||||
for(int ch = 0; ch < nChannels ; ch++ ){
|
||||
for( int i = 0; i < (int) chSettings[ch].size(); i++){
|
||||
if( chSettings[ch][i].ReadWrite() == RW::WriteOnly) continue;
|
||||
|
@ -805,6 +817,20 @@ int Digitizer2Gen::SaveSettingsToFile(const char * saveFileName, bool setReadOnl
|
|||
count ++;
|
||||
}
|
||||
}
|
||||
|
||||
for( int i = 0; i < (int) LVDSSettings[0].size(); i++){
|
||||
for( int index = 0; index < 4; index++){
|
||||
if( LVDSSettings[index][i].ReadWrite() == RW::WriteOnly) continue;
|
||||
totCount ++;
|
||||
if( LVDSSettings[index][i].GetValue() == "") break;
|
||||
fprintf(saveFile, "%-45s!%d!%4d!%s\n", LVDSSettings[index][i].GetFullPara(index).c_str(),
|
||||
LVDSSettings[index][i].ReadWrite(),
|
||||
7000 + 4 * index + i,
|
||||
LVDSSettings[index][i].GetValue().c_str());
|
||||
count ++;
|
||||
}
|
||||
}
|
||||
|
||||
for( int i = 0; i < (int) chSettings[0].size(); i++){
|
||||
for(int ch = 0; ch < nChannels ; ch++ ){
|
||||
if( chSettings[ch][i].ReadWrite() == RW::WriteOnly) continue;
|
||||
|
@ -820,7 +846,7 @@ int Digitizer2Gen::SaveSettingsToFile(const char * saveFileName, bool setReadOnl
|
|||
fclose(saveFile);
|
||||
|
||||
if( count != totCount ) {
|
||||
remove(saveFileName);
|
||||
printf("!!!!! some setting is empty. !!!!!! ");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -883,7 +909,7 @@ bool Digitizer2Gen::LoadSettingsFromFile(const char * loadFileName){
|
|||
}
|
||||
|
||||
int id = atoi(idStr);
|
||||
if( id < 8000){ // channel
|
||||
if( id < 7000){ // channel
|
||||
int ch = id / 100;
|
||||
int index = id - ch * 100;
|
||||
chSettings[ch][index].SetValue(value);
|
||||
|
@ -892,6 +918,11 @@ bool Digitizer2Gen::LoadSettingsFromFile(const char * loadFileName){
|
|||
// chSettings[ch][index].ReadWrite(), id,
|
||||
// chSettings[ch][index].GetValue().c_str());
|
||||
|
||||
}else if ( 7000 <= id && id < 8000){ // LVDS
|
||||
int index = (id-7000)/4;
|
||||
int ch = id - 7000 - index * 4;
|
||||
LVDSSettings[index][ch].SetValue(value);
|
||||
|
||||
}else if ( 8000 <= id && id < 9000){ // board
|
||||
boardSettings[id - 8000].SetValue(value);
|
||||
//printf("%s|%d|%d|%s\n", boardSettings[id-8000].GetFullPara().c_str(),
|
||||
|
@ -924,7 +955,7 @@ std::string Digitizer2Gen::GetSettingValue(const Reg para, unsigned int ch_index
|
|||
case TYPE::DIG: return boardSettings[index].GetValue();
|
||||
case TYPE::CH: return chSettings[ch_index][index].GetValue();
|
||||
case TYPE::VGA: return VGASetting[ch_index].GetValue();
|
||||
case TYPE::LVDS: return "not defined";
|
||||
case TYPE::LVDS: return LVDSSettings[ch_index][index].GetValue();
|
||||
default : return "invalid";
|
||||
}
|
||||
return "no such parameter";
|
||||
|
|
|
@ -60,9 +60,11 @@ class Digitizer2Gen {
|
|||
std::string settingFileName;
|
||||
std::vector<Reg> boardSettings;
|
||||
std::vector<Reg> chSettings[MaxNumberOfChannel];
|
||||
std::vector<Reg> LVDSSettings[4];
|
||||
Reg VGASetting[4];
|
||||
|
||||
std::map<std::string, int> boardMap;
|
||||
std::map<std::string, int> LVDSMap;
|
||||
std::map<std::string, int> chMap;
|
||||
|
||||
public:
|
||||
|
|
|
@ -25,6 +25,7 @@ public:
|
|||
void run(){
|
||||
stop = false;
|
||||
clock_gettime(CLOCK_REALTIME, &ta);
|
||||
emit sendMsg("Digi-" + QString::number(digi->GetSerialNumber()) + " ReadDataThread started.");
|
||||
|
||||
while(!stop){
|
||||
digiMTX[ID].lock();
|
||||
|
@ -34,7 +35,7 @@ public:
|
|||
if( ret == CAEN_FELib_Success){
|
||||
if( isSaveData) digi->SaveDataToFile();
|
||||
}else if(ret == CAEN_FELib_Stop){
|
||||
digi->ErrorMsg("No more data");
|
||||
digi->ErrorMsg("ReadData Thread No more data");
|
||||
//emit endOfLastData();
|
||||
break;
|
||||
}else{
|
||||
|
@ -53,6 +54,9 @@ public:
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
emit sendMsg("Digi-" + QString::number(digi->GetSerialNumber()) + " ReadDataThread stopped.");
|
||||
|
||||
}
|
||||
signals:
|
||||
void sendMsg(const QString &msg);
|
||||
|
|
|
@ -199,7 +199,7 @@ namespace PHA{
|
|||
{"SyncIn", "SyncIn Signal"},
|
||||
{"SIN", "S-IN Signal"},
|
||||
{"GPIO", "GPIO Signal"},
|
||||
{"AccepTrg", "Acceped Trigger Signal"},
|
||||
{"AcceptTrg", "Acceped Trigger Signal"},
|
||||
{"TrgClk", "Trigger Clock"}});
|
||||
const Reg GPIOMode ("GPIOMode", RW::ReadWrite, TYPE::DIG, {{"Disabled", "Disabled"},
|
||||
{"TRGIN", "TRG-IN"},
|
||||
|
@ -248,6 +248,24 @@ namespace PHA{
|
|||
const Reg DACoutChSelect ("DACoutChSelect", RW::ReadWrite, TYPE::DIG, {{"0", ""}, {"64", ""}, {"1",""}}, ANSTYPE::INTEGER);
|
||||
const Reg EnableOffsetCalibration ("EnOffsetCalibration", RW::ReadWrite, TYPE::DIG, {{"True", "Applied Cali."}, {"False", "No Cali."}});
|
||||
|
||||
const Reg ITLAMainLogic ("ITLAMainLogic", RW::ReadWrite, TYPE::DIG, {{"OR", "OR"},{"AND", "AND"}, {"Majority", "Majority"}});
|
||||
const Reg ITLAMajorityLev ("ITLAMajorityLev", RW::ReadWrite, TYPE::DIG, {{"1", ""},{"63", ""}, {"1", ""}}, ANSTYPE::INTEGER);
|
||||
const Reg ITLAPairLogic ("ITLAPairLogic", RW::ReadWrite, TYPE::DIG, {{"OR", "OR"},{"AND", "AND"}, {"NONE", "NONE"}});
|
||||
const Reg ITLAPolarity ("ITLAPolarity", RW::ReadWrite, TYPE::DIG, {{"Direct", "Direct"},{"Inverted", "Inverted"}});
|
||||
const Reg ITLAMask ("ITLAMask", RW::ReadWrite, TYPE::DIG, {}, ANSTYPE::BYTE, "64-bit");
|
||||
const Reg ITLAGateWidth ("ITLAGateWidth", RW::ReadWrite, TYPE::DIG, {{"0", ""}, {"524280", ""}, {"8", ""}}, ANSTYPE::INTEGER, "ns");
|
||||
|
||||
const Reg ITLBMainLogic ("ITLBMainLogic", RW::ReadWrite, TYPE::DIG, {{"OR", "OR"},{"AND", "AND"}, {"Majority", "Majority"}});
|
||||
const Reg ITLBMajorityLev ("ITLBMajorityLev", RW::ReadWrite, TYPE::DIG, {{"1", ""},{"63", ""}, {"1", ""}}, ANSTYPE::INTEGER);
|
||||
const Reg ITLBPairLogic ("ITLBPairLogic", RW::ReadWrite, TYPE::DIG, {{"OR", "OR"},{"AND", "AND"}, {"NONE", "NONE"}});
|
||||
const Reg ITLBPolarity ("ITLBPolarity", RW::ReadWrite, TYPE::DIG, {{"Direct", "Direct"},{"Inverted", "Inverted"}});
|
||||
const Reg ITLBMask ("ITLBMask", RW::ReadWrite, TYPE::DIG, {}, ANSTYPE::BYTE, "64-bit");
|
||||
const Reg ITLBGateWidth ("ITLBGateWidth", RW::ReadWrite, TYPE::DIG, {{"0", ""}, {"524280", ""}, {"8", ""}}, ANSTYPE::INTEGER, "ns");
|
||||
|
||||
|
||||
const Reg LVDSIOReg ("LVDSIOReg", RW::ReadWrite, TYPE::DIG, {}, ANSTYPE::STR);
|
||||
//const Reg LVDSTrgMask ("lvdstrgmask", RW::ReadWrite, TYPE::DIG, {}, ANSTYPE::BYTE, "64-bit");
|
||||
|
||||
/// ========== command
|
||||
const Reg Reset ("Reset", RW::WriteOnly, TYPE::DIG, {}, ANSTYPE::NONE, "", true);
|
||||
const Reg ClearData ("ClearData", RW::WriteOnly, TYPE::DIG, {}, ANSTYPE::NONE, "", true); // clear memory, setting not affected
|
||||
|
@ -338,7 +356,21 @@ namespace PHA{
|
|||
DACoutMode ,
|
||||
DACoutStaticLevel ,
|
||||
DACoutChSelect ,
|
||||
EnableOffsetCalibration
|
||||
EnableOffsetCalibration ,
|
||||
ITLAMainLogic ,
|
||||
ITLAMajorityLev ,
|
||||
ITLAPairLogic ,
|
||||
ITLAPolarity ,
|
||||
ITLAMask ,
|
||||
ITLAGateWidth ,
|
||||
ITLBMainLogic ,
|
||||
ITLBMajorityLev ,
|
||||
ITLBPairLogic ,
|
||||
ITLBPolarity ,
|
||||
ITLBMask ,
|
||||
ITLBGateWidth ,
|
||||
LVDSIOReg
|
||||
//LVDSTrgMask
|
||||
};
|
||||
|
||||
|
||||
|
@ -348,6 +380,22 @@ namespace PHA{
|
|||
const Reg VGAGain ("VGAGain", RW::ReadWrite, TYPE::VGA, {{"0", ""},{"40", ""}, {"0.5",""}}, ANSTYPE::INTEGER, "dB"); // VX2745 only
|
||||
}
|
||||
|
||||
namespace LVDS{
|
||||
|
||||
const Reg LVDSMode ("LVDSMode", RW::ReadWrite, TYPE::LVDS, {{"SelfTriggers", "Self-Trigger"},
|
||||
{"Sync", "Sync"},
|
||||
{"IORegister", "IORegister"}});
|
||||
|
||||
const Reg LVDSDirection ("LVDSDirection", RW::ReadWrite, TYPE::LVDS, {{"Input", "Input"},
|
||||
{"Output", "Output"}});
|
||||
|
||||
const std::vector<Reg> AllSettings = {
|
||||
LVDSMode ,
|
||||
LVDSDirection
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
namespace CH{
|
||||
|
||||
/// ========= red only
|
||||
|
@ -526,6 +574,8 @@ namespace PHA{
|
|||
const Reg EnergyFilterBaselineGuardSample ("EnergyFilterBaselineGuardS", RW::ReadWrite, TYPE::CH, {{"0", ""},{"1000", ""}, {"1", ""}}, ANSTYPE::INTEGER, "sample");
|
||||
const Reg EnergyFilterPileUpGuardSample ("EnergyFilterPileUpGuardS", RW::ReadWrite, TYPE::CH, {{"0", ""},{"8000", ""}, {"1", ""}}, ANSTYPE::INTEGER, "sample");
|
||||
|
||||
const Reg ITLConnect ("ITLConnect", RW::ReadWrite, TYPE::CH, {{"Disabled", "Disabled"},{"ITLA", "ITLA"}, {"ITLB", "ITLB"}});
|
||||
|
||||
const std::vector<Reg> AllSettings = {
|
||||
SelfTrgRate ,
|
||||
ChannelStatus ,
|
||||
|
@ -585,7 +635,8 @@ namespace PHA{
|
|||
EnergyFilterFlatTopSample ,
|
||||
EnergyFilterPoleZeroSample ,
|
||||
EnergyFilterBaselineGuardSample ,
|
||||
EnergyFilterPileUpGuardSample
|
||||
EnergyFilterPileUpGuardSample ,
|
||||
ITLConnect
|
||||
};
|
||||
|
||||
}
|
||||
|
|
18
README.md
18
README.md
|
@ -36,6 +36,20 @@ The test.cpp is a demo code to use the ClassDigitizer2Gen.h/cpp.
|
|||
|
||||
https://fsunuc.physics.fsu.edu/wiki/index.php/FRIB_SOLARIS_Collaboration
|
||||
|
||||
# Additional function
|
||||
|
||||
## connect to analysis working directory
|
||||
When the analysis path is set, it will do servera things
|
||||
|
||||
- save the expName.sh
|
||||
- save Settings
|
||||
- try to load the Mapping.h in the working directory
|
||||
|
||||
## End run bash script
|
||||
|
||||
When run stop, it will run the bash script under the directory scripts/endRUnScript.h
|
||||
|
||||
|
||||
# Required / Development enviroment
|
||||
|
||||
Ubuntu 22.04
|
||||
|
@ -64,3 +78,7 @@ in the *.pro, add
|
|||
run ` qmake6 *.pro` it will generate Makefile
|
||||
|
||||
then ` make`
|
||||
|
||||
# Known Issues
|
||||
|
||||
The "Accp." Rate in the Scaler does not included the coincident condition. This is related to the ChSavedEventCnt from the firmware.
|
|
@ -264,11 +264,23 @@ DigiSettingsPanel::DigiSettingsPanel(Digitizer2Gen ** digi, unsigned short nDigi
|
|||
|
||||
}
|
||||
|
||||
|
||||
{//^============================ Board Settings tab
|
||||
|
||||
QTabWidget * bdTab = new QTabWidget(tab);
|
||||
tabLayout_V1->addWidget(bdTab);
|
||||
|
||||
{//^====================== Group Board settings
|
||||
digiBox[iDigi] = new QGroupBox("Board Settings", tab);
|
||||
//digiBox->setSizePolicy(sizePolicy);
|
||||
QGridLayout * boardLayout = new QGridLayout(digiBox[iDigi]);
|
||||
tabLayout_V1->addWidget(digiBox[iDigi]);
|
||||
|
||||
bdCfg[iDigi] = new QWidget(this);
|
||||
bdTab->addTab(bdCfg[iDigi], "Board");
|
||||
|
||||
//digiBox[iDigi] = new QGroupBox("Board Settings", tab);
|
||||
// //digiBox->setSizePolicy(sizePolicy);
|
||||
QGridLayout * boardLayout = new QGridLayout(bdCfg[iDigi]);
|
||||
boardLayout->setAlignment(Qt::AlignTop);
|
||||
boardLayout->setSpacing(2);
|
||||
//tabLayout_V1->addWidget(digiBox[iDigi]);
|
||||
|
||||
int rowId = 0;
|
||||
//-------------------------------------
|
||||
|
@ -495,36 +507,39 @@ DigiSettingsPanel::DigiSettingsPanel(Digitizer2Gen ** digi, unsigned short nDigi
|
|||
}
|
||||
|
||||
{//^====================== Test Pulse settings
|
||||
testPulseBox[iDigi] = new QGroupBox("Test Pulse Settings", tab);
|
||||
tabLayout_V1->addWidget(testPulseBox[iDigi]);
|
||||
QGridLayout * testPulseLayout = new QGridLayout(testPulseBox[iDigi]);
|
||||
testPulseLayout->setAlignment(Qt::AlignLeft);
|
||||
testPulseLayout->setVerticalSpacing(0);
|
||||
|
||||
bdTestPulse[iDigi] = new QWidget(this);
|
||||
bdTab->addTab(bdTestPulse[iDigi], "Test Pulse");
|
||||
QGridLayout * testPulseLayout = new QGridLayout(bdTestPulse[iDigi]);
|
||||
testPulseLayout->setAlignment(Qt::AlignTop);
|
||||
testPulseLayout->setSpacing(2);
|
||||
|
||||
SetupSpinBox(dsbTestPuslePeriod[iDigi], PHA::DIG::TestPulsePeriod, -1, false, "Period [ns] :", testPulseLayout, 0, 0);
|
||||
SetupSpinBox(dsbTestPusleWidth[iDigi], PHA::DIG::TestPulseWidth, -1, false, "Width [ns] :", testPulseLayout, 0, 2);
|
||||
SetupSpinBox(spbTestPusleLowLevel[iDigi], PHA::DIG::TestPulseLowLevel, -1, false, "Low Lvl. [LSB] :", testPulseLayout, 0, 4);
|
||||
SetupSpinBox(spbTestPusleHighLevel[iDigi], PHA::DIG::TestPulseHighLevel, -1, false, "High Lvl. [LSB] :", testPulseLayout, 0, 6);
|
||||
SetupSpinBox(dsbTestPusleWidth[iDigi], PHA::DIG::TestPulseWidth, -1, false, "Width [ns] :", testPulseLayout, 1, 0);
|
||||
SetupSpinBox(spbTestPusleLowLevel[iDigi], PHA::DIG::TestPulseLowLevel, -1, false, "Low Lvl. [LSB] :", testPulseLayout, 2, 0);
|
||||
SetupSpinBox(spbTestPusleHighLevel[iDigi], PHA::DIG::TestPulseHighLevel, -1, false, "High Lvl. [LSB] :", testPulseLayout, 3, 0);
|
||||
|
||||
dsbTestPuslePeriod[iDigi]->setFixedSize(110, 30);
|
||||
dsbTestPuslePeriod[iDigi]->setDecimals(0);
|
||||
dsbTestPusleWidth[iDigi]->setFixedSize(110, 30);
|
||||
dsbTestPusleWidth[iDigi]->setDecimals(0);
|
||||
// dsbTestPuslePeriod[iDigi]->setFixedSize(110, 30);
|
||||
// dsbTestPuslePeriod[iDigi]->setDecimals(0);
|
||||
// dsbTestPusleWidth[iDigi]->setFixedSize(110, 30);
|
||||
// dsbTestPusleWidth[iDigi]->setDecimals(0);
|
||||
|
||||
for( int i = 0; i < testPulseLayout->columnCount(); i++) testPulseLayout->setColumnStretch(i, 0 );
|
||||
}
|
||||
|
||||
{//^====================== VGA settings
|
||||
VGABox[iDigi] = new QGroupBox("Gain Amplifier Settings", tab);
|
||||
tabLayout_V1->addWidget(VGABox[iDigi]);
|
||||
QGridLayout * vgaLayout = new QGridLayout(VGABox[iDigi]);
|
||||
vgaLayout->setVerticalSpacing(0);
|
||||
//vgaLayout->setAlignment(Qt::AlignLeft);
|
||||
|
||||
bdVGA[iDigi] = new QWidget(this);
|
||||
bdTab->addTab(bdVGA[iDigi], "VGA Setting");
|
||||
|
||||
QGridLayout * vgaLayout = new QGridLayout(bdVGA[iDigi]);
|
||||
//vgaLayout->setVerticalSpacing(0);
|
||||
vgaLayout->setAlignment(Qt::AlignTop);
|
||||
|
||||
for( int k = 0; k < 4; k ++){
|
||||
QLabel * lb = new QLabel("VGA-" + QString::number(k) + " [dB] :", tab);
|
||||
lb->setAlignment(Qt::AlignRight | Qt::AlignCenter);
|
||||
vgaLayout->addWidget(lb, 0, 2*k);
|
||||
vgaLayout->addWidget(lb, k, 0);
|
||||
|
||||
VGA[iDigi][k] = new RSpinBox(tab, 1);
|
||||
VGA[iDigi][k]->setMinimum(0);
|
||||
|
@ -532,7 +547,7 @@ DigiSettingsPanel::DigiSettingsPanel(Digitizer2Gen ** digi, unsigned short nDigi
|
|||
VGA[iDigi][k]->setSingleStep(0.5);
|
||||
VGA[iDigi][k]->SetToolTip();
|
||||
|
||||
vgaLayout->addWidget(VGA[iDigi][k], 0, 2*k+1);
|
||||
vgaLayout->addWidget(VGA[iDigi][k], k, 1);
|
||||
connect(VGA[iDigi][k], &RSpinBox::valueChanged, this, [=](){
|
||||
if( !enableSignalSlot ) return;
|
||||
VGA[ID][k]->setStyleSheet("color:blue;");
|
||||
|
@ -558,6 +573,28 @@ DigiSettingsPanel::DigiSettingsPanel(Digitizer2Gen ** digi, unsigned short nDigi
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
{//^====================== LVDS
|
||||
bdLVDS[iDigi] = new QWidget(this);
|
||||
bdTab->addTab(bdLVDS[iDigi], "LVDS");
|
||||
QGridLayout * LVDSLayout = new QGridLayout(bdLVDS[iDigi]);
|
||||
LVDSLayout->setAlignment(Qt::AlignTop);
|
||||
//LVDSLayout->setSpacing(2);
|
||||
|
||||
|
||||
}
|
||||
|
||||
{//^====================== ITL
|
||||
bdITL[iDigi] = new QWidget(this);
|
||||
bdTab->addTab(bdITL[iDigi], "ITL-A/B");
|
||||
QGridLayout * ITLLayout = new QGridLayout(bdITL[iDigi]);
|
||||
ITLLayout->setAlignment(Qt::AlignTop);
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
{//^====================== Group channel settings
|
||||
QGroupBox * chBox = new QGroupBox("Channel Settings", tab);
|
||||
//chBox->setSizePolicy(sizePolicy);
|
||||
|
@ -1018,17 +1055,17 @@ DigiSettingsPanel::DigiSettingsPanel(Digitizer2Gen ** digi, unsigned short nDigi
|
|||
|
||||
int rowID = 0;
|
||||
//----------------------------
|
||||
SetupComboBox( cbAllEvtTrigger[iDigi], PHA::CH::EventTriggerSource, -1, false, "Event Trigger Source (all ch.)", triggerLayout, rowID, 0);
|
||||
SetupComboBox( cbAllWaveTrigger[iDigi], PHA::CH::WaveTriggerSource, -1, false, "Wave Trigger Source (all ch.)", triggerLayout, rowID, 2);
|
||||
// SetupComboBox( cbAllEvtTrigger[iDigi], PHA::CH::EventTriggerSource, -1, false, "Event Trigger Source (all ch.)", triggerLayout, rowID, 0);
|
||||
// SetupComboBox( cbAllWaveTrigger[iDigi], PHA::CH::WaveTriggerSource, -1, false, "Wave Trigger Source (all ch.)", triggerLayout, rowID, 2);
|
||||
|
||||
//----------------------------
|
||||
rowID ++;
|
||||
SetupComboBox( cbAllCoinMask[iDigi], PHA::CH::CoincidenceMask, -1, false, "Coincident Mask (all ch.)", triggerLayout, rowID, 0);
|
||||
SetupSpinBox( sbAllCoinLength[iDigi], PHA::CH::CoincidenceLength, -1, false, "Coincident Length [ns] (all ch.)", triggerLayout, rowID, 2);
|
||||
// //----------------------------
|
||||
// rowID ++;
|
||||
// SetupComboBox( cbAllCoinMask[iDigi], PHA::CH::CoincidenceMask, -1, false, "Coincident Mask (all ch.)", triggerLayout, rowID, 0);
|
||||
// SetupSpinBox( sbAllCoinLength[iDigi], PHA::CH::CoincidenceLength, -1, false, "Coincident Length [ns] (all ch.)", triggerLayout, rowID, 2);
|
||||
|
||||
//----------------------------
|
||||
rowID ++;
|
||||
SetupComboBox( cbAllAntiCoinMask[iDigi], PHA::CH::AntiCoincidenceMask, -1, false, "Anti-Coincident Mask (all ch.)", triggerLayout, rowID, 0);
|
||||
// //----------------------------
|
||||
// rowID ++;
|
||||
// SetupComboBox( cbAllAntiCoinMask[iDigi], PHA::CH::AntiCoincidenceMask, -1, false, "Anti-Coincident Mask (all ch.)", triggerLayout, rowID, 0);
|
||||
|
||||
QSignalMapper * triggerMapper = new QSignalMapper(tab);
|
||||
connect(triggerMapper, &QSignalMapper::mappedInt, this, &DigiSettingsPanel::onTriggerClick);
|
||||
|
@ -1584,11 +1621,11 @@ void DigiSettingsPanel::ReadTriggerMap(){
|
|||
|
||||
//printf("%s\n", __func__);
|
||||
|
||||
cbAllEvtTrigger[ID]->setCurrentIndex(cbbEvtTrigger[ID][MaxNumberOfChannel]->currentIndex());
|
||||
cbAllWaveTrigger[ID]->setCurrentIndex(cbbWaveTrigger[ID][MaxNumberOfChannel]->currentIndex());
|
||||
cbAllCoinMask[ID]->setCurrentIndex(cbbCoinMask[ID][MaxNumberOfChannel]->currentIndex());
|
||||
cbAllAntiCoinMask[ID]->setCurrentIndex(cbbAntiCoinMask[ID][MaxNumberOfChannel]->currentIndex());
|
||||
sbAllCoinLength[ID]->setValue(spbCoinLength[ID][MaxNumberOfChannel]->value());
|
||||
// cbAllEvtTrigger[ID]->setCurrentIndex(cbbEvtTrigger[ID][MaxNumberOfChannel]->currentIndex());
|
||||
// cbAllWaveTrigger[ID]->setCurrentIndex(cbbWaveTrigger[ID][MaxNumberOfChannel]->currentIndex());
|
||||
// cbAllCoinMask[ID]->setCurrentIndex(cbbCoinMask[ID][MaxNumberOfChannel]->currentIndex());
|
||||
// cbAllAntiCoinMask[ID]->setCurrentIndex(cbbAntiCoinMask[ID][MaxNumberOfChannel]->currentIndex());
|
||||
// sbAllCoinLength[ID]->setValue(spbCoinLength[ID][MaxNumberOfChannel]->value());
|
||||
|
||||
for( int ch = 0; ch < (int) digi[ID]->GetNChannels(); ch ++){
|
||||
|
||||
|
@ -1640,9 +1677,13 @@ void DigiSettingsPanel::EnableControl(){
|
|||
for( int id = 0; id < nDigi; id ++){
|
||||
bool enable = !digi[id]->IsAcqOn();
|
||||
|
||||
digiBox[id]->setEnabled(enable);
|
||||
if( digi[id]->GetFPGAType() == "DPP_PHA") VGABox[id]->setEnabled(enable);
|
||||
if( ckbGlbTrgSource[id][3]->isChecked() ) testPulseBox[id]->setEnabled(enable);
|
||||
//digiBox[id]->setEnabled(enable);
|
||||
//if( digi[id]->GetFPGAType() == "DPP_PHA") VGABox[id]->setEnabled(enable);
|
||||
//if( ckbGlbTrgSource[id][3]->isChecked() ) testPulseBox[id]->setEnabled(enable);
|
||||
|
||||
bdCfg[id]->setEnabled(enable);
|
||||
bdTestPulse[id]->setEnabled(enable);
|
||||
|
||||
box1[id]->setEnabled(enable);
|
||||
box3[id]->setEnabled(enable);
|
||||
box4[id]->setEnabled(enable);
|
||||
|
@ -1660,7 +1701,7 @@ void DigiSettingsPanel::EnableControl(){
|
|||
bnSoftwareStart[id]->setEnabled(enable);
|
||||
bnSoftwareStop[id]->setEnabled(enable);
|
||||
|
||||
if( digi[id]->GetFPGAType() != "DPP_PHA" || digi[id]->GetModelName() != "VX2745" ) VGABox[id]->setEnabled(false);
|
||||
if( digi[id]->GetFPGAType() != "DPP_PHA" || digi[id]->GetModelName() != "VX2745" ) bdVGA[id]->setEnabled(false);
|
||||
|
||||
QVector<QTabWidget*> tempArray = {inputTab[id], trapTab[id], probeTab[id], otherTab[id] };
|
||||
|
||||
|
@ -1815,13 +1856,13 @@ void DigiSettingsPanel::UpdatePanelFromMemory(bool onlyStatus){
|
|||
|
||||
result = QString::fromStdString(digi[ID]->GetSettingValue(PHA::DIG::GlobalTriggerSource));
|
||||
resultList = result.remove(QChar(' ')).split("|");
|
||||
testPulseBox[ID]->setEnabled(false);
|
||||
bdTestPulse[ID]->setEnabled(false);
|
||||
for( int j = 0; j < (int) PHA::DIG::StartSource.GetAnswers().size(); j++){
|
||||
ckbGlbTrgSource[ID][j]->setChecked(false);
|
||||
for( int i = 0; i < resultList.count(); i++){
|
||||
if( resultList[i] == QString::fromStdString((PHA::DIG::GlobalTriggerSource.GetAnswers())[j].first) ) {
|
||||
ckbGlbTrgSource[ID][j]->setChecked(true);
|
||||
if( resultList[i] == "TestPulse" ) testPulseBox[ID]->setEnabled(true);
|
||||
if( resultList[i] == "TestPulse" ) bdTestPulse[ID]->setEnabled(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1998,13 +2039,13 @@ void DigiSettingsPanel::SetGlobalTriggerSource(){
|
|||
if( !enableSignalSlot ) return;
|
||||
|
||||
std::string value = "";
|
||||
testPulseBox[ID]->setEnabled(false);
|
||||
bdTestPulse[ID]->setEnabled(false);
|
||||
for( int i = 0; i < (int) PHA::DIG::GlobalTriggerSource.GetAnswers().size(); i++){
|
||||
if( ckbGlbTrgSource[ID][i]->isChecked() ){
|
||||
//printf("----- %s \n", DIGIPARA::DIG::StartSource.GetAnswers()[i].first.c_str());
|
||||
if( value != "" ) value += " | ";
|
||||
value += PHA::DIG::GlobalTriggerSource.GetAnswers()[i].first;
|
||||
if( PHA::DIG::GlobalTriggerSource.GetAnswers()[i].first == "TestPulse" ) testPulseBox[ID]->setEnabled(true);
|
||||
if( PHA::DIG::GlobalTriggerSource.GetAnswers()[i].first == "TestPulse" ) bdTestPulse[ID]->setEnabled(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -60,9 +60,9 @@ private:
|
|||
QTabWidget * tabWidget;
|
||||
|
||||
//------------ Layout/GroupBox
|
||||
QGroupBox * digiBox[MaxNumberOfDigitizer];
|
||||
QGroupBox * VGABox[MaxNumberOfDigitizer];
|
||||
QGroupBox * testPulseBox[MaxNumberOfDigitizer];
|
||||
//QGroupBox * digiBox[MaxNumberOfDigitizer];
|
||||
//QGroupBox * VGABox[MaxNumberOfDigitizer];
|
||||
//QGroupBox * testPulseBox[MaxNumberOfDigitizer];
|
||||
|
||||
QGroupBox * box0[MaxNumberOfDigitizer];
|
||||
QGroupBox * box1[MaxNumberOfDigitizer];
|
||||
|
@ -133,6 +133,18 @@ private:
|
|||
QPushButton * bnSoftwareStop[MaxNumberOfChannel];
|
||||
|
||||
//-------------- board settings
|
||||
//QGridLayout * bdCfgLayout[MaxNumberOfDigitizer];
|
||||
//QGridLayout * bdTestPulseLayout[MaxNumberOfDigitizer];
|
||||
//QGridLayout * bdVGALayout[MaxNumberOfDigitizer];
|
||||
QGridLayout * bdLVDSLayout[MaxNumberOfDigitizer];
|
||||
|
||||
QWidget * bdCfg[MaxNumberOfDigitizer];
|
||||
QWidget * bdTestPulse[MaxNumberOfDigitizer];
|
||||
QWidget * bdVGA[MaxNumberOfDigitizer];
|
||||
QWidget * bdLVDS[MaxNumberOfDigitizer];
|
||||
QWidget * bdITL[MaxNumberOfDigitizer];
|
||||
|
||||
|
||||
RComboBox * cbbClockSource[MaxNumberOfDigitizer];
|
||||
RComboBox * cbbEnClockFrontPanel[MaxNumberOfDigitizer];
|
||||
QCheckBox * ckbStartSource[MaxNumberOfDigitizer][5];
|
||||
|
@ -160,12 +172,14 @@ private:
|
|||
//-------------- VGA
|
||||
RSpinBox * VGA[MaxNumberOfDigitizer][4];
|
||||
|
||||
//-------------- LVDS
|
||||
|
||||
//--------------- trigger map
|
||||
RComboBox * cbAllEvtTrigger[MaxNumberOfDigitizer];
|
||||
RComboBox * cbAllWaveTrigger[MaxNumberOfDigitizer];
|
||||
RComboBox * cbAllCoinMask[MaxNumberOfDigitizer];
|
||||
RComboBox * cbAllAntiCoinMask[MaxNumberOfDigitizer];
|
||||
RSpinBox * sbAllCoinLength[MaxNumberOfDigitizer];
|
||||
//RComboBox * cbAllEvtTrigger[MaxNumberOfDigitizer];
|
||||
//RComboBox * cbAllWaveTrigger[MaxNumberOfDigitizer];
|
||||
//RComboBox * cbAllCoinMask[MaxNumberOfDigitizer];
|
||||
//RComboBox * cbAllAntiCoinMask[MaxNumberOfDigitizer];
|
||||
//RSpinBox * sbAllCoinLength[MaxNumberOfDigitizer];
|
||||
QPushButton * trgMap[MaxNumberOfDigitizer][MaxNumberOfChannel][MaxNumberOfChannel];
|
||||
bool trgMapClickStatus[MaxNumberOfDigitizer][MaxNumberOfChannel][MaxNumberOfChannel];
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user