I load a file with TFile, and fill a histogram hist0,e.g.
TFile _file0=TFile::Open("file0.root") tree->Draw("h>>hist0");
Then I open another file with TFile, and do the same, creating a 2nd histogram, hist1:
TFile _file1=TFile::Open("file1.root") tree->Draw("h>>hist1");
Sure enough I can’t access hist0 anymore - it’s in a different directory. Is there an easy way to move it from _file0 directory to _file1? My final goal – I want to be able to operate on hist0 and hist1 simultaneously.
p.s. please do not propose to create a TH1F pointer in _file0 and set it to hist0…yes I know I can do that, but it’s inelegant and annoying.