Changeset 8361 for trunk/MagicSoft/Mars/mpedestal
- Timestamp:
- 03/04/07 12:01:41 (18 years ago)
- Location:
- trunk/MagicSoft/Mars/mpedestal
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mpedestal/MPedCalcFromLoGain.cc
r8343 r8361 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MPedCalcFromLoGain.cc,v 1.3 6 2007-03-01 21:20:41tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MPedCalcFromLoGain.cc,v 1.37 2007-03-04 12:00:30 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 214 214 return kFALSE; 215 215 216 CheckExtractionWindow(fRunHeader->GetNumSamplesHiGain()); 216 const Int_t nhi = fRunHeader->GetNumSamplesHiGain(); 217 const Int_t nlo = fRunHeader->GetNumSamplesLoGain(); 218 CheckExtractionWindow(nlo>0?nhi:0); 217 219 218 220 return kTRUE; … … 227 229 Int_t MPedCalcFromLoGain::Calc() 228 230 { 231 const Int_t nhi = fRunHeader->GetNumSamplesHiGain(); 232 const Int_t nlo = fRunHeader->GetNumSamplesLoGain(); 233 229 234 // Real Process 230 235 MRawEvtPixelIter pixel(fRawEvt); 231 232 236 while (pixel.Next()) 233 237 { … … 240 244 UInt_t ab[2]; 241 245 const Float_t sum = fExtractor ? 242 CalcExtractor(pixel, pixel.GetNumHiGainSamples()) :243 CalcSums(pixel, pixel.GetNumHiGainSamples(), ab[0], ab[1]);246 CalcExtractor(pixel, nlo>0?nhi:0) : 247 CalcSums(pixel, nlo>0?nhi:0, ab[0], ab[1]); 244 248 245 249 const UInt_t aidx = (*fGeom)[idx].GetAidx(); -
trunk/MagicSoft/Mars/mpedestal/MPedestalSubtractedEvt.cc
r8250 r8361 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MPedestalSubtractedEvt.cc,v 1. 2 2007-01-15 12:06:15tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MPedestalSubtractedEvt.cc,v 1.3 2007-03-04 12:01:37 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 105 105 Byte_t *p0 = GetSamplesRaw(idx); 106 106 107 Byte_t *sat hi0 = 0; // first saturating hi-gainslice108 Byte_t *sat hi1 = 0; // last saturating hi-gainslice107 Byte_t *sat0 = 0; // first saturating slice 108 Byte_t *sat1 = 0; // last saturating slice 109 109 110 110 Int_t num = 0; … … 115 115 if (*ptr>=limit) 116 116 { 117 sat hi1 = ptr;118 if (!sat hi0)119 sat hi0 = ptr;117 sat1 = ptr; 118 if (!sat0) 119 sat0 = ptr; 120 120 num++; 121 121 } 122 122 } 123 123 124 last = sat hi1 ? sathi1-p0 : -1;125 first = sat hi0 ? sathi0-p0 : -1;124 last = sat1 ? sat1-p0 : -1; 125 first = sat0 ? sat0-p0 : -1; 126 126 127 127 return num; … … 138 138 // Warning: No range checks and no sanity checks are done! 139 139 // 140 Int_t MPedestalSubtractedEvt::GetMax(const Int_t idx, const Int_t first, const Int_t last, Int_t &val) const140 Int_t MPedestalSubtractedEvt::GetMax(const Int_t idx, const Int_t first, const Int_t last, UInt_t &val) const 141 141 { 142 142 // Get pointer to first slice to be considered -
trunk/MagicSoft/Mars/mpedestal/MPedestalSubtractedEvt.h
r8350 r8361 41 41 Int_t GetSaturation(const Int_t idx, Int_t limit, Int_t &first, Int_t &last) const; 42 42 //void InterpolateSaturation(const Int_t idx, Int_t limit, Int_t first, Int_t last) const; 43 Int_t GetMax(const Int_t pixidx, const Int_t first, const Int_t last, Int_t &val) const;43 Int_t GetMax(const Int_t pixidx, const Int_t first, const Int_t last, UInt_t &val) const; 44 44 Int_t GetMax(const Int_t pixidx, const Int_t first, const Int_t last) const 45 45 { 46 Int_t val;46 UInt_t val; 47 47 return GetMax(pixidx, first, last, val); 48 48 } 49 Int_t GetMax(const Int_t pixidx, Int_t &val) const49 Int_t GetMax(const Int_t pixidx, UInt_t &val) const 50 50 { 51 51 return GetMax(pixidx, 0, fNumSamples, val); … … 54 54 Int_t GetMax(const Int_t pixidx) const 55 55 { 56 Int_t val;56 UInt_t val; 57 57 return GetMax(pixidx, 0, fNumSamples, val); 58 58 }
Note:
See TracChangeset
for help on using the changeset viewer.