I’d like to propose the following change.
Instead of:
if (n <= 0) {
n = 10000;
}
put:
if (n == 0) {
n = 10000;
} else if (n < 0) {
n = fEntries - n; // n = fEntries + llabs(n);
}
Then calling “MyTree->SetEstimate(-1);” would simply mean “MyTree->SetEstimate(MyTree->GetEntries() + 1);”, which is a typical case (at least for me).