--- gp2root/pHeader.h 2006/04/19 23:35:58 1.1 +++ gp2root/pHeader.h 2006/10/22 08:26:54 1.2 @@ -2,12 +2,16 @@ #define PHEADER_H #include +#include #include #include "pHeaderID.h" +#include "TObject.h" using std::string; +using std::vector; +using std::map; -class pHeader { +class pHeader :public TObject { public: @@ -18,6 +22,8 @@ SetHeaderID(heaid); } + virtual ~pHeader(){}; + void SetHeader(const pHeader &ph) { SetHeader(ph); } @@ -36,22 +42,28 @@ void SetEvent(const int & x){_event=x;} void SetName(const string & x) {_name=x;} - pHeaderID* GetHitID() const { return _heaid;} - int GetType() const {return _type;} - int GetRun() const {return _run;} - int GetEvent() const {return _event;} - string GetName() const {return _name;} + pHeaderID* GetHitID() const { return _heaid;} + int GetType() const {return _type;} + int GetRun() const {return _run;} + int GetEvent() const {return _event;} + string GetHeadName() const {return _name;} + + virtual void Print() const {}; //=0; - virtual void Print() const =0; private: string _name; int _type,_run,_event; pHeaderID *_heaid; +public: + //#ifndef __GNUC__ + ClassDef(pHeader,1); + //#endif }; -typedef std::vector pHeaColl; +typedef vector pHeaColl; typedef map pHeaMap; #endif //PHEADER_H +