I have a .txt file like this. The format is X Y Ey. 3.txt (510 字节)
And I want to make a TGraphErrors picture. So I reference the example from the ROOTPrimer(page24)
But it doesn’t work at all. I am not familiar with CPP ,ROOT even the English. I’ve been obsessed with this problem for a long time. Thank you very very much for your kind help.
The problem is that your “3.txt” file is encoded in UTF-16 ("-dos").
You must make sure that it is encoded in iso-8859-1 / iso-latin-1, i.e. standard ASCII (and better “-unix” than “-dos”).
Thank you very much for your efficient help. I used “iconv” to solve it. It was pretty sad to find Google can not service here.
Would you please explain more about my confusions?
(1)I tried to write if (energy > 0.5),Canvas_1.pdf (14.1 KB) But the counts of zero is still very high.HistoManager.cc (6.1 KB) AnaEx02.root (475.9 KB)
(2)when I set more bins numbers, the hight of the graph becomes lower and lowerCanvas_2.pdf (14.9 KB)
Maybe the core of the problem is that I don’t understand the meaning of the bin?