Hello,
I am filling a TClonesArray with the following class:
[code]class GeneratedParticle : public TObject {
private:
std::vector m_children;
public:
void set_children(std::vector source) { m_children = source; }
std::vector children() { return m_children; }
// …
void Clear() { m_children.clear(); }
};[/code]
and I (seemingly) properly fill it in a loop, where I call
The object seems to be defined right, since if - after filling the class - I dump the content of the vector returned by a call to children(), the content is reasonable. Actually even if I open the resulting TTree with StartViewer, I can plot the m_children datamember… but if I try and loop over the clonesarray from within a g++ compiled code, the array returned by children() is ALWAYS empty!
Any hints? Should it help, I’m working with ROOT 5.28.