/[PAMELA software]/gp2root/pPheaMgr.cpp
ViewVC logotype

Contents of /gp2root/pPheaMgr.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (show annotations) (download) (vendor branch)
Wed Apr 19 23:35:57 2006 UTC (18 years, 7 months ago) by pamela
Branch: v1r0
CVS Tags: start
Changes since 1.1: +0 -0 lines
First release

1 #include <string>
2 #include <iostream>
3 #include "pUtils.h"
4 #include "pPheaMgr.h"
5 #include "pGenHeader.h"
6
7 #define HEADER_NAMES "general "
8 #define GENPOS 0
9
10 using std::string;
11 using std::cout;
12 using std::endl;
13 using pUtils::ToLower;
14
15 pPheaMgr * pPheaMgr::_pheamgr = 0;
16
17
18 pPheaMgr * pPheaMgr::Get(){
19 if(_pheamgr==0) {
20 _pheamgr = new pPheaMgr();
21 }
22 return _pheamgr;
23 }
24
25 pHea* pPheaMgr::GetpHea(const string &s, const char *c)
26 {
27 string temp=HEADER_NAMES;
28 string::size_type spos=temp.find(ToLower(s));
29
30 switch(spos){
31 case GENPOS:
32 return new pGenHeader(c);
33 case string::npos:
34 cout << " pPheaMgr : Header = " << s << " not found ";
35 return 0;
36 }
37 }

  ViewVC Help
Powered by ViewVC 1.1.23