Changeset 3987 for trunk/MagicSoft/Mars


Ignore:
Timestamp:
05/05/04 18:39:50 (21 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r3982 r3987  
    2020
    2121 2004/05/05: Markus Gaug
     22
     23   * mpedestal/MPedCalcPedRun.cc
     24     - fixed a small inconsistency in case that the range goes out of
     25       the high-gain samples and reaches into the low-gain samples. In
     26       that case, the last slice of the high-gain was not taken (but the
     27       window size correctly)
    2228 
    2329   * mjobs/MJExtractCalibTest.[h,cc]
  • trunk/MagicSoft/Mars/mpedestal/MPedCalcPedRun.cc

    r3931 r3987  
    332332{
    333333 
    334   Int_t lastdesired   = (Int_t)fHiGainLast;
    335   Int_t lastavailable = (Int_t)fRunHeader->GetNumSamplesHiGain()-1;
    336  
    337   if (lastdesired > lastavailable)
    338     {
    339       const Int_t diff = lastdesired - lastavailable;
    340       *fLog << endl;
    341       *fLog << warn << GetDescriptor()
    342             << Form("%s%2i%s%2i%s%2i%s",": Selected Hi Gain FADC Window [",
    343                     (int)fHiGainFirst,",",lastdesired,
    344                     "] ranges out of the available limits: [0,",lastavailable,"].") << endl;
    345       *fLog << GetDescriptor() << ": Will reduce the upper edge to " << (int)(fHiGainLast - diff) << endl;
    346       SetRange(fHiGainFirst, fHiGainLast-diff, fLoGainFirst, fLoGainLast);
    347     }
    348  
    349   lastdesired   = (Int_t)(fLoGainLast);
    350   lastavailable = (Int_t)fRunHeader->GetNumSamplesLoGain()-1;
     334  Int_t lastdesired   = (Int_t)(fLoGainLast);
     335  Int_t lastavailable = (Int_t)fRunHeader->GetNumSamplesLoGain()-1;
    351336 
    352337  if (lastdesired > lastavailable)
     
    361346      SetRange(fHiGainFirst, fHiGainLast, fLoGainFirst, fLoGainLast-diff);
    362347    }
     348
     349  lastdesired   = (Int_t)fHiGainLast;
     350  lastavailable = (Int_t)fRunHeader->GetNumSamplesHiGain()-1;
     351 
     352  if (lastdesired > lastavailable)
     353    {
     354      const Int_t diff = lastdesired - lastavailable;
     355      *fLog << endl;
     356      *fLog << warn << GetDescriptor()
     357            << Form("%s%2i%s%2i%s%2i%s",": Selected Hi Gain Range [",
     358                    (int)fHiGainFirst,",",lastdesired,
     359                    "] ranges out of the available limits: [0,",lastavailable,"].") << endl;
     360      *fLog << warn << GetDescriptor()
     361            << Form("%s%2i%s",": Will possibly use ",diff," samples from the Low-Gain for the High-Gain range")
     362            << endl;
     363      fHiGainLast -= diff;
     364      fHiLoLast    = diff;
     365    }
     366
     367  lastdesired   = (Int_t)fHiGainFirst+fWindowSizeHiGain-1;
     368  lastavailable = (Int_t)fRunHeader->GetNumSamplesHiGain()-1;
     369 
     370  if (lastdesired > lastavailable)
     371    {
     372      const Int_t diff = lastdesired - lastavailable;
     373      *fLog << endl;
     374      *fLog << warn << GetDescriptor()
     375            << Form("%s%2i%s%2i%s",": Selected Hi Gain FADC Window size ",
     376                    (int)fWindowSizeHiGain,
     377                    " ranges out of the available limits: [0,",lastavailable,"].") << endl;
     378      *fLog << warn << GetDescriptor()
     379            << Form("%s%2i%s",": Will use ",diff," samples from the Low-Gain for the High-Gain extraction")
     380            << endl;
     381      fWindowSizeHiGain -= diff;
     382      fWindowSizeLoGain += diff;
     383    }
     384
    363385
    364386  Int_t npixels  = fPedestals->GetSize();
Note: See TracChangeset for help on using the changeset viewer.