TNtuple->GetEntries() with selection?

Dear rooters,

I only need to GetEntries of a ntuple with some selection.

I can do this via


TNtuple *ntuple;
int n;

ntuple->Draw(“x>>h”,“x>cut”);
n = h->GetEntries();

but if there is some way like this
int n = ntuple->GetEntries(“x>cut”);
it would be much convenient for me especially when I change cut frequently.

Hi,

do n = ntuple->Draw(0,“x>cut”);

Cheers, Axel.

Hi,

int n = ntuple->GetEntries("x>cut");This exact syntax was introduced in v5.14 (about 3 years ago).

Cheers,
Philippe.

Thanks a lot, Axel & Philippe:)

P.S: I did not use root regularly for nearly 3 years:)