#ifndef MARS_MRanForestGrow
#define MARS_MRanForestGrow

#ifndef MARS_MRead
#include "MRead.h"
#endif

class MHMatrix;
class MParList;
class MRanForest;
class MRanTree;

class MRanForestGrow : public MRead
{
private:
    MRanTree   *fRanTree;
    MRanForest *fRanForest;
    MHMatrix   *fMGammas;   //! Gammas describing matrix
    MHMatrix   *fMHadrons;  //! Hadrons (non gammas) describing matrix

    Int_t fNumTrees;
    Int_t fNumTry;
    Int_t fNdSize;

    Int_t PreProcess(MParList *pList);
    Int_t Process();
    Int_t PostProcess();

    UInt_t  GetEntries()            { return fNumTrees; }
    TString GetFileName() const     { return "MRanForestGrow"; }
    TString GetFullFileName() const { return "MRanForestGrow"; }

public:
    MRanForestGrow(const char *name=NULL, const char *title=NULL);

    void SetNumTrees(Int_t n=-1) { fNumTrees=n>0?n:100; }
    void SetNumTry(Int_t   n=-1) { fNumTry  =n>0?n:  3; }
    void SetNdSize(Int_t   n=-1) { fNdSize  =n>0?n:  1; }

    ClassDef(MRanForestGrow, 0) // Task to grow a random forest
};

#endif

