How to extract the data from a 2D array branch


I have been trying to get the data out of a 2D branch from a root file like so:

chain->SetBranchAddress(“branchName”, branchName);

Being branchName a 2D dynamically allocated array of type Double_t**. How would you go about passing the data of a 2D array into the variables declared in the macro using the SetBranchAddress() function?




Thank you for the response. Just to be clear based on your response what do you exactly recommend I should do? Do you mean that I should make the tree I am using a class of some sort inside my script that I can call the branches as objects?

I think I should clarify that I am using version 5.34/36 of ROOT and that the data is spread out through several root files and that is why I am using a TChain.