I’ve not had to do this in a very long time - perhaps since ROOT v4. I need to create an event data model, want to use ROOT. It is a small experiment (really, a test stand). What are best practices?
My idea was to do what I’ve done many years ago. A big main class that holds everything else in it: it would hold things like run number, event number, lists of hits from various detectors (which are objects themselves).
But this is what I would have done in ROOT v4. Now that we are ROOT v6, I wonder if I should take another approach.
N.B. not looking for something that is 10,000 lines of code before I can store a single event - this test stand doesn’t need to have an EDM that flexible and robust!
Hi,
I think that something like Unigen package is good to start - this is quite simple structure that have event variables and arrays of tracks (instead of some “raw” tables with parameters like px,py). It’s quite easy to adapt and use.
Concernig “big main class” vs “smaller class”, I remember that in case of having multiple branches you can disable them (I’m not sure how to do this with one class in one branch). This is nice feature if you don’t have to read everything in tree (e.g. you can skip reading unused branches).