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

Annotation of /gp2root/pPheaMgr.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations) (download)
Sun Oct 22 08:27:01 2006 UTC (18 years, 1 month ago) by cafagna
Branch: MAIN
CVS Tags: v0r9, v0r10, HEAD
Changes since 1.1: +6 -1 lines
Stable version, lot of changes, ROOT support included, persistency not yet activated

1 pamela 1.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 cafagna 1.2 pHeader* pPheaMgr::GetpHea(const string &s, const char *c)
26 pamela 1.1 {
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 cafagna 1.2 default:
37     cout << " pPheaMgr : Header = " << s << " not found ";
38     return 0;
39 pamela 1.1 }
40     }
41 cafagna 1.2
42    

  ViewVC Help
Powered by ViewVC 1.1.23