Histogram from a text file

I have used the TGraph to plot data from text file. Is it possible to have widths of the distribution, beacuse when I use Tgraph it shows 0 for all the legends.

When I use TTree also I have the legends of the histogram 0. So how to obtain the std deviation of the plotted distribution.

What I have in my text file is the Mass and the number of the counts, which I want to plot as a 1D Histogram, and need to have its width.

Could someone suggest me some ways to do this ?