_ROOT Version: 5.34
_Platform: Ubuntu 18.04
Hi Root Experts,
I have a ROOT file with the 9 four-dimensional Histograms in the following hierarchy -
File(AnalysisResults.root)–>Directory(MyTask)–>TFolder(1)–> Histograms(with different names)
TFile *file = TFile::Open(“AnalysisResults.root”);
TFile *Out = TFile::Open(“NHists.root”,“RECREATE”);
TFolder * fol = (TFolder * )f->Get(“1”);
THn * hPt = (THn * )fol->FindObject(“RAAhisTPC_NcrossedRows_v_qPt_tgl_phi”);
I want to extract one of Histograms “RAAhisTPC_NcrossedRows_v_qPt_tgl_phi” and write to another file.
I am using this macro but it is crashing. Is something wrong there?