Commit 4e628c8d authored by Jérémie Dudouet's avatar Jérémie Dudouet
Browse files

Rename menu elements

Correct cleaning ENSDF infos
parent 4976a4d9
Pipeline #43611 passed with stage
in 5 minutes and 23 seconds
......@@ -39,24 +39,23 @@ CXGuiLSPlayer::CXGuiLSPlayer(const TGCompositeFrame *MotherFrame, UInt_t w, UInt
fDataSetMode->Connect("Selected(Int_t)", "CXGuiLSPlayer", this, "UpdateDataSet()");
fGroupFrame->AddFrame(fDataSetMode, new TGLayoutHints( kLHintsCenterY | kLHintsExpandX ,-10,-10,0,0));
TGCompositeFrame *fHorizontalFrame = new TGCompositeFrame(fGroupFrame, 60, 20, kHorizontalFrame);
fHorizontalFrame->AddFrame(fDataType[0] = new TGCheckButton(fHorizontalFrame, "ENSDF", 83), new TGLayoutHints(kLHintsTop | kLHintsLeft,5,0,0,0));
fHorizontalFrame->AddFrame(fDataType[1] = new TGCheckButton(fHorizontalFrame, "Exp data", 84), new TGLayoutHints(kLHintsTop | kLHintsLeft,7,0,0,0));
fHorizontalFrame->AddFrame(fFullGammaTitle = new TGCheckButton(fHorizontalFrame, "Full title", 86), new TGLayoutHints(kLHintsTop | kLHintsRight,5,0,0,0));
fFullGammaTitle->Connect("Clicked()", "CXGuiLSPlayer", this, "UpdateGammaRays()");
fDataType[0]->Connect("Clicked()","CXGuiLSPlayer", this, "UpdateGammaRays()");
fDataType[1]->Connect("Clicked()","CXGuiLSPlayer", this, "UpdateGammaRays()");
fDataType[0]->SetState(kButtonDown);
fDataType[1]->SetState(kButtonUp);
fGroupFrame->AddFrame(fHorizontalFrame,new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandX, 0, 0, 10, 3));
fHorizontalFrame = new TGCompositeFrame(fGroupFrame, 60, 20, kHorizontalFrame);
// TGCompositeFrame *fHorizontalFrame = new TGCompositeFrame(fGroupFrame, 60, 20, kHorizontalFrame);
// fHorizontalFrame->AddFrame(fDataType[0] = new TGCheckButton(fHorizontalFrame, "ENSDF", 83), new TGLayoutHints(kLHintsTop | kLHintsLeft,5,0,0,0));
// fHorizontalFrame->AddFrame(fDataType[1] = new TGCheckButton(fHorizontalFrame, "Exp data", 84), new TGLayoutHints(kLHintsTop | kLHintsLeft,7,0,0,0));
// fDataType[0]->Connect("Clicked()","CXGuiLSPlayer", this, "UpdateGammaRays()");
// fDataType[1]->Connect("Clicked()","CXGuiLSPlayer", this, "UpdateGammaRays()");
// fDataType[0]->SetState(kButtonDown);
// fDataType[1]->SetState(kButtonUp);
// fGroupFrame->AddFrame(fHorizontalFrame,new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandX, 0, 0, 10, 3));
TGCompositeFrame * fHorizontalFrame = new TGCompositeFrame(fGroupFrame, 60, 20, kHorizontalFrame);
fHorizontalFrame->AddFrame(new TGLabel(fHorizontalFrame, "Text size: "),new TGLayoutHints(kLHintsCenterY , 0, 0, 0, 0));
fHorizontalFrame->AddFrame(fTextSize = new TGNumberEntry(fHorizontalFrame,0.03, 4,0, TGNumberFormat::kNESRealTwo, TGNumberFormat::kNEANonNegative ,TGNumberFormat::kNELLimitMinMax, 0.01 ,0.1), new TGLayoutHints(kLHintsCenterY | kLHintsLeft,5,0,0,0));
fTextSize->Connect("ValueSet(Long_t)", "CXGuiLSPlayer", this, "UpdateGammaRays()");
fHorizontalFrame->AddFrame(fFullGammaTitle = new TGCheckButton(fHorizontalFrame, "Full title", 86), new TGLayoutHints(kLHintsTop | kLHintsRight,5,0,0,0));
fFullGammaTitle->Connect("Clicked()", "CXGuiLSPlayer", this, "UpdateGammaRays()");
fGroupFrame->AddFrame(fHorizontalFrame,new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandX, 0, 0, 10, 3));
TGTextButton *fPlotLSButton = new TGTextButton(fGroupFrame, "Plot LS");
......@@ -215,12 +214,12 @@ void CXGuiLSPlayer::CheckListOfNuclei()
void CXGuiLSPlayer::UpdateGammaRays()
{
if(fMainWindow == nullptr)
return;
if(fNumberOfNuclei==0) return;
if(fMainWindow == nullptr) return;
fLSPlayer->CleanArrows();
if(!fNucleiAreKnown) {
WARN_MESS << "at least one of the nuclei is not known " << ENDL;
return;
}
fDataSetMode->RemoveAll();
......@@ -232,14 +231,16 @@ void CXGuiLSPlayer::UpdateGammaRays()
fMainWindow->SetSelectedPad(gPad);
}
if(fDataType[0]->GetState() == kButtonUp && fDataType[1]->GetState() == kButtonUp)
fDataTypeMode = 0;
if(fDataType[0]->GetState() == kButtonDown && fDataType[1]->GetState() == kButtonDown)
fDataTypeMode = 3;
if(fDataType[0]->GetState() == kButtonUp && fDataType[1]->GetState() == kButtonDown)
fDataTypeMode = 2;
if(fDataType[0]->GetState() == kButtonDown && fDataType[1]->GetState() == kButtonUp)
fDataTypeMode = 1;
// if(fDataType[0]->GetState() == kButtonUp && fDataType[1]->GetState() == kButtonUp)
// fDataTypeMode = 0;
// if(fDataType[0]->GetState() == kButtonDown && fDataType[1]->GetState() == kButtonDown)
// fDataTypeMode = 3;
// if(fDataType[0]->GetState() == kButtonUp && fDataType[1]->GetState() == kButtonDown)
// fDataTypeMode = 2;
// if(fDataType[0]->GetState() == kButtonDown && fDataType[1]->GetState() == kButtonUp)
// fDataTypeMode = 1;
fDataTypeMode = 1; // ENSDF
fBranchingRatio[0]->SetState(fUseBranchingRatio->GetState());fBranchingRatio[1]->SetState(fUseBranchingRatio->GetState());
fELevel[0]->SetState(fUseELevels->GetState());fELevel[1]->SetState(fUseELevels->GetState());
......
......@@ -31,7 +31,7 @@ private:
TGComboBox *fDataSetMode = nullptr;
TGCheckButton *fDataType[2];
// TGCheckButton *fDataType[2];
Int_t fDataTypeMode; //0 No data ; 1 ENSDF ; 2 Exp ; 3 ALL
Bool_t fYrastMode;
......
......@@ -85,6 +85,23 @@ void CXLevelSchemePlayer::ConnectCanvas()
fMainWindow->GetCanvas()->Connect("ProcessedEvent(Int_t, Int_t, Int_t, TObject*)","CXLevelSchemePlayer", this, "ProcessedEventLevelScheme(Int_t, Int_t, Int_t, TObject*)");
}
void CXLevelSchemePlayer::CleanArrows()
{
gPad = fMainWindow->GetSelectedPad();
for(int i=0 ; i<fListOfArrows->GetEntries() ; i++) {
if(gPad->GetListOfPrimitives()->FindObject(fListOfArrows->At(i))) {
gPad->GetListOfPrimitives()->Remove(fListOfArrows->At(i));
fListOfArrows->RemoveAt(i);
gPad->GetListOfPrimitives()->Remove(fListOfLatex->At(i));
fListOfLatex->RemoveAt(i);
gPad->GetListOfPrimitives()->Remove(fListOfBoxes->At(i));
fListOfBoxes->RemoveAt(i);
i--;
}
}
}
LevelScheme *CXLevelSchemePlayer::DrawArrows(TString ListOfNuclei,TH1 *h, TString DataSet)
{
LevelScheme *RefLevel = nullptr;
......@@ -103,18 +120,6 @@ LevelScheme *CXLevelSchemePlayer::DrawArrows(TString ListOfNuclei,TH1 *h, TStrin
fGuiLSPlayer->GetSpins(fMinSpin,fMaxSpin);
fGuiLSPlayer->GetLifeTime(fMinLifeTime,fMaxLifeTime);
for(int i=0 ; i<fListOfArrows->GetEntries() ; i++) {
if(gPad->GetListOfPrimitives()->FindObject(fListOfArrows->At(i))) {
gPad->GetListOfPrimitives()->Remove(fListOfArrows->At(i));
fListOfArrows->RemoveAt(i);
gPad->GetListOfPrimitives()->Remove(fListOfLatex->At(i));
fListOfLatex->RemoveAt(i);
gPad->GetListOfPrimitives()->Remove(fListOfBoxes->At(i));
fListOfBoxes->RemoveAt(i);
i--;
}
}
fCurrentHist = h;
fCurrentHist->GetYaxis()->UnZoom();
......
......@@ -71,6 +71,7 @@ public:
void SetMainWindow(CXMainWindow *w){fMainWindow = w;}
void SetGuiLSPlayer(CXGuiLSPlayer *player){fGuiLSPlayer = player;}
void CleanArrows();
LevelScheme *DrawArrows(TString ListOfNuclei, TH1 *h, TString DataSet);
LevelScheme *DrawArrowsForNuc(TString NucName, TString DataSet);
......
......@@ -102,16 +102,16 @@ void CXMainWindow::Init()
fMenuTools->AddLabel("1D Tools...",gClient->GetPicture("h1_t.xpm"));
fMenuTools->AddSeparator();
fMenuTools->AddEntry("LS Player", M_LSPlayerUtility,0,gClient->GetPicture("levelscheme_t.png"));
fMenuTools->AddEntry("ENSDF reader", M_LSPlayerUtility,0,gClient->GetPicture("levelscheme_t.png"));
// fMenuTools->CheckEntry(M_LSPlayerUtility);
IsLSPlayerToolEnabled = true;
fMenuTools->AddEntry("Hist1D Player", M_Hist1DPlayer,0,gClient->GetPicture("FitTool.xpm"));
fMenuTools->AddEntry("Peak fitter", M_Hist1DPlayer,0,gClient->GetPicture("FitTool.xpm"));
// fMenuTools->CheckEntry(M_Hist1DPlayer);
IsHist1DPlayerEnabled= true;
fMenuTools->AddEntry("background utility", M_BkdUtility,0,gClient->GetPicture("h1_t.xpm"));
fMenuTools->AddEntry("Background player", M_BkdUtility,0,gClient->GetPicture("h1_t.xpm"));
// fMenuTools->CheckEntry(M_BkdUtility);
IsBkdUtilityEnabled = true;
......@@ -119,11 +119,11 @@ void CXMainWindow::Init()
fMenuTools->AddLabel("2D Tools...",gClient->GetPicture("h2_t.xpm"));
fMenuTools->AddSeparator();
fMenuTools->AddEntry("Hist2D Player", M_Hist2DPlayer,0,gClient->GetPicture("h2_t.xpm"));
fMenuTools->AddEntry("GxG standard", M_Hist2DPlayer,0,gClient->GetPicture("h2_t.xpm"));
// fMenuTools->CheckEntry(M_Hist2DPlayer);
IsHist2DPlayerEnabled= true;
fMenuTools->AddEntry("Rad2D Player", M_Rad2DPlayer,0,gClient->GetPicture("rw3.gif"));
fMenuTools->AddEntry("GxG radware's style", M_Rad2DPlayer,0,gClient->GetPicture("rw3.gif"));
// fMenuTools->CheckEntry(M_Rad2DPlayer);
IsRad2DPlayerEnabled= true;
......@@ -131,7 +131,7 @@ void CXMainWindow::Init()
fMenuTools->AddLabel("3D Tools...",gClient->GetPicture("h3_t.xpm"));
fMenuTools->AddSeparator();
fMenuTools->AddEntry("RadCube Player", M_RadCubePlayer,0,gClient->GetPicture("rw3.gif"));
fMenuTools->AddEntry("GxGxG radware's style", M_RadCubePlayer,0,gClient->GetPicture("rw3.gif"));
// fMenuTools->CheckEntry(M_RadCubePlayer);
IsRadCubePlayerEnabled= true;
......@@ -834,6 +834,9 @@ void CXMainWindow::RefreshPads()
lnk = (TObjOptLink*)lnk->Next();
}
gPad->Modified();
gPad->Update();
fCanvas->Modified();
fCanvas->Update();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment