Changeset 8358
- Timestamp:
- 03/03/07 22:48:30 (18 years ago)
- Location:
- trunk/MagicSoft/Mars/msignal
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/msignal/MExtractTime.cc
r8304 r8358 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MExtractTime.cc,v 1.2 3 2007-02-04 15:30:16tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MExtractTime.cc,v 1.24 2007-03-03 22:48:30 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 135 135 { 136 136 MExtractor::Print(o); 137 *fLog << " Offset Lo-Gain: " << fOffsetLoGain << endl; 137 if (HasLoGain()) 138 *fLog << " Offset Lo-Gain: " << fOffsetLoGain << endl; 138 139 } -
trunk/MagicSoft/Mars/msignal/MExtractTimeAndCharge.cc
r8297 r8358 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MExtractTimeAndCharge.cc,v 1.6 2 2007-02-03 20:05:35tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MExtractTimeAndCharge.cc,v 1.63 2007-03-03 22:46:10 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 84 84 #include "MParList.h" 85 85 86 #include "MRawRunHeader.h" 86 87 #include "MRawEvtPixelIter.h" 87 #include "MRawRunHeader.h"88 88 89 89 #include "MArrivalTimeCam.h" … … 168 168 fSignals->SetUsedFADCSlices(fHiGainFirst, fHiGainLast, fNumHiGainSamples, 169 169 fLoGainFirst, fLoGainLast, fNumLoGainSamples); 170 171 if (!HasLoGain()) 172 { 173 *fLog << inf << "No lo-gains... resetting lo-gain switch." << endl; 174 fLoGainSwitch=0xff; 175 } 176 170 177 return kTRUE; 171 178 } … … 206 213 Int_t MExtractTimeAndCharge::Process() 207 214 { 215 const Int_t numh = fRunHeader->GetNumSamplesHiGain(); 216 const Int_t numl = fRunHeader->GetNumSamplesLoGain(); 217 208 218 MRawEvtPixelIter pixel(fRawEvt); 209 210 219 while (pixel.Next()) 211 220 { … … 213 222 214 223 const Float_t *sig = fSignal->GetSamples(pixidx); 215 216 const Int_t numh = pixel.GetNumHiGainSamples();217 224 218 225 Int_t sathi0 = fHiGainFirst; // First slice to extract and first saturating slice … … 286 293 287 294 // FIXME: What to do with the pixel if it saturates too early??? 288 if ( pixel.HasLoGain()&& maxcont>fLoGainSwitch)295 if (numl>0 && maxcont>fLoGainSwitch) 289 296 { 290 297 Int_t first = numh+fLoGainFirst; … … 424 431 MExtractTime::Print(o); 425 432 426 *fLog << dec; 427 *fLog << " LoGainStartShift: " << fLoGainStartShift << endl; 428 *fLog << " LoGainSwitch: " << (Int_t)fLoGainSwitch << endl; 429 } 433 if (HasLoGain()) 434 { 435 *fLog << dec; 436 *fLog << " LoGainStartShift: " << fLoGainStartShift << endl; 437 *fLog << " LoGainSwitch: " << (Int_t)fLoGainSwitch << endl; 438 } 439 } -
trunk/MagicSoft/Mars/msignal/MExtractor.cc
r8304 r8358 251 251 *fLog << err << "ERROR - Last lo-gain slice must not exceed " << num-1 << endl; 252 252 return kFALSE; 253 } 254 255 if (numl==0) 256 { 257 *fLog << inf << "No lo-gains... resetting lo-gain range and saturation limit." << endl; 258 fLoGainFirst=0; 259 fLoGainLast =0; 260 fSaturationLimit=0xff; 253 261 } 254 262 … … 455 463 456 464 *fLog << " Hi Gain Range: " << Form("%2d %2d", fHiGainFirst, fHiGainLast) << endl; 457 *fLog << " Lo Gain Range: " << Form("%2d %2d", fLoGainFirst, fLoGainLast) << endl; 458 // *fLog << " Gain Overlap to Lo: " << Form("%2d", fHiLoLast) << endl; 459 *fLog << " Saturation Lim: " << Form("%3d", fSaturationLimit) << endl; 460 *fLog << " Num Samples Hi/Lo: " << Form("%2.1f %2.1f", fNumHiGainSamples, fNumLoGainSamples) << endl; 465 if (HasLoGain()) 466 { 467 *fLog << " Lo Gain Range: " << Form("%2d %2d", fLoGainFirst, fLoGainLast) << endl; 468 *fLog << " Saturation Lim: " << Form("%3d", fSaturationLimit) << endl; 469 *fLog << " Num Samples Hi/Lo: " << Form("%2.1f %2.1f", fNumHiGainSamples, fNumLoGainSamples) << endl; 470 } 461 471 if (fPedestals) 462 472 *fLog << " Pedestals: " << fPedestals->GetName() << ", " << fPedestals << endl; -
trunk/MagicSoft/Mars/msignal/MExtractor.h
r8304 r8358 96 96 Byte_t GetSaturationLimit() const { return fSaturationLimit; } 97 97 98 Bool_t HasLoGain() const { return fLoGainFirst>0 || fLoGainLast>0; } 98 99 Bool_t IsNoiseCalculation () const { return fNoiseCalculation; } 99 100
Note:
See TracChangeset
for help on using the changeset viewer.