Changeset 8158 for trunk/MagicSoft/Mars/mpedestal
- Timestamp:
- 10/24/06 13:40:58 (18 years ago)
- Location:
- trunk/MagicSoft/Mars/mpedestal
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mpedestal/MPedestalSubtract.cc
r8154 r8158 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MPedestalSubtract.cc,v 1. 2 2006-10-24 08:18:07tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MPedestalSubtract.cc,v 1.3 2006-10-24 12:39:00 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 144 144 memcpy(sample+numh, pixel.GetLoGainSamples(), numl); 145 145 146 // if no pedestals are given we are finished 146 // start of destination array, end of hi-gain destination array 147 // and start of hi-gain samples 148 Float_t *beg = fSignal->GetSamples(pixidx); 149 Float_t *end = beg + fSignal->GetNumSamples(); 150 151 const Byte_t *src = sample; 152 153 // if no pedestals are given just convert the data into 154 // floats and we are finished 147 155 if (!fPedestals) 156 { 157 while (beg<end) 158 *beg++ = *src++; 148 159 continue; 160 } 149 161 150 162 // get pedestal information for this pixel … … 155 167 const Float_t ped = pedpix.GetPedestal(); 156 168 157 // start of destination array, end of hi-gain destination array158 // and start of hi-gain samples159 Float_t *beg = fSignal->GetSamples(pixidx);160 Float_t *end = beg + fSignal->GetNumSamples();161 162 169 // determine with which pedestal (+/- AB offset) to start 163 170 const Bool_t swap = (ab&1)==1; 164 171 const Float_t offh = swap ? -pedpix.GetPedestalABoffset() : pedpix.GetPedestalABoffset(); 165 172 const Float_t mean[2] = { ped + offh, ped - offh }; 166 167 const Byte_t *src = sample;168 173 169 174 // Copy hi-gains into array and substract pedestal -
trunk/MagicSoft/Mars/mpedestal/MPedestalSubtractedEvt.h
r8154 r8158 56 56 } 57 57 58 Int_t GetIntegralRaw(Int_t idx, Int_t first, Int_t last) const 59 { 60 Byte_t *ptr = GetSamplesRaw(idx); 61 62 const Byte_t *end = ptr + last - first + 1; 63 64 Int_t sum = 0; 65 while (ptr<end) 66 sum += *ptr++; 67 68 return sum; 69 } 70 58 71 Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const { return kTRUE; } 59 72 void DrawPixelContent(Int_t num) const { }
Note:
See TracChangeset
for help on using the changeset viewer.