I’ve been trying to learn root through the slides and content given in the documentation and now I think that downloading the latest version of root might not have been a very good idea.
That’s what I thought too when I started but apparently there have been some changes which have not followed properly in the documentation. So even copying the code given in the examples does not give the desired result.
= It majorly happens as many a times when I even copy a code, the system gives me an error. One such incident happened over the use of TGraphErrors when you define things as TGraphErrors f()… or auto *f = new TGraphErrors() … you know , the escape the scope part. Though I do not wish to go in very detail but apparently the pointer creating part does not work anymore.
If you want we are able to help you, you have to be more precise. As already said by @couet, the latest version of ROOT (6.18.04) is the best one. Once you have installed it, if some problems occur, describe precisely what you have done, and what is the error you get.
Note that auto is a great feature part of modern C++. It is available in ROOT ˆ. If you use it in ROOT 5 it will not work. Tell us which examples you copy/pasted do not work and we will fix them if needed.
I found this part of the code on the class reference page. However, on entering hs.Draw(), it produces a blank canvas. I have also tried substituting it with THnSparseD