Extracting data from TNtuple

I am working with text files that have 37 columns and a few thousand lines. I am trying to extract individual rows of data based on the third or fourth column’s value. Right now I am putting the data into a TNtuple and trying to manage it from there, but I am struggling to extract data from individual rows within columns. The closest that I have come to my objective is using TNtuple.GetBranch(“dx”) and that returns just the dx column, but then I am still struggling to extract individual entries from that column.

How do I extract individual columns from a TNtuple and individual rows from the columns that I extracted?

Hi,

It depends what you want to do with it :slight_smile:. See the User’s Guide chapter on TTree for some of the options. One of the simplest is to use the result of TTree::MakeClass or TTree::MakeSelector.

Cheers,
Philippe.