00001 #ifndef STAR_StTofHitMaker_H
00002 #define STAR_StTofHitMaker_H
00003
00004
00005
00006
00007
00008
00009
00010
00011 #include "StRTSBaseMaker.h"
00012
00013 #include <vector>
00014 #ifndef ST_NO_NAMESPACES
00015 using std::vector;
00016 #endif
00017
00018 #ifndef NEW_DAQ_READER
00019 class evpReader;
00020 #else
00021 struct tof_t;
00022 #endif
00023
00024 class StEvent;
00025 class StTofCollection;
00026 class StTofData;
00027 class StTofRawData;
00028 class StTofCollection;
00029 class StTofRawDataCollection;
00030 class StTofDataCollection;
00031
00032 class StTofHitMaker:public StRTSBaseMaker
00033 {
00034 private:
00035 StEvent *mStEvent;
00036 #ifndef __CINT__
00037 #ifndef NEW_DAQ_READER
00038 evpReader *fDaqReader;
00039 #else
00040 tof_t *fTof;
00041 #endif
00042 #endif
00043 Int_t UnpackTofRawData();
00044 void fillTofDataCollection();
00045 void fillStEvent();
00046
00047
00048 struct TofRawHit {
00049 unsigned short fiberid;
00050 unsigned short trayID;
00051 unsigned short globaltdcchan;
00052 unsigned int tdc;
00053 unsigned int timestamp;
00054 unsigned int triggertimestamp;
00055 };
00056 vector<TofRawHit> TofLeadingHits;
00057 vector<TofRawHit> TofTrailingHits;
00058
00059 StTofCollection* tofCollection;
00060 StTofDataCollection* mDataCollection;
00061 StTofRawDataCollection* mRawDataCollection;
00062 Bool_t mInitialized;
00063
00064 protected:
00065 StRtsTable *GetNextRaw();
00066
00067 StTofCollection *GetTofCollection();
00068 #ifndef NEW_DAQ_READER
00069 evpReader *InitReader();
00070 #endif
00071
00072 public:
00073
00074 StTofHitMaker(const char *name="tof_raw");
00075
00076 ~StTofHitMaker() ;
00077
00078 Int_t Make();
00079 Int_t InitRun(Int_t);
00080 Int_t FinishRun(Int_t);
00081
00083 virtual const char *GetCVS() const
00084 {
00085 static const char cvs[]="Tag $Name: $Id: built "__DATE__" "__TIME__ ; return cvs;
00086 }
00087
00088 ClassDef(StTofHitMaker, 1)
00089 };
00090
00091 #endif