bugs fix on channelSetting.cpp and settignsSummary
This commit is contained in:
parent
34a90be3d3
commit
9e11e8f613
|
@ -611,9 +611,9 @@ double Pixie16::GetChannelSetting(std::string parName, unsigned short modID, uns
|
||||||
printf("Block data acquisition if trace or header DPMs are full (bit: 4) : %s \n", CSRA & CSRA_BIT::BLOCK_DAQ_DPM_FULL ? "Yes" : "No");
|
printf("Block data acquisition if trace or header DPMs are full (bit: 4) : %s \n", CSRA & CSRA_BIT::BLOCK_DAQ_DPM_FULL ? "Yes" : "No");
|
||||||
printf(" signal polarity (bit: 5) : %s \n", CSRA & CSRA_BIT::POLARITY ? "\033[1;33mPositive\033[m" : "\033[1;31mNegative\033[m");
|
printf(" signal polarity (bit: 5) : %s \n", CSRA & CSRA_BIT::POLARITY ? "\033[1;33mPositive\033[m" : "\033[1;31mNegative\033[m");
|
||||||
printf(" veto channel trigger (bit: 6) : %s \n", CSRA & CSRA_BIT::VETO_TRIGGER ? "enable" : "disable");
|
printf(" veto channel trigger (bit: 6) : %s \n", CSRA & CSRA_BIT::VETO_TRIGGER ? "enable" : "disable");
|
||||||
printf(" Enable trace capture (bit: 8) : %s \n", CSRA & CSRA_BIT::ENABLE_TRACE ? "enable" : "disable");
|
printf(" Enable trace capture (bit: 8) : %s \n", CSRA & CSRA_BIT::ENABLE_TRACE ? "\033[1;33menable\033[m" : "disable");
|
||||||
printf(" Enable QDC sum capture (bit: 9) : %s \n", CSRA & CSRA_BIT::ENABLE_QDC ? "enable" : "disable");
|
printf(" Enable QDC sum capture (bit: 9) : %s \n", CSRA & CSRA_BIT::ENABLE_QDC ? "\033[1;33menable\033[m" : "disable");
|
||||||
printf(" Enable CFD trigger mode (bit: 10) : %s \n", CSRA & CSRA_BIT::ENABLE_CFD ? "enable" : "disable");
|
printf(" Enable CFD trigger mode (bit: 10) : %s \n", CSRA & CSRA_BIT::ENABLE_CFD ? "\033[1;33menable\033[m" : "disable");
|
||||||
printf(" required module validation trigger (bit: 11) : %s \n", CSRA & CSRA_BIT::REQ_M_VALIDATION ? "required" : "not required");
|
printf(" required module validation trigger (bit: 11) : %s \n", CSRA & CSRA_BIT::REQ_M_VALIDATION ? "required" : "not required");
|
||||||
printf(" Enable capture raw energy sums and baselines (bit: 12) : %s \n", CSRA & CSRA_BIT::CAPTURE_ESUMS_BASELINE ? "enable" : "disable");
|
printf(" Enable capture raw energy sums and baselines (bit: 12) : %s \n", CSRA & CSRA_BIT::CAPTURE_ESUMS_BASELINE ? "enable" : "disable");
|
||||||
printf(" required cahnnel validation trigger (bit: 13) : %s \n", CSRA & CSRA_BIT::REQ_C_VALIDATION ? "required" : "not required");
|
printf(" required cahnnel validation trigger (bit: 13) : %s \n", CSRA & CSRA_BIT::REQ_C_VALIDATION ? "required" : "not required");
|
||||||
|
|
|
@ -164,7 +164,7 @@ ChannelSetting::ChannelSetting(const TGWindow *p, UInt_t w, UInt_t h, Pixie16 *
|
||||||
cbQDCsumOnOff->Connect("Selected(Int_t, Int_t)", "ChannelSetting", this, "ChangeQDCsumOnOff()");
|
cbQDCsumOnOff->Connect("Selected(Int_t, Int_t)", "ChannelSetting", this, "ChangeQDCsumOnOff()");
|
||||||
hframeQDCsumOnOff->AddFrame(cbQDCsumOnOff, new TGLayoutHints(kLHintsRight, 5,5,3,4));
|
hframeQDCsumOnOff->AddFrame(cbQDCsumOnOff, new TGLayoutHints(kLHintsRight, 5,5,3,4));
|
||||||
|
|
||||||
TGLabel * lbQDCsumOnOff = new TGLabel(hframeQDCsumOnOff, "Trace On/Off");
|
TGLabel * lbQDCsumOnOff = new TGLabel(hframeQDCsumOnOff, "QDC sum On/Off");
|
||||||
hframeQDCsumOnOff->AddFrame(lbQDCsumOnOff, new TGLayoutHints(kLHintsRight | kLHintsCenterY, 5, 5, 3, 4));
|
hframeQDCsumOnOff->AddFrame(lbQDCsumOnOff, new TGLayoutHints(kLHintsRight | kLHintsCenterY, 5, 5, 3, 4));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,12 +20,12 @@ SettingsSummary::SettingsSummary(const TGWindow *p, UInt_t w, UInt_t h, Pixie16
|
||||||
fMain = new TGMainFrame(p,w,h);
|
fMain = new TGMainFrame(p,w,h);
|
||||||
fMain->SetWindowName("Pixie16 Settings Summary");
|
fMain->SetWindowName("Pixie16 Settings Summary");
|
||||||
fMain->Connect("CloseWindow()", "SettingsSummary", this, "CloseWindow()");
|
fMain->Connect("CloseWindow()", "SettingsSummary", this, "CloseWindow()");
|
||||||
fMain->SetMWMHints(1,4, 0);
|
//fMain->SetMWMHints(1,4, 0);
|
||||||
|
|
||||||
gClient->GetColorByName("red", red);
|
gClient->GetColorByName("red", red);
|
||||||
gClient->GetColorByName("black", black);
|
gClient->GetColorByName("black", black);
|
||||||
|
|
||||||
///Module choose
|
{///======================= Module choose and settings file
|
||||||
TGHorizontalFrame *hframe = new TGHorizontalFrame(fMain, w, 50 );
|
TGHorizontalFrame *hframe = new TGHorizontalFrame(fMain, w, 50 );
|
||||||
fMain->AddFrame(hframe, new TGLayoutHints(kLHintsCenterX, 2,2,2,2));
|
fMain->AddFrame(hframe, new TGLayoutHints(kLHintsCenterX, 2,2,2,2));
|
||||||
|
|
||||||
|
@ -55,7 +55,13 @@ SettingsSummary::SettingsSummary(const TGWindow *p, UInt_t w, UInt_t h, Pixie16
|
||||||
bSave->Connect("Clicked()","SettingsSummary",this, "SaveSetting()");
|
bSave->Connect("Clicked()","SettingsSummary",this, "SaveSetting()");
|
||||||
hframe->AddFrame(bSave, new TGLayoutHints(kLHintsCenterX, 5,5,3,4));
|
hframe->AddFrame(bSave, new TGLayoutHints(kLHintsCenterX, 5,5,3,4));
|
||||||
|
|
||||||
/// Setting
|
TGTextButton * bGetSettingsFromDigitizer = new TGTextButton(hframe,"&Refresh from digitizer");
|
||||||
|
bGetSettingsFromDigitizer->Connect("Clicked()","SettingsSummary",this, "GetSettingsFromDigitizer()");
|
||||||
|
hframe->AddFrame(bGetSettingsFromDigitizer, new TGLayoutHints(kLHintsCenterX, 5,5,3,4));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
{///======================= Setting
|
||||||
int modID = modIDEntry->GetNumber();
|
int modID = modIDEntry->GetNumber();
|
||||||
|
|
||||||
int numItems = 15;
|
int numItems = 15;
|
||||||
|
@ -202,6 +208,14 @@ SettingsSummary::SettingsSummary(const TGWindow *p, UInt_t w, UInt_t h, Pixie16
|
||||||
neBL[i]->Connect("Modified()", "SettingsSummary", this, Form("ChangeBL(=%d)", i));
|
neBL[i]->Connect("Modified()", "SettingsSummary", this, Form("ChangeBL(=%d)", i));
|
||||||
hframeCh[i]->AddFrame(neBL[i], new TGLayoutHints(kLHintsCenterX , 5, 5, 3, 4));
|
hframeCh[i]->AddFrame(neBL[i], new TGLayoutHints(kLHintsCenterX , 5, 5, 3, 4));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
TGHorizontalFrame * hframeLabel2 = new TGHorizontalFrame(fMain, w, 50);
|
||||||
|
fMain->AddFrame(hframeLabel2, new TGLayoutHints(kLHintsExpandX, 2,2,0,0));
|
||||||
|
|
||||||
|
TGLabel * lb999 = new TGLabel(hframeLabel2, "When this panel open, it read all settings from the digitizer.");
|
||||||
|
hframeLabel2->AddFrame(lb999, new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 5, 5, 3, 4));
|
||||||
|
|
||||||
|
|
||||||
fMain->MapSubwindows();
|
fMain->MapSubwindows();
|
||||||
fMain->Resize(fMain->GetDefaultSize());
|
fMain->Resize(fMain->GetDefaultSize());
|
||||||
|
@ -242,7 +256,41 @@ SettingsSummary::~SettingsSummary(){
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SettingsSummary::GetSettingsFromDigitizer(){
|
||||||
|
|
||||||
|
printf("===== %s \n", __func__);
|
||||||
|
|
||||||
|
short modID = modIDEntry->GetNumber();
|
||||||
|
|
||||||
|
for( int i=0; i < MAXCH; i++){
|
||||||
|
if( pixie->GetChannelOnOff(modID, i) ){
|
||||||
|
cbOnOff[i]->Select(1);
|
||||||
|
lbCh[i]->SetTextColor(red);
|
||||||
|
}else{
|
||||||
|
cbOnOff[i]->Select(0);
|
||||||
|
lbCh[i]->SetTextColor(black);
|
||||||
|
}
|
||||||
|
|
||||||
|
pixie->GetChannelGain(modID, i) ? cbGain[i]->Select(1) : cbGain[i]->Select(0);
|
||||||
|
|
||||||
|
neTrigL[i]->SetNumber(pixie->GetChannelTriggerRiseTime(modID, i));
|
||||||
|
neTrigG[i]->SetNumber(pixie->GetChannelTriggerFlatTop(modID, i));
|
||||||
|
neThreshold[i]->SetNumber(pixie->GetChannelTriggerThreshold(modID, i));
|
||||||
|
pixie->GetChannelPolarity(modID, i) ? cbPol[i]->Select(1) : cbPol[i]->Select(0);
|
||||||
|
|
||||||
|
neEngL[i]->SetNumber(pixie->GetChannelEnergyRiseTime(modID, i));
|
||||||
|
neEngG[i]->SetNumber(pixie->GetChannelEnergyFlatTop(modID, i));
|
||||||
|
neTau[i]->SetNumber(pixie->GetChannelEnergyTau(modID, i));
|
||||||
|
|
||||||
|
pixie->GetChannelTraceOnOff(modID, i) ? cbTraceOnOff[i]->Select(1) : cbTraceOnOff[i]->Select(0);
|
||||||
|
neTraceLength[i]->SetNumber(pixie->GetChannelTraceLength(modID, i));
|
||||||
|
neTraceDelay[i]->SetNumber(pixie->GetChannelTraceDelay(modID, i));
|
||||||
|
|
||||||
|
neVoff[i]->SetNumber(pixie->GetChannelVOffset(modID, i));
|
||||||
|
neBL[i]->SetNumber(pixie->GetChannelBaseLinePrecent(modID, i));
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
void SettingsSummary::ChangeOnOff(unsigned short ch){
|
void SettingsSummary::ChangeOnOff(unsigned short ch){
|
||||||
short modID = modIDEntry->GetNumber();
|
short modID = modIDEntry->GetNumber();
|
||||||
int val = cbOnOff[ch]->GetSelected();
|
int val = cbOnOff[ch]->GetSelected();
|
||||||
|
|
|
@ -56,6 +56,8 @@ public:
|
||||||
|
|
||||||
void CloseWindow() { printf("close SettingsSummary window\n"); delete this; }
|
void CloseWindow() { printf("close SettingsSummary window\n"); delete this; }
|
||||||
|
|
||||||
|
void GetSettingsFromDigitizer();
|
||||||
|
|
||||||
void ChangeOnOff(unsigned short ch);
|
void ChangeOnOff(unsigned short ch);
|
||||||
void ChangeGain(unsigned short ch);
|
void ChangeGain(unsigned short ch);
|
||||||
void ChangePol(unsigned short ch);
|
void ChangePol(unsigned short ch);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user