TTree::GetV1() array limits?

Hi all,

Sorry for bugging you once again. This time I have a problem with the TTree::GetV1()-method. When I do a TTree::Draw and want to get the selected values with GetV1() everything is fine as long as not more than 1e6 entries were selected. If more than 1e6 values are selected TTree::GetSelectedRows() returns the correct number but all entries in v1 beyond the index 1e6 are either equal to zero or equal to one. Attached you will find a very simple macro to illustrate this. So is this a bug or am I doing something stupid?

Thanks, Mathias
testv1.c (350 Bytes)

1 Like

add this line before tree->Draw(" "):

tree->SetEstimate(tree->GetEntries());
tree->Draw("v1", "", "goff");

and see: root.cern.ch/root/htmldoc///TTre … TTree:Draw “How to obtain more info from TTree::Draw”

Jan

1 Like

Thanks for the quick answer, works perfectly :slight_smile:

To avoid all problems, it has to be:

tree->SetEstimate(tree->GetEntries() + 1);

Or, that is the same:

tree->SetEstimate(-1);