and get the output “0” - st is a null pointer, apparently the objects “stats” does not exist. Accessing st then obviously leads to segmentation faults…
Any solutions? Or maybe a simpler way to access the stats, e.g. something of the kind
h->GetStatsBox()->SetTextColor(2);
(What I want is to change position, and to change color of line and text).
Thanks for your reply - however, it does not solve my problem. As mentioned it works perfectly well for pointers at histograms, but for some reason it does not with the iterators over a TH1D std::list , as given in the example in my previous post.
Unfortunately I can’t provide a simple macro to reproduce the problem, somehow root crashes whenever I just declare a std::list<TH1*> object (works fine for compiled code, though).