New way to do 'numEntries(KTRUE)"

I’m resurrecting some old code. I used to be able to do something like:

int nBGEventsnotweighted = dxAllBG.numEntries();
int nBGEvents = dxAllBG.numEntries(kTRUE);
cout << "N(background): " << nBGEvents << endl;
cout << "N(background)(weighted): " << nBGEventsnotweighted << endl;

using kTRUE to get the number of weighted events, however this method is now unavailable in modern versions of root. I thought I’ve converted this to the new way doing things before, but I can’t remember how (or find my file).

How is this now done?

Hi,

What is the type of the variable ‘dxAllBG’ ?

Philippe.

Sorry,

It’s a RooDataSet.

RooDataSet *dxAllBG = new RooDataSet(“dxAllBG”, “dxAllBG”, lsBase, “newweight”);

Hi,

It was renamed sumEntries.

Cheers,
Philippe.