I would like to understand some of ROOTs internal code (trying to debug our TTree usage).
I think, the TTree::SetBranchAddress(name, T*) overload will finally call this code:
Int_t TTree::SetBranchAddress(const char* bname, void* addr, TBranch** ptr, TClass* ptrClass, EDataType datatype, Bool_t isptr)
{
…
Int_t res = CheckBranchAddressType(branch, ptrClass, datatype, isptr);
…
SetBranchAddressImp(branch,addr,ptr);
I think, it will be called with isptr=false.
I think, that isptr will be true for the T** interface. So this actually makes a difference.
All that said, I wonder why isptr is only passed to CheckBranchAddressType but not to SetBranchAddressImp?
And SetBranchAddressImp doesn’t look to me like it magically knows the difference.
Can someone please help me understand this code?
ROOT Version: Current master tree as on Github.
P.S.: I would have posted proper links to github, but it looks like new users can’t post any links.