Changeset 3951
- Timestamp:
- 05/03/04 18:43:29 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r3949 r3951 79 79 - take out pixvstime.C which does not exist 80 80 81 81 * msignal/MExtractFixedWindow.[h,cc] 82 * msignal/MExtractSlidingWindow.[h,cc] 83 * msignal/MExtractFixedWindowPeakSearch.[h,cc] 84 * msignal/MExtractor.[h,cc] 85 * msignal/MExtractPINDiode.[h,cc] 86 * msignal/MExtractTime.[h,cc] 87 - set number of slices not in base class, but in derived one. 88 Like this, extractors setting their signal in other containers 89 don't have a conflict with the ReInit() in MExtractor. 82 90 83 91 2004/05/01: Thomas Bretz -
trunk/MagicSoft/Mars/msignal/MExtractFixedWindow.cc
r3924 r3951 46 46 #include <fstream> 47 47 48 #include "MExtractedSignalCam.h" 49 48 50 #include "MLog.h" 49 51 #include "MLogManip.h" … … 141 143 } 142 144 145 // -------------------------------------------------------------------------- 146 // 147 // The ReInit calls: 148 // - MExtractor::ReInit() 149 // - fSignals->SetUsedFADCSlices(fHiGainFirst, fHiGainLast+fHiLoLast, fNumHiGainSamples, 150 // fLoGainFirst, fLoGainLast, fNumLoGainSamples); 151 // 152 Bool_t MExtractFixedWindow::ReInit(MParList *pList) 153 { 154 155 MExtractor::ReInit(pList); 156 157 fSignals->SetUsedFADCSlices(fHiGainFirst, fHiGainLast+fHiLoLast, fNumHiGainSamples, 158 fLoGainFirst, fLoGainLast, fNumLoGainSamples); 159 160 return kTRUE; 161 162 } 143 163 144 164 // -------------------------------------------------------------------------- -
trunk/MagicSoft/Mars/msignal/MExtractFixedWindow.h
r3924 r3951 24 24 void FindSignalHiGain(Byte_t *ptr, Byte_t *logain, Int_t &sum, Byte_t &sat) const; 25 25 void FindSignalLoGain(Byte_t *ptr, Int_t &sum, Byte_t &sat) const; 26 27 26 void StreamPrimitive(ofstream &out) const; 28 27 28 Bool_t ReInit(MParList *pList); 29 29 30 public: 30 31 -
trunk/MagicSoft/Mars/msignal/MExtractFixedWindowPeakSearch.cc
r3925 r3951 211 211 } 212 212 213 214 // -------------------------------------------------------------------------- 215 // 216 // The ReInit calls: 217 // - MExtractor::ReInit() 218 // - fSignals->SetUsedFADCSlices(fHiGainFirst, fHiGainLast+fHiLoLast, fNumHiGainSamples, 219 // fLoGainFirst, fLoGainLast, fNumLoGainSamples); 220 // 221 Bool_t MExtractFixedWindowPeakSearch::ReInit(MParList *pList) 222 { 223 224 MExtractor::ReInit(pList); 225 226 fSignals->SetUsedFADCSlices(fHiGainFirst, fHiGainLast+fHiLoLast, fNumHiGainSamples, 227 fLoGainFirst, fLoGainLast, fNumLoGainSamples); 228 229 return kTRUE; 230 231 } 232 213 233 // -------------------------------------------------------------------------- 214 234 // -
trunk/MagicSoft/Mars/msignal/MExtractFixedWindowPeakSearch.h
r3925 r3951 29 29 void FindPeak(Byte_t *ptr, Byte_t window, Byte_t &startslice, Int_t &signal, Int_t &sat) const; 30 30 31 Bool_t ReInit(MParList *pList); 31 32 Int_t Process(); 32 33 -
trunk/MagicSoft/Mars/msignal/MExtractPINDiode.cc
r3925 r3951 161 161 return kFALSE; 162 162 163 fPINDiode->SetUsedFADCSlices(fHiGainFirst, fLoGainLast);164 165 163 const MPedestalPix &ped = (*fPedestals)[fPINDiodeIdx]; 166 164 … … 180 178 } 181 179 180 // -------------------------------------------------------------------------- 181 // 182 // The ReInit calls: 183 // - MExtractor::ReInit() 184 // - fPINDiode->SetUsedFADCSlices(fHiGainFirst, fLoGainLast); 185 // 186 Bool_t MExtractPINDiode::ReInit(MParList *pList) 187 { 188 189 MExtractor::ReInit(pList); 190 191 fPINDiode->SetUsedFADCSlices(fHiGainFirst, fLoGainLast); 192 193 return kTRUE; 194 195 } 196 197 198 182 199 void MExtractPINDiode::FindSignalandVarianceHiGain(Byte_t *ptr, Int_t &sum, Int_t &sum2, Byte_t &sat) const 183 200 { -
trunk/MagicSoft/Mars/msignal/MExtractPINDiode.h
r3911 r3951 38 38 39 39 Int_t PreProcess(MParList *pList); 40 Bool_t ReInit(MParList *pList); 40 41 Int_t Process(); 41 42 void StreamPrimitive(ofstream &out) const; -
trunk/MagicSoft/Mars/msignal/MExtractSlidingWindow.cc
r3925 r3951 58 58 #include "MLogManip.h" 59 59 60 #include "MExtractedSignalCam.h" 60 61 61 62 ClassImp(MExtractSlidingWindow); … … 109 110 110 111 SetWindowSize(fWindowSizeHiGain,fWindowSizeLoGain); 112 113 } 114 115 116 // -------------------------------------------------------------------------- 117 // 118 // The ReInit calls: 119 // - MExtractor::ReInit() 120 // - fSignals->SetUsedFADCSlices(fHiGainFirst, fHiGainLast+fHiLoLast, fNumHiGainSamples, 121 // fLoGainFirst, fLoGainLast, fNumLoGainSamples); 122 // 123 Bool_t MExtractSlidingWindow::ReInit(MParList *pList) 124 { 125 126 MExtractor::ReInit(pList); 127 128 fSignals->SetUsedFADCSlices(fHiGainFirst, fHiGainLast+fHiLoLast, fNumHiGainSamples, 129 fLoGainFirst, fLoGainLast, fNumLoGainSamples); 130 131 return kTRUE; 111 132 112 133 } -
trunk/MagicSoft/Mars/msignal/MExtractSlidingWindow.h
r3924 r3951 23 23 void FindSignalLoGain(Byte_t *ptr, Int_t &max, Byte_t &sat) const; 24 24 25 Bool_t ReInit(MParList *pList); 25 26 26 27 public: -
trunk/MagicSoft/Mars/msignal/MExtractTime.cc
r3948 r3951 140 140 // -------------------------------------------------------------------------- 141 141 // 142 // The ReInit searches for: 143 // - MRawRunHeader::GetNumSamplesHiGain() 144 // - MRawRunHeader::GetNumSamplesLoGain() 145 // 146 // In case that the variable fLoGainLast is smaller than 147 // the even part of the number of samples obtained from the run header, a 148 // warning is given an the range is set back accordingly. A call to: 149 // - SetRange(fHiGainFirst, fHiGainLast, fLoGainFirst, fLoGainLast-diff) 150 // is performed in that case. The variable diff means here the difference 151 // between the requested range (fLoGainLast) and the available one. Note that 152 // the functions SetRange() are mostly overloaded and perform more checks, 153 // modifying the ranges again, if necessary. 154 // 155 // In case that the variable fHiGainLast is smaller than the available range 156 // obtained from the run header, a warning is given that a part of the low-gain 157 // samples are used for the extraction of the high-gain signal. 142 // The ReInit calls: 143 // - MExtractor::ReInit() 158 144 // 159 145 // Call: 160 146 // - MArrivalTimeCam::SetUsedFADCSlices(fHiGainFirst, fHiGainLast, fNumHiGainSamples, 161 // 147 // fLoGainFirst, fLoGainLast, fNumLoGainSamples); 162 148 // 163 149 Bool_t MExtractTime::ReInit(MParList *pList) 164 150 { 165 151 166 Int_t lastdesired = (Int_t)(fLoGainLast); 167 Int_t lastavailable = (Int_t)fRunHeader->GetNumSamplesLoGain()-1; 168 169 if (lastdesired > lastavailable) 170 { 171 const Int_t diff = lastdesired - lastavailable; 172 *fLog << endl; 173 *fLog << warn << GetDescriptor() 174 << Form("%s%2i%s%2i%s%2i%s",": Selected Lo Gain FADC Window [", 175 (int)fLoGainFirst,",",lastdesired, 176 "] ranges out of the available limits: [0,",lastavailable,"].") << endl; 177 *fLog << GetDescriptor() << ": Will reduce the upper edge to " << (int)(fLoGainLast - diff) << endl; 178 SetRange(fHiGainFirst, fHiGainLast, fLoGainFirst, fLoGainLast-diff); 179 } 180 181 lastdesired = (Int_t)fHiGainLast; 182 lastavailable = (Int_t)fRunHeader->GetNumSamplesHiGain()-1; 183 184 if (lastdesired > lastavailable) 185 { 186 const Int_t diff = lastdesired - lastavailable; 187 *fLog << endl; 188 *fLog << warn << GetDescriptor() 189 << Form("%s%2i%s%2i%s%2i%s",": Selected Hi Gain FADC Window [", 190 (int)fHiGainFirst,",",lastdesired, 191 "] ranges out of the available limits: [0,",lastavailable,"].") << endl; 192 *fLog << warn << GetDescriptor() 193 << Form("%s%2i%s",": Will use ",diff," samples from the Low-Gain for the High-Gain extraction") 194 << endl; 195 fHiGainLast -= diff; 196 fHiLoLast = diff; 197 } 198 152 MExtractor::ReInit(pList); 199 153 200 154 fArrTime->SetUsedFADCSlices(fHiGainFirst, fHiGainLast+fHiLoLast, fLoGainFirst, fLoGainLast); -
trunk/MagicSoft/Mars/msignal/MExtractor.cc
r3924 r3951 101 101 102 102 fHiGainFirst = hifirst; 103 fHiGainLast = hilast; 104 103 105 fLoGainFirst = lofirst; 104 105 fHiGainLast = hilast;106 106 fLoGainLast = lolast; 107 107 … … 212 212 } 213 213 214 215 fSignals->SetUsedFADCSlices(fHiGainFirst, fHiGainLast+fHiLoLast, fNumHiGainSamples,216 fLoGainFirst, fLoGainLast, fNumLoGainSamples);217 218 214 return kTRUE; 219 215 } -
trunk/MagicSoft/Mars/msignal/Makefile
r3943 r3951 30 30 SRCFILES = MExtractedSignalCam.cc \ 31 31 MExtractedSignalPix.cc \ 32 MExtractedSignalPINDiode.cc \ 33 MExtractedSignalBlindPixel.cc \ 32 34 MExtractor.cc \ 33 35 MExtractFixedWindow.cc \ … … 38 40 MExtractSignal3.cc \ 39 41 MExtractPINDiode.cc \ 40 MExtractedSignalPINDiode.cc \41 42 MExtractBlindPixel.cc \ 42 MExtractedSignalBlindPixel.cc \43 43 MExtractTime.cc \ 44 44 MExtractTimeSpline.cc \ -
trunk/MagicSoft/Mars/msignal/SignalLinkDef.h
r3943 r3951 7 7 #pragma link C++ class MExtractedSignalCam+; 8 8 #pragma link C++ class MExtractedSignalPix+; 9 #pragma link C++ class MExtractedSignalPINDiode++; 10 #pragma link C++ class MExtractedSignalBlindPixel++; 11 9 12 #pragma link C++ class MExtractSignal+; 10 13 #pragma link C++ class MExtractSignal2+; … … 15 18 #pragma link C++ class MExtractSlidingWindow+; 16 19 #pragma link C++ class MExtractFixedWindowPeakSearch+; 17 18 19 20 #pragma link C++ class MExtractPINDiode++; 20 #pragma link C++ class MExtractedSignalPINDiode++;21 21 #pragma link C++ class MExtractBlindPixel++; 22 #pragma link C++ class MExtractedSignalBlindPixel++;23 22 24 23 #pragma link C++ class MExtractTime+;
Note:
See TracChangeset
for help on using the changeset viewer.