Testing RooStudyManager

Dear RooFit experts,

I’m trying to use the RooStudyManager to confirm the results of a toy study that was performed without using RooMCStudy or RooStudyManager.

First of all I wanted to test the following short code fragment I found in the Release Notes of Root Version 5.26/00.

  // Create workspace with p.d.f
  RooWorkspace* ww = new RooWorkspace("ww") ;
  ww->factory("Gaussian::g(x[-10,10],mean[-10,10],sigma[3,0.1,10])") ;

  RooGenFitStudy gfs ;
  gfs.setGenConfig("g","x",NumEvents(1000)) ;
  gfs.setFitConfig("g","x",PrintLevel(-1)) ;

  RooStudyManager mgr(*ww,gfs) ;

  mgr.run(1000) ; // execute 1000 toys inline
  mgr.runProof(10000,"") ; // execute 10000 toys through PROOF-lite

  gfs.summaryData()->Print() ;

My Compiler states the following: cannot declare variable ‘gfs’ to be of abstract type ‘RooGenFitStudy’
I’m using Root 5.30/04.

Can anybody give me a small working example for the use of RooStudyManager/RooGenFitStudy?

Thank you very much for your help!