So I have the following macro where I am practicing how to use TTree class for an array of variable size. When I run the macro in the root terminal, there is no error or anything and it loads perfectly. However, when I try t->Scan() on the root terminal, it gives me the following output, and it has clearly no information regarding the array elements that I fed in the macro. Can someone help me understand what is going on and how to solve the issue?
Also, interestingly, if I comment out the saving to a root file, part, it gives me following:
which is fine, but the problem is it is exiting root completely.
introttree3.cpp (1.3 KB)
Any help would be appreciated.
ROOT Version: 5.18/34
Platform: Ubuntu 18.04
Compiler: Not Provided