00001 #ifndef TCERNNOV10PROC_H 00002 #define TCERNNOV10PROC_H 00003 00004 #include "TRocProc.h" 00005 #include "TCernNov10Event.h" 00006 00008 //#define NUM_SCALERS 5 00009 // 00010 //#define MAX_SPADIC 9 00013 // 00014 //#define NUM_SPADIC_CHA 8 00016 // 00017 //#define TRACE_SIZE 45 00019 // 00021 //#define MAX_MADC 3 00022 //#define N_MADC_CHA 32 00023 // 00024 //#define NUM_LECROY_CHA 8 00026 // 00027 //#define MAX_SCINT 2 00028 //#define N_SCINT_CHA 4 00029 // 00030 //#define N_SISTRIP_CHA 1280 00031 // 00032 //#define NUM_MAPMP_CELLS 256 00033 // 00034 //#define NX_HISTORY 5 00036 00037 struct MAPMT_Cell { 00038 float xbin; 00039 float ybin; 00040 float xcoord; 00041 float ycoord; 00042 int mapmt; 00043 int pixel; 00044 int feb; 00045 int channel; 00046 }; 00047 00048 00049 00050 00051 class TCernNov10Param; 00052 00053 class TCernNov10Proc : public TRocProc { 00054 public: 00055 TCernNov10Proc(const char* name = 0); 00056 virtual ~TCernNov10Proc(); 00057 00058 virtual Bool_t BuildEvent(TGo4EventElement*); // event processing function 00059 00060 protected: 00061 00062 virtual void ProcessRocMsg(roc::Message* msg); 00063 00064 virtual void ProcessSubevent(TGo4MbsSubEvent* subevt); 00065 00066 virtual void ProcessSpadic(TGo4MbsSubEvent* subevt); 00067 00068 virtual void ProcessMADCSub(TGo4MbsSubEvent* subevt); 00069 00070 void ProcessMADC(int i, int* pdata, int len); 00071 00072 void Process1182(int* pdata, int len); 00073 00074 void Process1183(int* pdata, int len); 00075 00076 void ProcessTDC(int* pdata, unsigned int len); 00077 00078 void ProcessSi(int* pdata, unsigned int len); 00079 00080 00081 bool ReadMapmtGeometry(const char* fname); 00082 00083 TCernNov10Param *fCernNov10Par; 00084 TCernNov10Event *fCernNov10Event; 00085 00086 00087 TH1 *fVulomSyncs; 00088 TH1 *fVulomScalers[NUM_SCALERS]; 00089 00090 TH2 *fMAPMT_entry; 00091 TH2 *fMAPMT_integral; 00092 TH2 *fMAPMT_mean; 00093 TH1 *fMAPMT_adc; 00094 TH1 *fMAPMT_tshift; 00095 TGo4WinCond *fMAPMT_cond; 00096 TGo4WinCond *fMAPMT_tcond; 00097 MAPMT_Cell fMAPMTCells[NUM_MAPMP_CELLS]; 00098 00099 TH1* fSTStm[2]; 00100 uint64_t lastSync[2]; 00101 uint64_t lastNx[2][NX_HISTORY]; 00102 00103 00104 /* objects for simple SPADIC online*/ 00105 TH2 *fSpadic_2D[MAX_SPADIC]; 00106 TH2 *fSpadic_2Dcomp[MAX_SPADIC]; 00107 TH2 *fSpadic_2DcompSwap[MAX_SPADIC]; 00108 TH1 *fSpadic_Intensity[MAX_SPADIC]; 00109 TH1 *fSpadic_peak[MAX_SPADIC]; 00110 TH1 *fSpadic_meanpos[MAX_SPADIC]; 00111 TGo4WinCond *fSpadic_cond[MAX_SPADIC]; 00112 TH1 *fSpadic_shape[MAX_SPADIC]; 00113 TH1 *fSpadic_shapecnt[MAX_SPADIC]; 00114 TH1 *fSpadic_pi_shape[MAX_SPADIC]; 00115 TH1 *fSpadic_pi_shapecnt[MAX_SPADIC]; 00116 TH1 *fSpadic_el_shape[MAX_SPADIC]; 00117 TH1 *fSpadic_el_shapecnt[MAX_SPADIC]; 00118 TH1 *fSpadic_trace[MAX_SPADIC][NUM_SPADIC_CHA]; 00119 TH1 *fSpadic_compens[MAX_SPADIC][NUM_SPADIC_CHA]; 00120 TGo4WinCond *fSpadic_peakcond[MAX_SPADIC]; 00121 00122 Bool_t fDoStopAnalysis; 00123 00124 00125 TGo4Picture *pSpadic_traces[MAX_SPADIC]; 00126 00127 /* 1182 */ 00128 TH1* f1182h[8]; 00129 TH2* fCh_Pb; 00130 TH2* fS1_Pb; 00131 TH2* fS1_S2; 00132 TH2* fS1_S3; 00133 TH2* fS2_S3; 00134 TGo4PolyCond *fPionCond; 00135 TGo4PolyCond *fElectronCond; 00136 00137 Bool_t fIsPion; 00138 Bool_t fIsElectron; 00139 00140 TH1* f1182status; 00141 00142 /* 1183 */ 00143 TH1* f1183h[8]; 00144 TH1* f1183status; 00145 00146 /* MADCs */ 00147 TH1* fMadc_adc[MAX_MADC][N_MADC_CHA]; 00148 TH1* fMadc_pion[MAX_MADC][N_MADC_CHA]; 00149 TH1* fMadc_electron[MAX_MADC][N_MADC_CHA]; 00150 TH1* fMadc_trace[MAX_MADC]; 00151 TGo4Picture * pMadc_overview[MAX_MADC]; 00152 00153 /* objects for MADC subevent*/ 00154 00155 /* TH1* fMadc_si_ped_trace; 00156 TH1* fMadc_si_ped_acc; 00157 TH1* fMadc_si_fifo0_trace; 00158 TH1* fMadc_si_fifo0_acc; 00159 TH1* fMadc_si_fifo1_trace; 00160 TH1* fMadc_si_fifo1_acc; 00161 */ 00162 /* since we do not have output event structure, remember current channel data here:*/ 00163 UInt_t fDataMadc[MAX_MADC][N_MADC_CHA]; 00164 00165 Int_t fData1182[8]; 00166 00167 Int_t fData1183[8]; 00168 00169 UShort_t fDataPb[N_SCINT_CHA]; 00170 UInt_t fSiPedestals[N_SISTRIP_CHA]; 00171 UInt_t fSiFifo0[N_SISTRIP_CHA]; 00172 UInt_t fSiFifo1[N_SISTRIP_CHA]; 00173 00174 00175 ClassDef(TCernNov10Proc,1) 00176 }; 00177 00178 #endif //TUNPACKPROCESSOR_H 00179