I am doing some plotting of ROOT histograms using rootpy and have run in to a bit of a strange problem. I get a ROOT histogram using:
Histo1 = FilePure.Get(HistoName + str("incl") + str(0))
Where Histoname is the name of the thing I need to. I then want to make two other histograms from this one related to (error values) so I 'Clone' Histo1 twice like so:
HistoMin = Histo1.Clone(); HistoMax = Histo1.Clone();
Now when I perform an operation on the original Histo1 object (in my case I am rescaling every bin by a constant factor) and then print the values of all 3 histograms the values in Histo1 AND HistoMin have changed but HistoMax has not! I'm very confused byt this so any help would be appreciated! Cheers, Jack
P.s. for non ROOT/rootpy users who nevertheless know a lot about python/OO in general here is a link to the doc. for 'Clone()': http://root.cern.ch/root/html/TNamed.html#TNamed:Clone