Dear ROOTers,
I’ve searched a lot for a solution, but I’ve found nothing!
I’ve created some classes which inherit from TObject:
[code]class MyTrack : public TObject {
…
vector coordinate;
…
};
class MyDetector : public TObject {
…
vector tracks;
…
};
class MyEvent : public TObject {
…
vector info;
vector detectors;
…
};[/code]
All classes do perfectly work inside ROOT.
My problem is that when I store a MyEvent class in a TTree, I can’t use the Draw method to Draw all the coordinates:
returns:
Warning in <TTreeFormula::DefinedVariable>: TTreeFormula support only 2 level of variables size collections. Assuming '@' notation for the collection coordinate.
Error in <TTreeFormula::DefinedVariable>: coordinate is not a datamember of vector<MyTrack>
Error in <TTreeFormula::Compile>: Bad numerical expression : "MyEvent.detectors.tracks.coordinate"
I don’t want ROOT to assume “’@’ notation for the collection coordinate”!
How can I create a TTree without loseing the Draw functionality?
Is it the only chance to create an entry for each coordinate?
Thanks a lot to everyone!
Nicola