#ifndef TMHistogrammingCErrorPos_H
#define TMHistogrammingCErrorPos_H

#include "TMHistogrammingCErrorEqChoice.h"
#include "AliITSRawStreamSPDErrorLog.h"

class TH2F;
class TGraph;
struct eventHeaderStruct;

class TMHistogrammingCErrorPos : public TMHistogrammingCErrorEqChoice {

 public:
  TMHistogrammingCErrorPos();
  virtual ~TMHistogrammingCErrorPos();

  virtual void   EndEvent(AliITSRawStreamSPD *str, UInt_t globalEventNumber);
  virtual void   Draw(TPad *pad);
  virtual void   Reset();

  virtual void   SetCurrentErr(UInt_t err);
  virtual void   SetCurrentEq(UInt_t eq);

 protected:
  TH2F    *fTheHisto;
  TGraph  *fTheGraph[AliITSRawStreamSPDErrorLog::kNrErrorCodes][21];
  UInt_t fInternalEventCounter[AliITSRawStreamSPDErrorLog::kNrErrorCodes][21];
  Int_t fRangeX1[AliITSRawStreamSPDErrorLog::kNrErrorCodes][21];
  Int_t fRangeX2[AliITSRawStreamSPDErrorLog::kNrErrorCodes][21];
  Int_t fRangeY2[AliITSRawStreamSPDErrorLog::kNrErrorCodes][21];

  UInt_t fCurrentErr;
  UInt_t fCurrentEq;   // 0-19 , All Eq = 20

  virtual void CreateHistos();

};

#endif
