The future of TRef

I’m designing the data structures for a detector simulation. I was thinking of using TRef to link, for example, simulated track information to simulated energy deposits. TRef only works for objects that inherit from TObject, which does not bother me, but I see that ROOT is undertaking a gradual transition from TTrees to RNtuple. in recent years ROOT has evolved to the point where objects stored in a TTree don’t have to inherit from TObject.

Is TRef part of the future of ROOT? Or is that being phased out as part of the shift to RNtuple? Is there a recommendation for a replacement?

The anticipated lifetime of this particular experiment is 10-15 years. I don’t want to design something with built-in obsolescence.

Many thanks for reaching out to us!

It is true that TRef is marked as one of the features that are not going to be ported as-is to RNTuple. This was decided at a workshop at the end of last year held together with large experiment users.

We do realize that references between objects of an event are common, and we plan to add support for a new reference type in RNTuple. This will, however, not become part of the initial release (i.e. likely not within the next year). For the moment, RNTuple users would need to reference objects manually, e.g. using integer fields.

That said, we’d be happy to discuss your EDM wrt. RNTuple! Either here or in person / in a Zoom call.

Thanks for the response!

RNtuple is, I think, still too experimental for my users. I think I’ll stick with C++ structures as branches within a TTree, and follow your suggestion of creating integer “pointers” from one structure to another.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.