NumEvents() declared but not defined

Hello,

i have the following error message :
Error: NumEvents() declared but not defined invariant_mass.C:380:

when doing :

RooDataSet *reduced_dataset=(RooDataSet *)roodataset_InvariantMass->reduce(RooFit::NumEvents(3));

would you have an idea ?
(
i included :
#include “RooDataSet.h”
#include “RooGlobalFunc.h”
#include “RooCmdArg.h”
)

thanks for any advice

Bonjour Marc,

I had a quick look at the class documentation and it seems to me that what you want to use is probably:
EventRange(int lo, int hi) – Only retain events with given sequential event numbers

Regards,

– Gregory

thanks for the feedback

i confirm i wanted to use the NumEvents() implementation

As you say, one can use also the EventRange method

–>i did it and obtained the same error

But i just discovered yesterday evening how to fix it :
just taking a more recent version of root : 5.27 (instead of 5.26), and then it works

if anybody would know why it doesn’t work with 5.26, i would be interested

thanks

Hi,

The most likely issue is that the ‘right’ library was not being auto-loaded despite the #include.

Cheers,
Philippe.

thanks Philippe