I have a list of names whose number and content depend on input file, and want to add
TBranches with these names to a TTree, fill the tree in a loop, and write it the output file.
How can I fill the
address parameter when adding the branches?
I tried to declare double array or array of pointers got with
malloc to hold the addresses, but none of them work. It causes segmentation violation to build an array with vectors inside, so I cannot use the vectors.
ROOT Version: 6.18/04
Platform: Linux (NixOS 20.09 Nightingale)
Compiler: gcc (g++)