#ifndef PCALHIT_H
#define PCALHIT_H
#include <iostream>
#include "pHit.h"
#include "pCalID.h"

using std::cout; 
using std::endl;

class pCalHit: public pHit {

public:

  pCalHit(){};
  pCalHit(const char *c){
      int *temp = (int*) c;
      SetHitID( new pCalID(c));
      temp++;
      temp++;
      temp++;
      SetXin(*((float*)temp) );
      temp++;
      SetYin(*((float*)temp) );
      temp++;
      SetZin(*((float*)temp) );
      temp++;
      SetErel( *((float*)temp) );
  }


  void Print() const {
    cout <<  "pCalHit : " << endl; 
    GetHitID()->Print() ;
    cout <<  "          xin,yin,zin = " 
	 << GetXin() <<", "
	 << GetYin() <<", "
	 << GetZin() << endl;
    cout <<  "          erel= " 
	 << GetErel() <<endl;

  }

private:  

};

#endif //PCALHIT_H
