Ignore:
Timestamp:
09/05/07 20:36:37 (17 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mpedestal/MExtractPedestal.cc

    r8633 r8741  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: MExtractPedestal.cc,v 1.34 2007-07-14 00:02:24 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: MExtractPedestal.cc,v 1.35 2007-09-05 19:36:36 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    350350    const UInt_t num = fRunHeader->GetNumSamplesHiGain()+fRunHeader->GetNumSamplesLoGain();
    351351
     352    // Check upper bound for check window
    352353    if (fCheckWinLast >= num)
    353354    {
    354         *fLog << "CheckWindow [" << fCheckWinFirst << "," << fCheckWinLast;
     355        *fLog << inf << "CheckWindow [" << fCheckWinFirst << "," << fCheckWinLast;
    355356        *fLog << "] out of range [0," << num-1 << "]... ";
    356357        *fLog << "reset upper edge." << endl;
     
    359360    }
    360361
    361     if (offset+fExtractWinLast >= num)
    362     {
    363         *fLog << "ExtractWindow [" << fExtractWinFirst+offset << "," << fExtractWinLast+offset;
     362    // Now check lower bound for check window
     363    if (fCheckWinFirst>fCheckWinLast)
     364    {
     365        *fLog << err << "CheckWindow first slice " << fCheckWinFirst;
     366        *fLog << " greater than last slice " << fCheckWinLast;
     367        *fLog << "... reset to 0." << endl;
     368
     369        fCheckWinFirst = 0;
     370    }
     371
     372    // check upper bound for extaction window
     373    if (fExtractWinLast+offset >= num)
     374    {
     375        *fLog << inf << "ExtractWindow [" << fExtractWinFirst+offset << "," << fExtractWinLast+offset;
    364376        *fLog << "] out of range [0," << num-1 << "]... ";
    365377        *fLog << "reset upper edge." << endl;
     
    368380    }
    369381
     382    // Now check lower bound for check window
     383    if (fExtractWinFirst>fExtractWinLast)
     384    {
     385        *fLog << err << "ExtractionWindow first slice " << fExtractWinFirst+offset;
     386        *fLog << " greater than last slice " << fExtractWinLast+offset;
     387        *fLog << "... reset to 0." << endl;
     388
     389        fExtractWinFirst = 0;
     390    }
     391
     392    // Calculate window size for extraction window
    370393    fExtractWinSize = fExtractWinLast-fExtractWinFirst+1;
    371394
     395    // Check if use tries to do a fundamental pedestal extraction
     396    // with an odd number of slices
    372397    if (fExtractor || TMath::Even(fExtractWinSize))
    373398        return;
    374399
     400    // Make sure the number of extracted slices is even
    375401    fExtractWinLast += offset+fExtractWinLast==num-1 ? -1 : +1;
    376402
    377     *fLog << "ExtractionWindow odd... set to [";
     403    *fLog << inf << "ExtractionWindow odd... set to [";
    378404    *fLog << fExtractWinFirst+offset << "," << fExtractWinLast+offset << "]" << endl;
    379405
Note: See TracChangeset for help on using the changeset viewer.