but if i want to access only a specific entry say entry no. 10.
then also do i have to traverse using Next() function ? or is there
any way to access the required entry directly,
may be something like
…and since we are here, here is how you do it with TDataFrame (complete working code)
#include "ROOT/TDataFrame.hxx"
ROOT::Experimental::TDataFrame d("MYTree", "hello.root");
auto vecTrack = d.Range(10,11).Take<Track>("Track");
// vecTrack has size 1 and vecTrack[0] is your 10th entry :)
As enrico says.
A thing I’d like to note is that the number of lines needed to get out your track from the entire dataset with TDataFrame is 2 against the 5 of the other two cases.