00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef STBTOFDAQMAP_H
00023 #define STBTOFDAQMAP_H
00024
00025 #include "StObject.h"
00026 #include "StMaker.h"
00027 #include <assert.h>
00028 #include "Stypes.h"
00029 #include "TDataSet.h"
00030 #include "TDataSetIter.h"
00031 #include "TObjectSet.h"
00032 #include <string>
00033
00034 #include <vector>
00035 #ifndef ST_NO_NAMESPACES
00036 using std::vector;
00037 #endif
00038
00039 #if !defined(ST_NO_TEMPLATE_DEF_ARGS) || defined(__CINT__)
00040
00041 typedef vector<Int_t> IntVec;
00042 #else
00043 typedef vector<Int_t, allocator<Int_t>> IntVec;
00044 #endif
00045
00050 class StBTofDaqMap{
00051 private:
00052 static const Int_t mDAQOVERFLOW = 255;
00053 static const Int_t mNTOF = 192;
00054 static const Int_t mNTray = 120;
00055 static const Int_t mNModule = 32;
00056 static const Int_t mNCell = 6;
00057 static const Int_t mNVPD = 19;
00058
00059 Int_t mNValidTrays;
00060
00061 Int_t mMRPC2TDIGChan[mNTOF];
00062 Int_t mTDIG2MRPCChan[mNTOF];
00063 Int_t mEastPMT2TDIGLeChan[mNVPD], mEastPMT2TDIGTeChan[mNVPD];
00064 Int_t mTDIGLe2EastPMTChan[mNTOF], mTDIGTe2EastPMTChan[mNTOF];
00065 Int_t mWestPMT2TDIGLeChan[mNVPD], mWestPMT2TDIGTeChan[mNVPD];
00066 Int_t mTDIGLe2WestPMTChan[mNTOF], mTDIGTe2WestPMTChan[mNTOF];
00067
00069 Int_t mValidTrayId[mNTray];
00070
00071 public:
00073 StBTofDaqMap();
00074 ~StBTofDaqMap();
00075
00077 void Init(StMaker *maker);
00078 void Reset();
00079
00081 void setNValidTrays(int ntrays);
00082
00084 IntVec TDIGChan2Cell( const Int_t iTdc );
00086 Int_t Cell2TDIGChan( const Int_t iModule, const Int_t iCell );
00087
00090 Int_t EastPMT2TDIGLeChan( const Int_t iTube );
00092 Int_t TDIGLeChan2EastPMT( const Int_t iTdc );
00094 Int_t EastPMT2TDIGTeChan( const Int_t iTube );
00096 Int_t TDIGTeChan2EastPMT( const Int_t iTdc );
00098 Int_t WestPMT2TDIGLeChan( const Int_t iTube );
00100 Int_t TDIGLeChan2WestPMT( const Int_t iTdc );
00102 Int_t WestPMT2TDIGTeChan( const Int_t iTube );
00104 Int_t TDIGTeChan2WestPMT( const Int_t iTdc );
00105
00107 IntVec ValidTrays();
00109 Int_t numberOfValidTrays();
00110 };
00111
00112 inline void StBTofDaqMap::setNValidTrays(int ntrays) { mNValidTrays = ntrays; }
00113 inline Int_t StBTofDaqMap::numberOfValidTrays() { return mNValidTrays; }
00114 #endif