00001
00002
00003
00004
00005 #ifndef BES_EVENT_HEADER
00006 #define BES_EVENT_HEADER
00007
00008 #include <TObject.h>
00009 #include <TString.h>
00010 #include <vector>
00011
00012 using std::vector;
00013
00014 class BesEventHeader : public TObject{
00015
00016 private:
00017 Long64_t fRun;
00018 Long64_t fEvent;
00019 Bool_t fMC;
00020
00021 Int_t fDay;
00022 Int_t fMonth;
00023 Int_t fYear;
00024 Int_t fHour;
00025 Int_t fMin;
00026 Int_t fSec;
00027
00028 Double_t fEvTime;
00029 Int_t fEvTimeStatus;
00030 Double_t fEvTimeQuality;
00031
00032 Double_t fP;
00033 Double_t fPt;
00034 Double_t fPx;
00035 Double_t fPy;
00036 Double_t fPz;
00037 Double_t fT;
00038 Double_t fE;
00039 Int_t fTimeType;
00040 vector<Int_t> fTrigChannelVector;
00041 vector<Int_t> fTrigConditionVector;
00042
00043
00044 public:
00045 BesEventHeader();
00046 virtual ~BesEventHeader();
00047
00048 virtual void SetEventHeaderGeneral(Long64_t run, Long64_t event,Int_t time1,Int_t time2);
00049 virtual void SetEventTrig(Int_t timeType, vector<Int_t>& trigConditionVector, vector<Int_t>& trigChannelVector);
00050 virtual void SetEventMC(Bool_t mc);
00051 virtual void SetEventEvTime(Double_t time, Int_t status, Double_t quality);
00052 virtual void SetEventMdc(Double_t p, Double_t pt, Double_t px, Double_t py, Double_t pz);
00053 virtual void SetEventTof(Double_t t);
00054 virtual void SetEventEmc(Double_t e);
00055
00056
00057 void PrintWord(TString &word,Int_t nbits, Int_t trigger,Int_t trigger2=0) const ;
00058
00059 inline Long64_t GetRunNumber() { return fRun; }
00060 inline Long64_t GetEventNumber() { return fEvent; }
00061 inline Bool_t GetEventMC() { return fMC; }
00062
00063 inline Int_t GetTimeType() { return fTimeType; }
00064 inline vector<Int_t>& GetTrigChannelVector() { return fTrigChannelVector; }
00065 inline vector<Int_t>& GetTrigConditionVector() { return fTrigConditionVector; }
00066
00067 inline Int_t GetEventYear() { return fYear; }
00068 inline Int_t GetEventMonth() { return fMonth; }
00069 inline Int_t GetEventDay() { return fDay; }
00070 inline Int_t GetEventHour() { return fHour;}
00071 inline Int_t GetEventMin() { return fMin;}
00072 inline Int_t GetEventSec() { return fSec;}
00073
00074 inline Double_t GetEvTime() { return fEvTime; }
00075 inline Int_t GetEvTimeStatus() { return fEvTimeStatus; }
00076 inline Double_t GetEvTimeQuality() { return fEvTimeQuality; }
00077
00078 inline virtual Float_t GetP() { return fP; }
00079 inline virtual Float_t GetPt() { return fPt; }
00080 inline virtual Float_t GetPx() { return fPx; }
00081 inline virtual Float_t GetPy() { return fPy; }
00082 inline virtual Float_t GetPz() { return fPz; }
00083
00084 inline virtual Float_t GetT() { return fT; }
00085
00086 inline virtual Float_t GetE() { return fE; }
00087
00088 ClassDef(BesEventHeader,0)
00089 };
00090
00091 #endif