Reading a root file

Dear all,

I would like to read a root file in my analysis. Basically I want, in each event, read the content of a bin of one of the histograms. So far what I am doing is:

Open the file and read all the histograms that I need in Begin() but when access the contents of the bins in Process() is giving me a segmentation fault, so I was wondering if this is the correct way to do it.

Thanks in advance

Esteban

Hi,

You should open the file and load the histogram in SlaveBegin().
Remember to not close the file while you are using the histogram (unless you made a clone); the best is to close it in SlaveTerminate.

Anyhow, if you do not manage, post an example of code.

G. Ganis