| 1 |
pamela |
1.1 |
#ifndef PHEADER_H |
| 2 |
|
|
#define PHEADER_H |
| 3 |
|
|
|
| 4 |
|
|
#include <vector> |
| 5 |
cafagna |
1.2 |
#include <map> |
| 6 |
pamela |
1.1 |
#include <string> |
| 7 |
|
|
#include "pHeaderID.h" |
| 8 |
cafagna |
1.2 |
#include "TObject.h" |
| 9 |
pamela |
1.1 |
|
| 10 |
|
|
using std::string; |
| 11 |
cafagna |
1.2 |
using std::vector; |
| 12 |
|
|
using std::map; |
| 13 |
pamela |
1.1 |
|
| 14 |
cafagna |
1.2 |
class pHeader :public TObject { |
| 15 |
pamela |
1.1 |
|
| 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 |
cafagna |
1.2 |
virtual ~pHeader(){}; |
| 26 |
|
|
|
| 27 |
pamela |
1.1 |
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 |
cafagna |
1.2 |
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 |
pamela |
1.1 |
|
| 53 |
|
|
|
| 54 |
|
|
private: |
| 55 |
|
|
string _name; |
| 56 |
|
|
int _type,_run,_event; |
| 57 |
|
|
pHeaderID *_heaid; |
| 58 |
|
|
|
| 59 |
cafagna |
1.2 |
public: |
| 60 |
|
|
//#ifndef __GNUC__ |
| 61 |
|
|
ClassDef(pHeader,1); |
| 62 |
|
|
//#endif |
| 63 |
pamela |
1.1 |
}; |
| 64 |
|
|
|
| 65 |
cafagna |
1.2 |
typedef vector<pHeader*> pHeaColl; |
| 66 |
pamela |
1.1 |
typedef map<string,pHeader*> pHeaMap; |
| 67 |
|
|
|
| 68 |
|
|
#endif //PHEADER_H |
| 69 |
cafagna |
1.2 |
|