| 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 |  |