Hello,
I was expecting these two scenarios to produce the same results. Am I wrong, or doing something wrong? Using 5.28 on a Snow Leopard. Thanks so much for any help.
1:
TFile f;
if(condition)
{
f.Open(filename);
TH1F *H = (TH1F*)f.Get(title); << apparently opens file but...
f.ls(); << looks like file is empty
H->GetBinContent(1); << crashes
title->GetBinContent(1); << this works! But for "dynamic" titles I can't use this.
}
2:
if(condition)
{
TFile f(filename);
TH1F *H = (TH1F*)f.Get(title); << apparently opens file and...
f.ls(); << file shows content now
H->GetBinContent(1); << works
}