StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StEvtHddr.h
1 #ifndef StEvtHddr_h
2 #define StEvtHddr_h
3 #include <TDatime.h>
4 #include "TDataSet.h"
5 struct EvtHddr_st;
6 
7 class StEvtHddr : public TDataSet
8 {
9 public:
10  StEvtHddr(TDataSet *parent=0);
11  StEvtHddr(const StEvtHddr &hddr, const char *name=0);
12  ~StEvtHddr(){};
13  StEvtHddr &operator=(const StEvtHddr &hddr);
14  virtual TObject *Clone(const char *name=0) const {return new StEvtHddr(*this,name);}
15  virtual TObject *Clone() {return ((const StEvtHddr*)this)->Clone();};
16 // Get methods
17 
18  Int_t GetRunNumber() const {return mRunNumber;};
19  Int_t GetOldRunNumber() const {return mOldRunNumber;};
20  const Char_t *GetEventType() const {return (const Char_t*)mEventType;};
21  UInt_t GetTriggerMask() const {return mTriggerMask;};
22  UInt_t GetInputTriggerMask() const {return mInputTriggerMask;};
23  Float_t GetCenterOfMassEnergy() const {return mCenterOfMassEnergy;};
24  UInt_t GetBunchCrossingNumber(int i) const {return mBunchCrossingNumber[i];};
25  Int_t GetAEast() const {return mAEast;};
26  Int_t GetZEast() const {return mZEast;};
27  Int_t GetAWest() const {return mAWest;};
28  Int_t GetZWest() const {return mZWest;};
29  Float_t GetLuminosity() const {return mLuminosity;};
30  Float_t GetBImpact() const {return mBImpact;};
31  Float_t GetPhiImpact() const {return mPhImpact;};
32  Float_t GetPhImpact() const {return GetPhiImpact();};
33  UInt_t GetUTime() const ;
34  Int_t GetDate() const {return mEventTime.GetDate();};
35  Int_t GetTime() const {return mEventTime.GetTime();};
36  const TDatime &GetDateTime() const {return mEventTime;};
37  const TDatime &GetProdDateTime() const {return mProdTime;};
38  Int_t GetIventNumber() const {return mIventNumber;};
39  Int_t GetEventSize() const {return mEventSize;};
40  Int_t GetEventNumber() const {return mEventNumber;};
41  Int_t GetGenerType() const {return mGenerType;};
42  Int_t IsNewRun() const {return (mRunNumber!=mOldRunNumber);};
43  void FillTag(EvtHddr_st *tag);
44 // Set methods
45 
46  void SetRunNumber(int run) {mOldRunNumber=mRunNumber;mRunNumber=run;};
47  void SetEventType(const Char_t *type){mEventType=type;};
48  void SetTriggerMask(UInt_t tm) {mTriggerMask=tm;};
49  void SetInputTriggerMask(UInt_t tm) {mInputTriggerMask=tm;};
50  void SetBunchCrossingNumber(UInt_t bcn0,UInt_t bcn1)
51  {mBunchCrossingNumber[0]=bcn0;mBunchCrossingNumber[1]=bcn1;}
52  void SetCenterOfMassEnergy(float e) {mCenterOfMassEnergy=e;};
53  void SetBImpact (float b) {mBImpact=b;};
54  void SetPhiImpact(float p) {mPhImpact=p;};
55  void SetPhImpact (float p) {SetPhiImpact(p);};
56  void SetAEast(int a) {mAEast=a;};
57  void SetZEast(int z) {mZEast=z;};
58  void SetAWest(int a) {mAWest=a;};
59  void SetZWest(int z) {mZWest=z;};
60  void SetLuminosity(float lu) {mLuminosity=lu;};
61  void SetDateTime(int iDate,int iTime){mEventTime.Set(iDate,iTime);};
62  void SetDateTime(TDatime dt) {mEventTime=dt;};
63  void SetGMTime(UInt_t ut);
64  void SetProdDateTime(UInt_t ut=0);
65  void SetIventNumber(int iv) {mIventNumber=iv;};
66  void SetEventSize(int is) {mEventSize=is;};
67  void SetEventNumber(int ev) {mEventNumber=ev;};
68  void SetGenerType(int g) {mGenerType=g;};
69  void Print(Option_t* option="") const;
70 
71 // Data Members
72 protected:
73  Int_t mRunNumber;
74  Int_t mOldRunNumber;
75  Int_t mId;
76  UInt_t mInputTriggerMask;
77  UInt_t mTriggerMask;
78  Float_t mCenterOfMassEnergy;
79  Int_t mAEast;
80  Int_t mZEast;
81  Int_t mAWest;
82  Int_t mZWest;
83  Float_t mLuminosity;
84  Float_t mBeamPolarizationEast[3];
85  Float_t mBeamPolarizationWest[3];
86  Float_t mBImpact; //Impact parameter
87  Float_t mPhImpact; //Phi angle of impact
88  Int_t mGenerType; //Gener type see below
89  UInt_t mBunchCrossingNumber[2];
90  Int_t mIventNumber; //sequential number in DAQ/Geant file
91  Int_t mEventSize; //size of event
92  Int_t mEventNumber;
93 //
94  TDatime mEventTime; //DAQ Time
95  TDatime mProdTime; //Production time
96  TString mEventType;
97 
98 ClassDef(StEvtHddr,3) // Event header
99 };
100 
101 //__________________________________________________________________________________
102 inline StEvtHddr::StEvtHddr(const StEvtHddr &hddr,const char *name):TDataSet(name,"")
103 { operator=(hddr); }
104 
105 //__________________________________________________________________________________
106 struct EvtHddr_st
107 {
108  Int_t mRunNumber;
109  Int_t mOldRunNumber;
110  Int_t mId;
111  UInt_t mInputTriggerMask;
112  UInt_t mTriggerMask;
113  Float_t mCenterOfMassEnergy;
114  Int_t mAEast;
115  Int_t mZEast;
116  Int_t mAWest;
117  Int_t mZWest;
118  Float_t mLuminosity;
119  Float_t mBeamPolarizationEast[3];
120  Float_t mBeamPolarizationWest[3];
121  Float_t mBImpact; //Impact parameter
122  Float_t mPhImpact; //Phi angle of impact
123  Int_t mGenerType; //Gener type see below
124  UInt_t mBunchCrossingNumber[2];
125  Int_t mIventNumber; //sequential number in DAQ/Geant file
126  Int_t mEventSize; //size of event
127  Int_t mEventNumber;
128 //
129 // TDatime mEventTime; //DAQ Time
130  Double_t mEventTime;
131 // TDatime mProdTime; //Production time
132  Double_t mProdTime;
133  // TString mEventType;
134  char mEventType[16];
135 };
136 #endif
137 
138 #if 0
139 /* mGenerType =
140 
141 * 1 FRITIOF : MINBIAS
142 * 2 FRITIOF : CENTRAL
143 * 10 HBT : MINBIAS
144 * 11 HBT : CENTRAL
145 * 20 HIJET : RHICEVT : MINBIAS
146 * 21 HIJET : RHICEVT : CENTRAL
147 * 22 HIJET : PLASMA
148 * 23 HIJET : LANDAU
149 * 24 HIJET : SMOKE
150 * 25 HIJET : VOLCANO
151 * 26 HIJET : CHIRAL
152 * 27 HIJET : PTSIM
153 * 28 HIJET : STRANGSIM
154 * 29 HIJET : HIFLOW
155 * 30 HIJING : REGULAR : MINBIAS
156 * 31 HIJING : REGULAR : CENTRAL
157 * 32 HIJING : JET : MINBIAS
158 * 33 HIJING : JET : CENTRAL
159 * 40 PYTHIA : MINBIAS
160 * 41 PYTHIA : JET
161 * 42 PYTHIA : PHOTON
162 * 43 PYTHIA : W
163 * 50 STARLIGHT
164 * 51 STARLIGHT gamma gamma
165 * 52 STARLIGHT photnuc : coherent
166 * 60 VENUS : MINBIAS
167 * 61 VENUS : CENTRAL
168 * 62 VENUS : CENTRAL : MEV
169 * 70 VNI : NOAFTER : MINBIAS
170 * 71 VNI : AFTER : MINBIAS
171 * 72 VNI : NOAFTER : CENTRAL
172 * 73 VNI : AFTER : CENTRAL
173 * 74 VNI : NOAFTER : JET
174 * 75 VNI : AFTER : JET
175 * 76 VNI : NOAFTER : PHOTON
176 * 77 VNI : AFTER : PHOTON
177 * 78 VNI : NOAFTER : CHIRAL
178 * 79 VNI : AFTER : CHIRAL
179 * 80 VNI : CENTRAL : MEV
180 * 90 RQMD : MINBIAS
181 * 91 RQMD : CENTRAL
182 * 100 BEAMGAS: VENUS : MINBIAS
183 */
184 #endif
virtual TObject * Clone(const char *name=0) const
the custom implementation fo the TObject::Clone
Definition: StEvtHddr.h:14