fdhwlib
2.0.25
|
00001 /*************************************************************************** 00002 tspattern.h - description 00003 00004 begin : Thu Oct 4 2001 00005 copyright : (C) 2001 by A Kopmann 00006 email : kopmann@ipe.fzk.de 00007 status : 00008 test : 00009 history : 00010 ***************************************************************************/ 00011 00012 00013 #ifndef TSPATTERN_H 00014 #define TSPATTERN_H 00015 00016 #include <cstdio> 00017 00018 // Don't allow ROOT CINT the access to the hardware 00019 // This is only a class for writing TFile in this case 00020 #ifdef __CINT__ 00021 # define USE_ROOT 00022 #else // __CINT__ 00023 #include <FEdata/tsdef.h> 00024 #endif 00025 00026 00027 #ifdef USE_ROOT 00028 #include <TObject.h> 00029 #include <TArrayS.h> 00030 #include <TH1.h> 00031 #else 00032 // Define the root types 00033 //typedef unsigned char Bool_t; //<<< this is dangerous and obsolete ! 00034 typedef bool Bool_t; 00035 typedef unsigned char UChar_t; 00036 typedef unsigned short UShort_t; 00037 typedef int Int_t; 00038 typedef unsigned int UInt_t; 00039 typedef float Float_t; 00040 #endif 00041 00042 #ifndef __CINT__ 00043 #include <Hw/Subrack.h> 00044 #endif 00045 00046 00047 class TMirrorEvent; 00048 class TsEvent; 00049 00056 #ifdef USE_ROOT 00057 00058 class TsPattern : public TObject 00059 00060 #else 00061 00062 class TsPattern 00063 00064 #endif 00065 00066 { 00067 00068 public: 00069 //private: 00070 00072 Int_t eventNumber; 00073 00076 Int_t iPattern; 00077 00081 Int_t patternId; 00082 00085 Int_t colList[4]; 00086 00088 Int_t rowList[4]; 00089 00091 Int_t nPulse; 00092 00094 Int_t nTrigger; 00095 00097 Int_t nPixel; 00098 00100 Int_t dx; 00101 Int_t dy; 00102 Float_t dr; 00103 Int_t rCircle; 00104 Float_t dt; 00105 Float_t prop; 00106 Float_t tError; 00107 00111 Float_t tStart[4]; 00112 00116 Float_t tEnd[4]; 00117 00119 Float_t height[4]; 00120 00123 Float_t gradient[4]; 00124 00126 Float_t mHeight; 00127 00129 Float_t mGradient; 00130 00132 Float_t tFirst; 00133 00136 Bool_t sltError; 00137 00139 Bool_t noPulse; 00140 00141 Bool_t noPixel[4]; 00142 00144 Bool_t multi; 00145 00146 00147 Bool_t noProp; 00148 Bool_t cShower; 00149 00150 00151 Float_t tTrigMean; 00152 Float_t tTrigVar; 00153 00155 #ifdef USE_ROOT 00156 TH1F *tTrigH; 00157 #endif 00158 00160 #ifndef __CINT__ 00161 unsigned long *sltMemory; 00162 unsigned short *fltMemory[4]; 00163 #endif 00164 00165 public: 00166 TsPattern(); 00167 ~TsPattern(); 00168 00169 #ifndef __CINT__ 00170 int get(Subrack *s); 00171 #endif 00172 00173 int getTriggerData(TsEvent *ev); 00174 00175 int getAdcData(TsEvent *ev); 00176 00177 void dump(FILE *fout); 00178 00180 void displayHeader(FILE *fout); 00181 00183 void display(FILE *fout); 00184 00186 void analyse(TsEvent *ev); 00187 00188 00189 #ifndef __CINT__ 00190 void analyse(TMirrorEvent *ev); 00191 00192 void analyse(Subrack *s); 00193 #endif 00194 00195 #ifdef USE_ROOT 00196 ClassDef(TsPattern,1) 00197 #endif 00198 00199 }; 00200 00201 #endif