SetMakeClass problem

Hello!

My problem is this - I want to use the MakeClass functions to make the header file . for your convinience, I attach an example of my root file that I want to make analysis on

The problem is, that when I type

# TFile* f = TFile::Open("MacroTreeOutput.root");
# [root] TTree* t = (TTree*) f->Get("EventTree"); 
# [root] t->MakeClass("myAnalysis");

it just produces the attached .h file which actually gives access to the Branches but only to these. My point, it that I also want to inlcude the leafs as Pt(), M(), etc which are members of TLorentzVector object . Is this posible, ie to MakeClass and produce a .h file with all of the objects of this .root file?

Thanks in advance!

Best, Alexis
MacroTreeOutput.root (16.4 KB)
analysis.h (14.1 KB)

[quote]Is this posible, ie to MakeClass and produce a .h file with all of the objects of this .root file? [/quote]Not really. MakeClass (via the call to SetMakeClass(1)) explicit request to not load object (instead it load only floats, ints, etc.).

To access the object, you will need to either hand craft the SetBranchAddress (i.e. replace the int/float data member with objects and change the calls to SetBranchAddress) or use MakeProxy instead.

Cheers,
Philippe.