Commit 77d55243 authored by Jérémie Dudouet's avatar Jérémie Dudouet
Browse files

Correct errors on calibration procedure

Correct a bug in fit result
Add possibility to select the minimizer
parent d62d1537
......@@ -43,10 +43,15 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib_)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib_)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin_)
#if(APPLE)
# set(CMAKE_MACOSX_RPATH 1)
#endif()
#set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
#cmake_policy(SET CMP0077 NEW)
#cmake_policy(SET CMP0068 NEW)
# FIX Warning with rpath on macosx
if(APPLE)
set(CMAKE_MACOSX_RPATH 1)
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
endif()
#
# ROOT MANDATORY
#
......
......@@ -72,7 +72,7 @@ ROOT_GENERATE_DICTIONARY(G__${Lib_NAME} ${headers} MODULE ${Lib_NAME} LINKDEF ${
#####################
#---Create a shared library with geneated dictionary
add_library(${Lib_NAME} SHARED ${sources} G__${Lib_NAME}.cxx)
add_library(${Lib_NAME} SHARED ${sources} ${headers} G__${Lib_NAME}.cxx)
target_link_libraries(${Lib_NAME} ${EXTRA_EXTERNAL_LIBRARIES} ${EXTRA_INTERNAL_LIBRARIES})
#####################
......
How to create/update the database
1) dowload, in the DataBase/LevelScheme/Downloads folder (create it if not existing), the zip files (3 files) from: https://www.nndc.bnl.gov/ensarchivals/
1) download, in the DataBase/LevelScheme/Downloads folder (create it if not existing), the zip files (3 files) from: https://www.nndc.bnl.gov/ensarchivals/
ex: for the data from 01/11/2018
ex: for the data from 04/10/2019
wget https://www.nndc.bnl.gov/ensarchivals/distributions/dist18/ensdf_181101_099.zip -P Downloads/
wget https://www.nndc.bnl.gov/ensarchivals/distributions/dist18/ensdf_181101_199.zip -P Downloads/
wget https://www.nndc.bnl.gov/ensarchivals/distributions/dist18/ensdf_181101_299.zip -P Downloads/
mkdir -p $GWSYS/DataBase/LevelScheme/Downloads
cd $GWSYS/DataBase/LevelScheme/
wget https://www.nndc.bnl.gov/ensarchivals/distributions/dist19/ensdf_191004_099.zip -P Downloads/
wget https://www.nndc.bnl.gov/ensarchivals/distributions/dist19/ensdf_191004_199.zip -P Downloads/
wget https://www.nndc.bnl.gov/ensarchivals/distributions/dist19/ensdf_191004_300.zip -P Downloads/
2) execute the ExtractFiles script, giving the files to process in argument:
chmod u+w src/compile.sh
src/compile.sh
chmod u+x src/compile.sh
./src/compile.sh
./ExtractFiles Downloads/ensdf_181101_*.zip
......@@ -2,4 +2,4 @@
NAME=ExtractFiles
NAME2=src/ExtractFiles.cpp
g++ $NAME2 -o $NAME -O6 -g `root-config --cflags` `root-config --cflags --libs` -lProof
g++ $NAME2 -o $NAME -O3 -g `root-config --cflags` `root-config --cflags --libs` -lProof
......@@ -12,10 +12,6 @@ CXArrow::CXArrow(CXFit *fit, Double_t E,Double_t y1 ,Double_t y2,Float_t arrowsi
fFit = fit;
}
CXArrow::~CXArrow()
{
}
void CXArrow::SetEnergy(Float_t E)
{
SetX1(E);
......@@ -39,27 +35,27 @@ void CXArrow::RemoveArrow()
void CXArrow::RemoveFit()
{
if(fFit)
delete fFit;
delete fFit;
}
Int_t CXArrow::Compare(const TObject *obj) const
{
if(obj->InheritsFrom(CXArrow::Class())) {
CXArrow *arr = (CXArrow*)obj;
auto *arr = dynamic_cast<const CXArrow*>(obj);
return (GetEnergy() > arr->GetEnergy()) ? 1 : -1;
}
else return 0;
return 0;
}
void CXArrow::SetText(TH1 *hist, TString text, TString tooltip)
void CXArrow::SetText(TH1 *hist, const TString &text, const TString &tooltip)
{
Int_t XMinbin = hist->GetXaxis()->GetFirst();
Int_t XMaxbin = hist->GetXaxis()->GetLast();
Int_t XMin = hist->GetBinLowEdge(XMinbin);
Int_t XMax = hist->GetBinLowEdge(XMaxbin);
if(fBox) delete fBox;
delete fBox;
fBox = new CXArrowBox(this);
fBox->SetX1(fX1-(XMax-XMin)/300.);
......@@ -73,7 +69,7 @@ void CXArrow::SetText(TH1 *hist, TString text, TString tooltip)
fBox->SetLineColor(0);
fBox->SetLineStyle(3);
if(fLatex) delete fLatex;
delete fLatex;
fLatex = new TLatex(fX1,fY2,text);
fLatex->SetTextAngle(90);
fLatex->SetTextFont(132);
......
......@@ -28,7 +28,7 @@ private:
public:
CXArrow(CXFit *fit, Double_t E,Double_t y1 ,Double_t y2,Float_t arrowsize=0.05,Option_t *option=">");
~CXArrow();
~CXArrow() = default;
CXFit *GetFit(){return fFit;}
......@@ -41,7 +41,7 @@ public:
void RemoveArrow(); // *MENU*
void RemoveFit(); // *MENU*
void SetText(TH1 *hist, TString text, TString tooltip);
void SetText(TH1 *hist, const TString &text, const TString &tooltip);
void ClearPad(TVirtualPad *pad = nullptr, bool refresh = true);
......
......@@ -21,15 +21,14 @@ CXBgdUtility::CXBgdUtility(const TGCompositeFrame *MotherFrame, UInt_t w, UInt_t
fListOfButtons1D = new TList();
TGLayoutHints *GroupHints = new TGLayoutHints(kLHintsCenterY | kLHintsLeft | kLHintsExpandX, -10, -10, 0, 0);
TGLayoutHints *HFHints = new TGLayoutHints(kLHintsCenterY | kLHintsLeft,5,0,8,0);
auto *GroupHints = new TGLayoutHints(kLHintsCenterY | kLHintsLeft | kLHintsExpandX, -10, -10, 0, 0);
auto *HFHints = new TGLayoutHints(kLHintsCenterY | kLHintsLeft,5,0,8,0);
TGGroupFrame *f1DGroupFrame = new TGGroupFrame(MotherFrame, "1D background", kVerticalFrame);
auto *f1DGroupFrame = new TGGroupFrame(MotherFrame, "1D background", kVerticalFrame);
f1DGroupFrame->SetTextColor(red);
f1DGroupFrame->SetTitlePos(TGGroupFrame::kLeft); // right aligned
AddFrame(f1DGroupFrame, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandX, 0, 0, 0, 0));
//Activation du mode background supress
fGroupFrame = new TGGroupFrame(f1DGroupFrame, "Activate utility", kVerticalFrame);
......@@ -142,16 +141,15 @@ CXBgdUtility::CXBgdUtility(const TGCompositeFrame *MotherFrame, UInt_t w, UInt_t
fGroupFrame->AddFrame(fHorizontalFrame,HFHints);
fHorizontalFrame = new TGCompositeFrame(fGroupFrame, 60, 20, kHorizontalFrame);
for(int i=0 ; i<7 ; i++)
{
fSmoothingButton1D[i] = new TGRadioButton(fHorizontalFrame, Form("%d",3+2*i), i);
if(i==0) fSmoothingButton1D[i]->SetState(kButtonDown);
fSmoothingButton1D[i]->Connect("Clicked()", "CXBgdUtility", this, "HandleSmoothButtons()");
fSmoothingButton1D[i]->Connect("Clicked()","CXBgdUtility", this, "GetParams()");
if(i==0) fHorizontalFrame->AddFrame(fSmoothingButton1D[i],new TGLayoutHints(kLHintsCenterY | kLHintsLeft,20,0,0,0));
else fHorizontalFrame->AddFrame(fSmoothingButton1D[i],new TGLayoutHints(kLHintsCenterY | kLHintsLeft,5,0,0,0));
fListOfButtons1D->Add(fSmoothingButton1D[i]);
for(int i=0 ; i<7 ; i++) {
fSmoothingButton1D.at(i) = new TGRadioButton(fHorizontalFrame, Form("%d",3+2*i), i);
if(i==0) fSmoothingButton1D.at(i)->SetState(kButtonDown);
fSmoothingButton1D.at(i)->Connect("Clicked()", "CXBgdUtility", this, "HandleSmoothButtons()");
fSmoothingButton1D.at(i)->Connect("Clicked()","CXBgdUtility", this, "GetParams()");
if(i==0) fHorizontalFrame->AddFrame(fSmoothingButton1D.at(i),new TGLayoutHints(kLHintsCenterY | kLHintsLeft,20,0,0,0));
else fHorizontalFrame->AddFrame(fSmoothingButton1D.at(i),new TGLayoutHints(kLHintsCenterY | kLHintsLeft,5,0,0,0));
fListOfButtons1D->Add(fSmoothingButton1D.at(i));
}
fGroupFrame->AddFrame(fHorizontalFrame,HFHints);
......@@ -185,11 +183,11 @@ CXBgdUtility::CXBgdUtility(const TGCompositeFrame *MotherFrame, UInt_t w, UInt_t
fListOfButtons1D->Add(fSubtractButton);
SetButtonsStatus(0);
SetButtonsStatus(false);
/// Background 2D
TGGroupFrame *f2DGroupFrame = new TGGroupFrame(MotherFrame, "2D background", kVerticalFrame);
auto *f2DGroupFrame = new TGGroupFrame(MotherFrame, "2D background", kVerticalFrame);
f2DGroupFrame->SetTextColor(red);
f2DGroupFrame->SetTitlePos(TGGroupFrame::kLeft); // right aligned
AddFrame(f2DGroupFrame, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandX, 0, 0, 0, 0));
......@@ -258,10 +256,7 @@ CXBgdUtility::CXBgdUtility(const TGCompositeFrame *MotherFrame, UInt_t w, UInt_t
fGroupFrame->AddFrame(fHorizontalFrame, GroupHints);
}
CXBgdUtility::~CXBgdUtility()
{
}
CXBgdUtility::~CXBgdUtility() = default;
void CXBgdUtility::DoSubtract()
{
......@@ -275,7 +270,7 @@ void CXBgdUtility::DoSubtract()
return;
}
TH1 *bkgrd = (TH1*) gPad->GetListOfPrimitives()->FindObject(Form("%s_BG",hist->GetName()));
TH1 *bkgrd = dynamic_cast<TH1*>(gPad->GetListOfPrimitives()->FindObject(Form("%s_BG",hist->GetName())));
if(bkgrd == nullptr)
{
......@@ -305,12 +300,12 @@ void CXBgdUtility::ToggleBckSupp()
if(fActivate->GetState() == kButtonDown)
{
SetButtonsStatus(1);
SetButtonsStatus(true);
GetParams();
}
else
{
SetButtonsStatus(0);
SetButtonsStatus(false);
for(int i=gPad->GetListOfPrimitives()->GetEntries()-1 ; i>=0 ; i--)
{
......@@ -333,7 +328,7 @@ void CXBgdUtility::SetButtonsStatus(bool on)
for(int i=1 ; i<fListOfButtons1D->GetEntries() ; i++)
{
TGButton *btn = (TGButton*)fListOfButtons1D->At(i);
auto *btn = dynamic_cast<TGButton*>(fListOfButtons1D->At(i));
if(!fSmoothing && i>=8 && i<=14)
continue;
......@@ -377,7 +372,7 @@ void CXBgdUtility::GetParams()
}
if(fCompton) Option += "Compton";
TH1 *hist = (TH1F*)fMainWindow->GetHisto();
TH1 *hist = dynamic_cast<TH1F*>(fMainWindow->GetHisto());
if(hist == nullptr || hist->InheritsFrom("TH2"))
{
......@@ -385,14 +380,14 @@ void CXBgdUtility::GetParams()
return;
}
TH1D *clone = (TH1D*)hist->Clone(Form("%s_clone",hist->GetName()));
TH1D *clone = dynamic_cast<TH1D*>(hist->Clone(Form("%s_clone",hist->GetName())));
for(int i=0 ; i<clone->GetNbinsX() ; i++)
clone->SetBinContent(i+1,hist->GetBinContent(i+1));
TH1 *OldBG = (TH1*) gPad->GetListOfPrimitives()->FindObject((TString)hist->GetName() + "_BG");
if(OldBG) delete OldBG;
TH1 *OldBG = dynamic_cast<TH1*>(gPad->GetListOfPrimitives()->FindObject((TString)hist->GetName() + "_BG"));
delete OldBG;
TSpectrum *tspec = new TSpectrum;
auto *tspec = new TSpectrum;
TH1 *Backgd = tspec->Background(clone,fNumberIterations1D,Option.Data());
TString bgname = hist->GetName();
......@@ -409,7 +404,8 @@ void CXBgdUtility::GetParams()
void CXBgdUtility::HandleWindowButtons(Int_t id)
{
// Handle different buttons
TGButton *btn = (TGButton *) gTQSender;
auto *btn = static_cast<TGButton*>(gTQSender);
if (id == -1)
id = btn->WidgetId();
......@@ -439,28 +435,24 @@ void CXBgdUtility::HandleWindowButtons(Int_t id)
void CXBgdUtility::HandleFilterButtons(Int_t id)
{
// Handle different buttons
TGButton *btn = (TGButton *) gTQSender;
auto *btn = static_cast<TGButton*>(gTQSender);
if (id == -1)
id = btn->WidgetId();
if(id<4)
{
for(int i=0 ; i<4 ; i++)
{
if(id<4) {
for(int i=0 ; i<4 ; i++) {
if(id != i)
fFilterOrderButton1D[i]->SetState(kButtonUp);
fFilterOrderButton1D.at(i)->SetState(kButtonUp);
else
fFilterOrder1D = i;
}
}
if(id == 10)
{
if(id == 10) {
fFilterOrderButton2D[1]->SetState(kButtonUp);
fFilterOrder2D = TSpectrum2::kBackSuccessiveFiltering;
}
if(id == 11)
{
if(id == 11) {
fFilterOrderButton2D[0]->SetState(kButtonUp);
fFilterOrder2D = TSpectrum2::kBackOneStepFiltering;
}
......@@ -469,7 +461,7 @@ void CXBgdUtility::HandleFilterButtons(Int_t id)
void CXBgdUtility::HandleSmoothButtons(Int_t id)
{
// Handle different buttons
TGButton *btn = (TGButton *) gTQSender;
auto *btn = static_cast<TGButton*>(gTQSender);
if (id == -1)
id = btn->WidgetId();
......@@ -480,20 +472,20 @@ void CXBgdUtility::HandleSmoothButtons(Int_t id)
fSmoothing = true;
for(int i=0 ; i<7 ; i++)
{
if(fSmoothingButton1D[i]->IsDown())
if(fSmoothingButton1D.at(i)->IsDown())
{
fSmoothingButton1D[i]->SetState(kButtonDown);
fSmoothingButton1D.at(i)->SetState(kButtonDown);
fSmoothingWindow = 3+2*i;
}
else
fSmoothingButton1D[i]->SetState(kButtonUp);
fSmoothingButton1D.at(i)->SetState(kButtonUp);
}
}
else
{
fSmoothing = false;
for(int i=0 ; i<7 ; i++)
fSmoothingButton1D[i]->SetState(kButtonDisabled);
fSmoothingButton1D.at(i)->SetState(kButtonDisabled);
}
return;
}
......@@ -501,7 +493,7 @@ void CXBgdUtility::HandleSmoothButtons(Int_t id)
for(int i=0 ; i<7 ; i++)
{
if(id != i)
fSmoothingButton1D[i]->SetState(kButtonUp);
fSmoothingButton1D.at(i)->SetState(kButtonUp);
else
fSmoothingWindow = 3+2*i;
}
......@@ -537,13 +529,13 @@ void CXBgdUtility::Do2DEvaluation(TH1 *hist_in)
fCurrent2DSubtract->SetName(Form("%s_sub",fCurrent2DBackd->GetName()));
fCurrent2DSubtract->Reset();
TSpectrum2 *spectrum = new TSpectrum2;
auto *spectrum = new TSpectrum2;
Int_t nbinsx, nbinsy;
nbinsx = fCurrent2DHist->GetNbinsX();
nbinsy = fCurrent2DHist->GetNbinsY();
Double_t ** source = new Double_t*[nbinsx];
auto ** source = new Double_t*[nbinsx];
for (int i=0;i<nbinsx;i++)
source[i]=new Double_t[nbinsy];
......
......@@ -20,7 +20,7 @@ protected:
private:
CXMainWindow *fMainWindow;
CXMainWindow *fMainWindow{};
TGLabel *fLabel;
TGGroupFrame *fGroupFrame;
......@@ -44,17 +44,18 @@ private:
bool fCompton;
TGNumberEntry *fNItersButton1D;
TGNumberEntry *fNItersButton2D[2];
TGNumberEntry *fNItersButton2D[2]={};
TGRadioButton *fDirectionButton1D[2];
TGRadioButton *fFilterOrderButton1D[4];
TGRadioButton *fSmoothingButton1D[7];
TGRadioButton *fDirectionButton1D[2]={};
array<TGRadioButton*,4> fFilterOrderButton1D={};
array<TGRadioButton*,7> fSmoothingButton1D={};
TGTextButton *fSubtractButton;
TGTextButton *f2DEvalButton;
TGRadioButton *fDirectionButton2D[2];
TGRadioButton *fFilterOrderButton2D[2];
TGRadioButton *fDirectionButton2D[2]={};
TGRadioButton *fFilterOrderButton2D[2]={};
TList *fListOfButtons1D = nullptr;
......@@ -63,9 +64,9 @@ private:
TH2 *fCurrent2DBackd = nullptr;
TH2 *fCurrent2DSubtract = nullptr;
ULong_t red;
ULong_t blue;
ULong_t black;
ULong_t red={};
ULong_t blue={};
ULong_t black={};
public:
CXBgdUtility(const TGCompositeFrame *MotherFrame, UInt_t w, UInt_t h);
......
This diff is collapsed.
......@@ -50,6 +50,7 @@ protected:
TGFrame* fKeyHandler; //! handler for keys
Bool_t fFreezed;
TBox *fZoomBox;
Int_t fLastX;
Int_t fLastY;
......
......@@ -49,17 +49,17 @@ CXFileList::CXFileList(const TGCompositeFrame *MotherFrame, UInt_t w, UInt_t h)
TQObject::Connect("TGListTree", "DoubleClicked(TGListTreeItem *, Int_t)", "CXFileList", this, "DoubleClicked(TGListTreeItem *, Int_t)");
TGHSplitter *hsplitter = new TGHSplitter(fMain,2,2);
auto *hsplitter = new TGHSplitter(fMain,2,2);
hsplitter->SetFrame(fH1, kTRUE);
fMain->AddFrame(hsplitter, new TGLayoutHints(kLHintsTop | kLHintsExpandX));
fH2 = new TGHorizontalFrame(fMain, 10, 10);
fMain->AddFrame(fH2, new TGLayoutHints(kLHintsTop | kLHintsExpandX | kLHintsExpandY));
TGVerticalFrame *fv2 = new TGVerticalFrame(fH2,10,10);
auto *fv2 = new TGVerticalFrame(fH2,10,10);
fH2->AddFrame(fv2,new TGLayoutHints(kLHintsTop | kLHintsExpandX | kLHintsExpandY));
TGMenuBar* mb = new TGMenuBar(fv2,60,20,kOwnBackground);
auto* mb = new TGMenuBar(fv2,60,20,kOwnBackground);
fv2->AddFrame(mb,new TGLayoutHints(kLHintsExpandX, 1, 1, 1, 1) );
fMenu = mb->AddPopup("&View");
......@@ -69,11 +69,11 @@ CXFileList::CXFileList(const TGCompositeFrame *MotherFrame, UInt_t w, UInt_t h)
fMenu->AddEntry("&Details", kLVDetails);
fMenu->Connect("Activated(Int_t)","CXFileList",this,"DoMenu(Int_t)");
TGHorizontalFrame *h3 = new TGHorizontalFrame(fv2,10,10);
auto *h3 = new TGHorizontalFrame(fv2,10,10);
fv2->AddFrame(h3,new TGLayoutHints(kLHintsTop | kLHintsExpandX | kLHintsExpandY));
TGListView* lv = new TGListView(h3, 10 , 50);
TGLayoutHints *lo = new TGLayoutHints(kLHintsExpandX | kLHintsExpandY);
auto* lv = new TGListView(h3, 10 , 50);
auto *lo = new TGLayoutHints(kLHintsExpandX | kLHintsExpandY);
h3->AddFrame(lv,lo);
Pixel_t white;
......@@ -102,9 +102,9 @@ CXFileList::CXFileList(const TGCompositeFrame *MotherFrame, UInt_t w, UInt_t h)
DoMenu(kLVList);
}
void CXFileList::DoubleClicked(TGListTreeItem *item, Int_t a_int)
void CXFileList::DoubleClicked(TGListTreeItem *item, Int_t /*a_int*/)
{
TGListTree *sender = (TGListTree *)gTQSender;
auto *sender = static_cast<TGListTree*>(gTQSender);
const TGWindow *parent = sender->GetParent()->GetParent()->GetParent();
fRadCubeMode = false;
......@@ -112,7 +112,7 @@ void CXFileList::DoubleClicked(TGListTreeItem *item, Int_t a_int)
gSystem->ChangeDirectory(fBrowser->DirName(item));
if(parent == fBrowser){
TObject *obj = (TObject *) item->GetUserData();
auto *obj = static_cast<TObject*>(item->GetUserData());
if(obj){
obj->IsA()->SetName("");
......@@ -168,10 +168,10 @@ void CXFileList::DisplayFile(const TString &fname)
TIter next(file->GetListOfKeys());
TKey *key;
while ((key=(TKey*)next())) {
while ((key=dynamic_cast<TKey*>(next()))) {
TString cname = key->GetClassName();
TString name = key->GetName();
TGLVEntry *entry = new TGLVEntry(fContents,name,cname);
auto *entry = new TGLVEntry(fContents,name,cname);
entry->SetSubnames(key->GetTitle());
if(cname=="TList" || cname=="TDirectoryFile")
......@@ -331,12 +331,12 @@ void CXFileList::DisplayList(TList *list)
while ((key=(TObject*)next())) {
if(Folder->InheritsFrom(TDirectoryFile::Class_Name())){
key = ((TDirectoryFile*)Folder)->Get(key->GetName());
key = dynamic_cast<TDirectoryFile*>(Folder)->Get(key->GetName());
}
TString cname = key->ClassName();
TString name = key->GetName();
TGLVEntry *entry = new TGLVEntry(fContents,name,cname);
auto *entry = new TGLVEntry(fContents,name,cname);
entry->SetSubnames(key->GetTitle());
fContents->AddItem(entry);
......@@ -353,14 +353,13 @@ void CXFileList::DisplayList(TList *list)
fMain->Resize();
}
void CXFileList::DisplayObject(const TString& fname,const TString& name)
void CXFileList::DisplayObject(const TString& /*fname*/,const TString& name)
{
// Browse object located in file.
TDirectory *sav = gDirectory;
TObject* obj = nullptr;
if(fFolders.size()==0)
return;
if(fFolders.empty()) return;
TObject *CurrentFolder = fFolders.back();
......@@ -370,9 +369,9 @@ void CXFileList::DisplayObject(const TString& fname,const TString& name)
fFolders.pop_back();
}
else if(CurrentFolder->InheritsFrom(TList::Class_Name()))
obj = ((TList*)CurrentFolder)->FindObject(name);
else if(CurrentFolder->InheritsFrom(TDirectoryFile::Class_Name()))
obj = ((TDirectoryFile*)CurrentFolder)->Get(name);
obj = dynamic_cast<TList*>(CurrentFolder)->FindObject(name);
else if(CurrentFolder->InheritsFrom(TDirectoryFile::Class()))
obj = dynamic_cast<TDirectoryFile*>(CurrentFolder)->Get(name);
if(obj == nullptr){
DisplayFile(fCurrentFile->GetName());
......@@ -399,9 +398,9 @@ void CXFileList::DisplayObject(const TString& fname,const TString& name)
else if(obj->InheritsFrom(TList::Class()) || obj->InheritsFrom(TDirectoryFile::Class())){
fFolders.push_back(obj);
if(obj->InheritsFrom(TList::Class()))
DisplayList((TList*)obj);
DisplayList(dynamic_cast<TList*>(obj));
if(obj->InheritsFrom(TDirectoryFile::Class()))
DisplayList(((TDirectoryFile*)obj)->GetListOfKeys());
DisplayList(dynamic_cast<TDirectoryFile*>(obj)->GetListOfKeys());
}
}
......@@ -411,7 +410,7 @@ void CXFileList::DisplayObject(const TString& fname,const TString& name)
void CXFileList::OnClick(TGLVEntry *f, Int_t btn, Int_t x, Int_t y)
{
if (btn == kButton3) {
if(fFolders.size()) {
if(!fFolders.empty()) {
TObject *CurrentFolder = fFolders.back();
TString name(f->GetTitle());
......@@ -419,7 +418,7 @@ void CXFileList::OnClick(TGLVEntry *f, Int_t btn, Int_t x, Int_t y)
TObject* obj = nullptr;
if(CurrentFolder->InheritsFrom(TDirectoryFile::Class_Name()))
obj = ((TDirectoryFile*)CurrentFolder)->Get(name);
obj = dynamic_cast<TDirectoryFile*>(CurrentFolder)->Get(name);
else if(CurrentFolder->InheritsFrom(TList::Class_Name()))
obj = CurrentFolder->FindObject(name);
......@@ -451,7 +450,7 @@ void CXFileList::OnDoubleClick(TGLVEntry *f, Int_t btn)
gVirtualX->SetCursor(fContents->GetId(), cur);
TString name(f->GetTitle());
const char* fname = (const char*)f->GetUserData();
const char* fname = static_cast<const char*>(f->GetUserData());
if(fRadCubeMode) {
......@@ -518,8 +517,8 @@ Bool_t CXFileList::ReadConfFile()
Buffer = line;
if(Buffer.BeginsWith("#")) continue;
else if(Buffer.Copy().ReplaceAll(" ","").ReplaceAll("\t","") == "") continue;
else if(Buffer.BeginsWith("CubeFileName")){
if(Buffer.Copy().ReplaceAll(" ","").ReplaceAll("\t","") == "") continue;
if(Buffer.BeginsWith("CubeFileName")){
TObjArray *loa=Buffer.Tokenize(" ");
fCubeFileName = ((TString)loa->At(1)->GetName());
delete loa;
......
......@@ -24,7 +24,7 @@ class CXFileList : public TGVerticalFrame
protected:
CXMainWindow *fMainWindow;
CXMainWindow *fMainWindow = nullptr;
const TGCompositeFrame *fParentFrame;