#ifndef TMHistogrammingPixelMultiplicity_H
#define TMHistogrammingPixelMultiplicity_H

#include "TMHistogrammingCheckButton.h"

class TH2F;
class TGraph;
struct eventHeaderStruct;

class TMHistogrammingPixelMultiplicity : public TMHistogrammingCheckButton {
 public:
  TMHistogrammingPixelMultiplicity();
  virtual ~TMHistogrammingPixelMultiplicity();
  
  virtual void ProcessEvent(eventHeaderStruct *event);
  virtual void ProcessPixel(UInt_t eq, UInt_t hs, UInt_t chip, UInt_t col, UInt_t row);
  virtual void EndEvent(AliITSRawStreamSPD *str, UInt_t globalEventNumber);

  virtual void Draw(TPad *pad);
  virtual void Reset();

 protected:

  TH2F   *fTheHisto;

  TGraph *fTotal;
  TGraph *fInner;
  TGraph *fOuter;

  UInt_t fTotalHits;
  UInt_t fInnerHits;
  UInt_t fOuterHits;

  UInt_t fInternalEventCounter;

  Int_t fRangeX1;
  Int_t fRangeX2;
  Int_t fRangeY2;

  ULong_t fTimeStamp;

  virtual void CreateHistos();

};

#endif
