Go to the documentation of this file.00001 #ifndef TCOSYDEC10PROC_H
00002 #define TCOSYDEC10PROC_H
00003
00004 #include "TRocProc.h"
00005 #include "TCosyDec10Event.h"
00006
00007
00008 #define _NUM_LONG_RECS_ 8
00009 #define _NUM_DOUBLE_RECS_ 8
00010
00011 #define _VARPRINT_ 0
00012
00013
00014 #include <vector>
00015
00016
00017 class TCosyDec10Param;
00018
00019 class TCosyDec10Proc : public TRocProc {
00020 public:
00021 TCosyDec10Proc(const char* name = 0);
00022 virtual ~TCosyDec10Proc();
00023
00024 virtual Bool_t BuildEvent(TGo4EventElement*);
00025
00026 protected:
00027
00028 virtual void ProcessRocMsg(roc::Message* msg);
00029
00030 virtual void ProcessNxHit(roc::Message* msg, Double_t nxadc_corr);
00031
00032
00033 virtual void ProcessSubevent(TGo4MbsSubEvent* subevt);
00034
00035 virtual void ProcessMADCSub(TGo4MbsSubEvent* subevt);
00036
00037 virtual void ProcessEpicsSub(TGo4MbsSubEvent* subevt);
00038
00039 virtual int32_t CalcDistanceToTrigger(int rocid, uint64_t fulltm);
00040
00041 void ExtractTriggerTimes(TGo4MbsEvent* evt);
00042
00043
00044 void Process1182(int* pdata, int len);
00045
00046 void Process1183(int* pdata, int len);
00047
00048 Bool_t IsSTS(roc::Message* msg);
00049
00050 Bool_t IsGEM(roc::Message* msg);
00051
00052 Int_t STS_GetStrip(Int_t side, Int_t odd, Int_t nxCh);
00053
00054 Bool_t GEM_Map(Int_t rocid, Int_t nxid, Int_t nxCh, Int_t &gemno, Int_t &xpos, Int_t &ypos);
00055
00056 void Init_GEM_Map();
00057
00058 TCosyDec10Param *fCosyDec10Par;
00059
00060 TCosyDec10Event *fCosyDec10Event;
00061
00062 TH1 *fVulomSyncs;
00063 TH1 *fVulomScalers[NUM_SCALERS];
00064 TH1 *fVulomScalersRate[NUM_SCALERS];
00065 TH2 *fVulomScalerOverview;
00066
00067 TH2* fScintRolu;
00068 TH2* fScintExtra;
00069
00070
00071 TH2* fScintVerticalQDC;
00072 TH2* fScintHorizontalQDC;
00073
00074 TH2* fScintAndQDC;
00075
00076 Int_t fVulomOldVals[N_SCALERS_CH];
00077
00078 Double_t f1182OldVals[NUM_1182];
00079 Double_t f1183OldVals[NUM_1183];
00080
00081
00082 UInt_t fLastMbsTimeSecs;
00083
00084
00085 UInt_t fLastMbsTimeMicros;
00086
00087 Double_t fMbsDeltatime;
00088
00089 TH1* fSyncQuality;
00090
00091
00092 TH1* fSTStm[NUM_STS_STATIONS];
00093 uint64_t lastSync[NUM_STS_STATIONS];
00094 uint64_t lastNx[NUM_STS_STATIONS][NX_HISTORY];
00095
00096
00097 TH1* fSTSNeg[NUM_STS_STATIONS];
00098 TH1* fSTSPos[NUM_STS_STATIONS];
00099 TH1* fSTSNegTimegated[NUM_STS_STATIONS];
00100 TH1* fSTSPosTimegated[NUM_STS_STATIONS];
00101
00102
00103
00104 TH1* fGEMtm[NUM_GEM_STATIONS];
00105 uint64_t lastGEMSync[NUM_GEM_STATIONS];
00106
00107
00108 TH2* fGEM_Map[NUM_GEM_STATIONS];
00109 TH2* fGEM_Map_Time[NUM_GEM_STATIONS];
00110 TH2* fGEM_Map_Adc[NUM_GEM_STATIONS];
00111 TH2* fGEM_Map_Adc_Time[NUM_GEM_STATIONS];
00112
00113 TH2* fMotorPos;
00114 TH2* fRoluPos;
00115
00116
00117 TH1* f1182h[NUM_1182];
00118 TGo4WinCond* f1182Gate[NUM_1182];
00119
00120
00121 TH1* f1183h[NUM_1183];
00122 TGo4WinCond* f1183Gate[NUM_1183];
00123
00124
00125
00126 Int_t fData1182[8];
00127
00128 Int_t fData1183[8];
00129
00130 static UChar_t fStsRocIds[NUM_STS_ROCS];
00131 static UChar_t fGEMRocIds[NUM_GEM_ROCS*NUM_GEM_STATIONS];
00132
00133 static Int_t fGEM_Y_BoundariesLeft[NUM_GEM_Y];
00134 static Int_t fGEM_Y_PeriodLeft[NUM_GEM_Y];
00135 static Int_t fGEM_Y_ShiftLeft[NUM_GEM_Y];
00136
00137 static Int_t fGEM_Y_BoundariesRight[NUM_GEM_Y];
00138 static Int_t fGEM_Y_PeriodRight[NUM_GEM_Y];
00139 static Int_t fGEM_Y_ShiftRight[NUM_GEM_Y];
00140
00141 Int_t fGEM_X[NUM_GEM_ROCS][NUM_GEM_NX][NUM_GEM_CH];
00142 Int_t fGEM_Y[NUM_GEM_ROCS][NUM_GEM_NX][NUM_GEM_CH];
00143
00144 std::vector<uint64_t> fTriggers;
00145
00146 ClassDef(TCosyDec10Proc,1)
00147 };
00148
00149 #endif
00150