#ifndef MARS_MHThetabarTime
#define MARS_MHThetabarTime

#ifndef MARS_MH
#include "MH.h"
#endif
#ifndef ROOT_TProfile
#include "TProfile.h"
#endif
#ifndef ROOT_TH2
#include "TH2.h"
#endif

class MTime;
class MMcEvt;

class MParList;

class MHThetabarTime : public MH
{
private:
    MTime  *fTime;   //!
    MMcEvt *fMcEvt;

    TProfile   fHist;

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

    Bool_t SetupFill(const MParList *pList);
    Bool_t Fill(const MParContainer *par, Double_t w=1);

    const TProfile *GetHist() { return &fHist; }
    const TProfile *GetHist() const { return &fHist; }

    TH1 *GetHistByName(const TString name) { return &fHist; }

    void Draw(Option_t *option="");

    ClassDef(MHThetabarTime, 0) //Profile histogram Thetabar vs. time

};

#endif
