I’ve encountered the following problem:
I open a file, read a tree out of it (tree = (TTree *) gROOT->FindObject(“h1000”)). In a function I create a histogram *hist(“Muon2”, …). I project some data off the tree unto the histogram and close the hist. Outside of the function I close the file, then open a new one and repeat the process. However, the second time I get this:
Error in TSelectorDraw::Begin: An object of type ‘TH1F’ has the same name as the requested event list (Muon2)
Why is that and how do I fix it?