#include <string>
#include <iostream>
#include "pPhitMgr.h"
#include "pCalHit.h"
#include "pTofHit.h"
#include "pCasHit.h"
#include "pCatHit.h"

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

pPhitMgr * pPhitMgr::_phitmgr = 0;


pPhitMgr * pPhitMgr::Get(){
  if(_phitmgr==0) {
    _phitmgr = new pPhitMgr();
  }
  return _phitmgr;
}

pHit* pPhitMgr::GetpHit(const string &s, const char *c)
{
  if(s=="CAT") return new pCatHit(c);
  if(s=="CAL") return new pCalHit(c);
  if(s=="TOF") return new pTofHit(c);
  if(s=="CAS") return new pCasHit(c);
}
