Hello!
I have .root file with canvases.
All canvases have the same name “c”.
How to choose one of them?
KEY: TCanvas c;10 c
KEY: TCanvas c;9 c
KEY: TCanvas c;8 c
KEY: TCanvas c;7 c
KEY: TCanvas c;6 c
KEY: TCanvas c;5 c
KEY: TCanvas c;4 c
KEY: TCanvas c;3 c
KEY: TCanvas c;2 c
KEY: TCanvas c;1 c
This code works if I have one canvas only
TFile file("path_to_file/file.root", "READ");
TCanvas* canv = 0;
file.GetObject("c", canv);
file.Close();
TPad *pad_cd = (TPad*)canv->GetListOfPrimitives()->FindObject("c");
This do not work too
TPad *pad_cd = (TPad*)canv->GetListOfPrimitives()->FindObject("c;1");
I searched, but did not find the answer.
Could you help and show example of code?
Thank you in advance.
Best regards, Vladislav.