Default number of entries in TTree::Draw


I have been caught off gard a few times, wasting some hours, by the default number of entries in the TTree::Draw command (1e9 entries).

Shouldn’t giving no information about how many entries to process default to all entries, not an arbitrary, not very large, integer?



I’ve never had more than a billion entries in a TTree, but indeed that looks like a terrible potential trap. I suggest that in the next version of ROOT, this default is changed to std::numeric_limits<Long64_t>::max() or “-1” which does all the entries in the TTree.