In my application I am trying to write a wrapper around TEventLists to facilitate their usage with some domain specific events and I am a bit confused about the logic of how TEventLists interact with a TTree.
Can we construct a TEventList without using TTree::Draw? For example, is it possible to write code looking like TEventList* evtlist = tree->createEventList("x<0 && y>0","name_of_the_event_list"); ?
What exactly happens when I use TTree::Draw?Is the TEventList owned by the TTree or would I need to delete it manually?
Beside TTree::Draw, a way to create the TEntryList is ‘by hand’, for example with a TSelector that does the selection and use member function of TEntryList to enter the entry information.
What exactly happens when I use TTree::Draw?Is the TEventList owned by the TTree or would I need to delete it manually?
TTree::Draw will create a TEntryList with the given name is none is found in the current (ROOT) directory. The TTree does not own the result and you ought to manager its lifetime yourself.
TTree::Draw will create a TEntryList with the given name is none is found in the current (ROOT) directory.
So what happens when the call to Draw is done in compiled code? In my case, I have a shared library that has a class that manages events and I would like to have explicit access to a TEventList, without using an interactive session.
Beside TTree::Draw, a way to create the TEntryList is ‘by hand’, for example with a TSelector that does the selection and use member function of TEntryList to enter the entry information.