I’m trying to find a solution for structured data in a TTree which doesn’t involve TStreamerInfo (we exclude ClassDef from our code for Reasons).
Our simulation framework supports a varying number of detectors at runtime, each with its own (possibly different) number of channels. I’d like to store and access info with “nested” variable length arrays, along the lines of:
struct DetSum {
int detID;
int nchan;
double E[MAXCHAN];
};
int ndet;
DetSum detinfo[MAXDET];
summary->Branch("ndet", &ndet, "ndet/I");
summary->Branch("Det[ndet].", detinfo, "id/I:nchan/I:E[nchan]/D");
Is this sort of construction allowed? Searching the documentation (for subbrach, split, etc.) was not successful.