“wr_t” and “trace” are members of my own class, HitData, but I want to assume someone can read this tree without need of my software.
On an event-by-event analysis, for every event, there is actually a vector of this HitData class item.
I can access wr_t with: TTreeReaderArray<Long64_t> wr(reader, “HitData.wr_t”);
I try to access trace with: TTreeReaderArray<std::vector<Float_t>> trace(reader, “HitData.trace”);
When looping through the tree, if I print trace.GetSize(); this returns the correct value - the number of HitData items in the event. If I print trace[i].size(), this size is completely incorrect. It seems as if a completely random (large) value is printed.
Am I doing something incorrectly?
To be clear - if I source my software, then I can use TTreeReaderArray hit(reader, “HitData”); and then loop through “hit” on each event, and make use of the Getter methods in my software. But I don’t want to assume that someone will source this software.
In this example the principle is as i described although some names changed; the tree is “evt”, the branches are part of a class “LisaCalData”, and I cannot extract trace_febex properly.
I used a macro pretty much identical to my earlier reply to try to generate the “project”.