#ifndef ROO_FOAM_GENERATOR
#define ROO_FOAM_GENERATOR
#include "RooAbsNumGenerator.h"
#include "RooPrintable.h"
#include "RooArgSet.h"
class RooAbsReal;
class RooRealVar;
class RooDataSet;
class TFoam ;
class RooTFoamBinding ;
class RooNumGenFactory ;
class RooFoamGenerator : public RooAbsNumGenerator {
public:
RooFoamGenerator() : _binding(0), _tfoam(0), _xmin(0), _range(0), _vec(0), _rvIter(0) {} ;
RooFoamGenerator(const RooAbsReal &func, const RooArgSet &genVars, const RooNumGenConfig& config, Bool_t verbose=kFALSE, const RooAbsReal* maxFuncVal=0);
RooAbsNumGenerator* clone(const RooAbsReal& func, const RooArgSet& genVars, const RooArgSet& ,
const RooNumGenConfig& config, Bool_t verbose=kFALSE, const RooAbsReal* maxFuncVal=0) const {
return new RooFoamGenerator(func,genVars,config,verbose,maxFuncVal) ;
}
virtual ~RooFoamGenerator();
const RooArgSet *generateEvent(UInt_t remaining, Double_t& resampleRatio);
TFoam& engine() { return *_tfoam; }
virtual Bool_t canSampleConditional() const { return kFALSE ; }
virtual Bool_t canSampleCategories() const { return kFALSE ; }
protected:
friend class RooNumGenFactory ;
static void registerSampler(RooNumGenFactory& fact) ;
RooTFoamBinding* _binding ;
TFoam* _tfoam ;
Double_t* _xmin ;
Double_t* _range ;
Double_t* _vec ;
TIterator* _rvIter ;
ClassDef(RooFoamGenerator,0)
};
#endif