#ifndef ROO_SIM_GEN_CONTEXT
#define ROO_SIM_GEN_CONTEXT
#include "TList.h"
#include "RooAbsGenContext.h"
#include "RooArgSet.h"
#include <vector>
class RooSimultaneous;
class RooDataSet;
class RooAbsCategoryLValue ;
class RooSimGenContext : public RooAbsGenContext {
public:
RooSimGenContext(const RooSimultaneous &model, const RooArgSet &vars, const RooDataSet *prototype= 0,
const RooArgSet* auxProto=0, Bool_t _verbose= kFALSE);
virtual ~RooSimGenContext();
virtual void setProtoDataOrder(Int_t* lut) ;
virtual void attach(const RooArgSet& params) ;
virtual void printMultiline(std::ostream &os, Int_t content, Bool_t verbose=kFALSE, TString indent="") const ;
protected:
virtual void initGenerator(const RooArgSet &theEvent);
virtual void generateEvent(RooArgSet &theEvent, Int_t remaining);
RooDataSet* createDataSet(const char* name, const char* title, const RooArgSet& obs) ;
void updateFractions() ;
RooSimGenContext(const RooSimGenContext& other) ;
RooAbsCategoryLValue* _idxCat ;
RooArgSet* _idxCatSet ;
const RooDataSet *_prototype;
const RooSimultaneous *_pdf ;
std::vector<RooAbsGenContext*> _gcList ;
std::vector<int> _gcIndex ;
Bool_t _haveIdxProto ;
TString _idxCatName ;
Int_t _numPdf ;
Double_t* _fracThresh ;
RooDataSet* _protoData ;
RooArgSet _allVarsPdf ;
TIterator* _proxyIter ;
ClassDef(RooSimGenContext,0)
};
#endif