Run time bug in SetBranchAddress

With the following snippet of code (both in the case of a macro or a compiled C++ code):

ROOT::Math::LorentzVector<ROOT::Math::PtEtaPhiM4D<Double32_t>> *p4_tau;

I get a run-time error which reads:

[quote]Error in TTree::SetBranchAddress: The pointer type given (ROOT::Math::LorentzVector<ROOT::Math::PtEtaPhiM4D >) does not correspond to the class needed (ROOT::Math::LorentzVector<ROOT::Math::PtEtaPhiM4D<Double32_t> >) by the branch: p4_2

I tried to substiture Double32_t with double, but to no avail.

I’m running on Lxplus with ROOT v6.06/01.
Any comment?

Thanks for any help

Try: TT_tree->Print();

Note: you must initialize the pointer, so either “… *p4_tau = 0;” or “… *p4_tau = new …;”.

Hi Pepe,

with the Print() command I get a pretty long output (it’s a big ttree!), but I guess the interesting part is:

Also, I already tried to intialize the pointer ("…*p4_tau = 0;"), but I get the same error as before in SetBranchAddress.