I have a root file with histos within a list in a folder. How I access the histos?
code:
TString AnaFile = “AnalysisResults_BasicCuts.root”;
TFile* HistosFile = new TFile(AnaFile.Data(), “READ”);
HistosFile->cd(“MyTask”);
TH1F* hmass0= (TH1F*) HistosFile->Get(“MyOutputContainer::fHistJPsiInvMass”);
hmass0->Draw();
/endcode
error message:
Error: illegal pointer to class object hmass0 0x0 204 AnalysePlots.C:16:
I know that syntax “MyOutputContainer::fHistJPsiInvMass” (TList::HistName) is wrong. What is right?
ROOT Version: Not Provided Platform: Not Provided Compiler: Not Provided