TBranch

I cannot figure out how to create simplest Branches. Here’s what I do:

root [1] TFile *_outputFile = new TFile("./file.root", “RECREATE”);
root [2] TTree *_reducedRooTuple = new TTree(“name”, “title”, 64000000);
root [3] Double_t *_column;
root [4] _column = 1.0;
root [5] TBranch *branch1=_reducedRooTuple->Branch(“branchOne”, “Double_t”, &_column, 32000, 0)

Error in TTree::Bronch: Cannot find class:Double_t

I know it may sound silly but I can’t figure out from the manual on the web site how to do that. All the relevant examples are either missing or dealing with more complicated cases. All I need to do is create a TTree with several branches, each of them of type “float” or “double” so I could write a single value in each branch for each event. Can anyone help? Thanks.

Gennadiy.

P.S. I know there must be several fancy ways to keep this sort of data in ROOT objects, every single one of them of increasing elegance but I just need that. One TTree, several float variables for each event.

Hi,

You should follow the first example of adding a branch as described in the Users Guide.

Cheers,
Philippe.

Please do not post messages to CINT if theu have nothing to do with CINT

Rene