Changeset 2655 for trunk/MagicSoft/Mars/mraw
- Timestamp:
- 12/11/03 17:11:34 (21 years ago)
- Location:
- trunk/MagicSoft/Mars/mraw
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mraw/MRawEvtData.cc
r2652 r2655 549 549 case 5: 550 550 val = Next.GetIdxMaxHiLoGainSample(); 551 break;551 return val >= 0; 552 552 } 553 553 -
trunk/MagicSoft/Mars/mraw/MRawEvtPixelIter.cc
r2654 r2655 221 221 // -------------------------------------------------------------------------- 222 222 // 223 // Returns the index of the FADC slice the maximum signal in 223 // Returns the index of the FADC slice the maximum signal in. If the highest 224 // slices have the same value the last one is returned. 224 225 // 225 226 Byte_t MRawEvtPixelIter::GetIdxMaxHiGainSample() const … … 240 241 // -------------------------------------------------------------------------- 241 242 // 242 // Returns the index of the FADC slice the maximum signal in 243 // 244 Byte_t MRawEvtPixelIter::GetIdxMaxLoGainSample() const 245 { 243 // Returns the index of the FADC slice the maximum signal in. If no lo-gains 244 // are available -1 is returned. If the highest slices have the same value the 245 // last one is returned. 246 // 247 Short_t MRawEvtPixelIter::GetIdxMaxLoGainSample() const 248 { 249 if (!HasLoGain()) 250 return -1; // means: not found 251 246 252 Byte_t max = 0; 247 253 Byte_t maxi = 0; … … 260 266 // 261 267 // Returns the index of the maximum FADC slice from high gain at first. If 262 // high gain is saturated it returns the low gain one. 263 // Att! Here the index range is from 1 to 15.264 // 0 means that an error occured (hi-gain saturated and no lo-gain available).268 // high gain is saturated it returns the low gain one. 269 // If no lo-gains are existing and the hi-gains have saturating values 270 // a negative value (-1) is returned. 265 271 // 266 267 Byte_t MRawEvtPixelIter::GetIdxMaxHiLoGainSample() const 268 { 269 Byte_t maxi = 0; 270 271 if (this->GetMaxHiGainSample() == 255) 272 { 273 if (this->HasLoGain()) 274 maxi = this->GetIdxMaxLoGainSample(); 275 } 276 else 277 maxi = this->GetIdxMaxHiGainSample(); 278 279 return maxi+1; 272 Short_t MRawEvtPixelIter::GetIdxMaxHiLoGainSample() const 273 { 274 Byte_t max = 0; 275 Char_t maxi = 0; 276 277 for (int i=fNumHiGainSamples-1; i>=0; i--) 278 if (fHiGainPos[i]>max) 279 { 280 max = fHiGainPos[i]; 281 maxi = i; 282 } 283 284 return max<0xff ? maxi : GetIdxMaxLoGainSample(); 280 285 } 281 286 -
trunk/MagicSoft/Mars/mraw/MRawEvtPixelIter.h
r2649 r2655 83 83 Float_t GetVarHiGainSamples() const; 84 84 85 Byte_t GetIdxMaxHiGainSample() const;86 Byte_t GetIdxMaxLoGainSample() const;87 Byte_t GetMaxHiGainSample() const;88 Byte_t GetMaxLoGainSample() const;89 Byte_t GetIdxMaxHiLoGainSample() const;85 Byte_t GetMaxHiGainSample() const; 86 Byte_t GetMaxLoGainSample() const; 87 Byte_t GetIdxMaxHiGainSample() const; 88 Short_t GetIdxMaxLoGainSample() const; 89 Short_t GetIdxMaxHiLoGainSample() const; 90 90 91 91 Bool_t HasLoGain() const
Note:
See TracChangeset
for help on using the changeset viewer.