In principle, I could use pointers. The only problem that I’ve seen was that uproot3 had trouble recognising a pointer to a vector, but I guess this is not a discussion for here.
However, ROOT examples deal with variability in 1D. In my case, I need sort-of 2D variability: variable number of tracks and a variable number of elements in each array of a track. Thus the approach with a separate member for each member of the track would anyway involve creating a class for each member and then the array/vector of these classes to get the “2D” variability. Am I correct?
In addition, in the examples, a simple class inherits from TObject. Is there any advantage of this inheritance in this case?