From plotting to Ntuples

Hi,

I have a plotting script which make and fills TH1’s, and I want to change the TH1’s to Ntuples, so I can analyse the data easily, Is there a straight forward way to link the TH1’s to a TTree?

Or are there any more efficient ways to tackle this problem?

Thanks!

There is no direct “conversion” from a histograms oriented data store to a ntuple one. You need to define the variables you are looking for, create the corresponding ntuple, fill it and then you will be able to create histograms from it.

Hi Couet,

I’m not looking to convert a TH1’s to ntuples, I want to change the script to store ntuples instead of TH1’s, and I was wondering how you do that?

Thanks!

Yes that’s what I explained:

You need to define the variables you are looking for, create the corresponding ntuple, fill it and then you will be able to create histograms from it.

look at:

https://root.cern/doc/master/classTNtuple.html#af45dbed82038acc4acb1629cca37e7ab

and

$ROOTSYS/tutorials/hsimple.C

Otto