Update root version

Hi, Is there any updated root version?

Hi,

try the following:

  1. change the line
TFile *histograms = new TFile("histograms.root", "read");

to

std::unique_ptr<TFile> histograms{TFile::Open("histograms.root", "READ")};
  1. Add the following right after that line:
if (!histograms || histograms->IsZombie())
{
    printf("ERROR: cannot open input file\n");
    return 1;
}
  1. After the line starting with
TTree *t1 = 

add the following:

if (!t1)
{
    printf("ERROR: cannot find TTree with the given name inside the input file\n");
    return 1;
}

Thank you!

You seem to have changed both the topic subject and your original question. This discussion will not make any sense to anybody else. Anyway, could you please elaborate on your new question:

Which one do you use? Why would you need an updated version? All the versions are listed here:

Yes it s a bit hard to follow :frowning:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.