#ifndef MARS_MMatrixLoop
#define MARS_MMatrixLoop

#ifndef MARS_MTask
#include "MTask.h"
#endif

class MHMatrix;

class MMatrixLoop : public MTask
{
private:
    static const TString gsDefName;
    static const TString gsDefTitle;

protected:
    MHMatrix *fMatrix;
    Int_t     fNumRow;    //! Number of dimensions of histogram

public:
    MMatrixLoop(MHMatrix *mat, const char *name=NULL, const char *title=NULL);

    Bool_t PreProcess(MParList *plist)
    {
        fNumRow = 0;

        return fMatrix ? kTRUE : kFALSE;
    }

    Bool_t Process();

    ClassDef(MMatrixLoop, 0)
};

#endif
