/[PAMELA software]/gp2root/pHeader.h
ViewVC logotype

Contents of /gp2root/pHeader.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Sun Oct 22 08:26:54 2006 UTC (18 years, 1 month ago) by cafagna
Branch: MAIN
CVS Tags: v0r9, v0r10, HEAD
Changes since 1.1: +20 -8 lines
File MIME type: text/plain
Stable version, lot of changes, ROOT support included, persistency not yet activated

1 #ifndef PHEADER_H
2 #define PHEADER_H
3
4 #include <vector>
5 #include <map>
6 #include <string>
7 #include "pHeaderID.h"
8 #include "TObject.h"
9
10 using std::string;
11 using std::vector;
12 using std::map;
13
14 class pHeader :public TObject {
15
16 public:
17
18 pHeader( const string &name="", const int & type=0, const int &run=0,
19 const int & event=0, pHeaderID *heaid=0):
20 _name(name), _type(type), _run(run), _event(event)
21 {
22 SetHeaderID(heaid);
23 }
24
25 virtual ~pHeader(){};
26
27 void SetHeader(const pHeader &ph) {
28 SetHeader(ph);
29 }
30
31 void SetHeader(const pHeader *ph) {
32 SetHeaderID(ph->GetHitID());
33 SetType(ph->_type);
34 SetRun(ph->_run);
35 SetEvent(ph->_event);
36 SetName(ph->_name);
37 }
38
39 void SetHeaderID(pHeaderID * heaid){_heaid=heaid;}
40 void SetType(const int & x){_type=x;}
41 void SetRun(const int & x){_run=x;}
42 void SetEvent(const int & x){_event=x;}
43 void SetName(const string & x) {_name=x;}
44
45 pHeaderID* GetHitID() const { return _heaid;}
46 int GetType() const {return _type;}
47 int GetRun() const {return _run;}
48 int GetEvent() const {return _event;}
49 string GetHeadName() const {return _name;}
50
51 virtual void Print() const {}; //=0;
52
53
54 private:
55 string _name;
56 int _type,_run,_event;
57 pHeaderID *_heaid;
58
59 public:
60 //#ifndef __GNUC__
61 ClassDef(pHeader,1);
62 //#endif
63 };
64
65 typedef vector<pHeader*> pHeaColl;
66 typedef map<string,pHeader*> pHeaMap;
67
68 #endif //PHEADER_H
69

  ViewVC Help
Powered by ViewVC 1.1.23