1 |
pamela |
1.1 |
#include <string> |
2 |
|
|
#include <iostream> |
3 |
|
|
#include "pPhitMgr.h" |
4 |
|
|
#include "pCalHit.h" |
5 |
|
|
#include "pTofHit.h" |
6 |
|
|
#include "pCasHit.h" |
7 |
|
|
#include "pCatHit.h" |
8 |
|
|
|
9 |
|
|
using std::string; |
10 |
|
|
using std::cout; |
11 |
|
|
using std::endl; |
12 |
|
|
|
13 |
|
|
pPhitMgr * pPhitMgr::_phitmgr = 0; |
14 |
|
|
|
15 |
|
|
|
16 |
|
|
pPhitMgr * pPhitMgr::Get(){ |
17 |
|
|
if(_phitmgr==0) { |
18 |
|
|
_phitmgr = new pPhitMgr(); |
19 |
|
|
} |
20 |
|
|
return _phitmgr; |
21 |
|
|
} |
22 |
|
|
|
23 |
|
|
pHit* pPhitMgr::GetpHit(const string &s, const char *c) |
24 |
|
|
{ |
25 |
|
|
if(s=="CAT") return new pCatHit(c); |
26 |
|
|
if(s=="CAL") return new pCalHit(c); |
27 |
|
|
if(s=="TOF") return new pTofHit(c); |
28 |
|
|
if(s=="CAS") return new pCasHit(c); |
29 |
|
|
} |