Convert histogram data to vector

Hi all,

I am wondering how I can convert a histogram that is filled with list-content to a ROOT-vector, to do specific analysis with the histogram data.
Thanks!

Hi,

may you elaborate, I don’t understand what you intend to do.

D

I filled my histogram with information from a text file.
I want to fit this histogram, but for this purpose the information should be in a double vector.

Hi,

did you fill a ROOT histogram? If yes, why not fitting it directly?
If you want to get out of the histogram the bin contents, probably you want to resort to the GetBinContent method.
Cheers,
D

The TSpectrumFit needs a ROOT-vector for fitting. thanks!