Ignore:
Timestamp:
03/05/07 15:55:08 (18 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r8357 r8371  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: MExtractPedestal.cc,v 1.27 2007-03-03 22:27:50 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: MExtractPedestal.cc,v 1.28 2007-03-05 15:54:55 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    401401  fRawEvt = (MRawEvtData*)pList->FindObject(AddSerialNumber(fNameRawEvtData));
    402402  if (!fRawEvt)
    403       if (!fUseSpecialPixels)
    404       {
    405           *fLog << err << AddSerialNumber(fNameRawEvtData) << " not found... aborting." << endl;
    406           return kFALSE;
    407       }
    408 
    409 
    410   fRawEvt = (MRawEvtData*)pList->FindObject(AddSerialNumber("MRawEvtData"));
    411   if (!fRawEvt)
    412403  {
    413       *fLog << err << AddSerialNumber("MRawEvtData") << " not found... aborting." << endl;
     404      *fLog << err << AddSerialNumber(fNameRawEvtData) << " not found... aborting." << endl;
    414405      return kFALSE;
    415406  }
    416  
     407
    417408  fRunHeader = (MRawRunHeader*)pList->FindObject(AddSerialNumber("MRawRunHeader"));
    418409  if (!fRunHeader)
     
    581572
    582573        SetRangeFromExtractor(*fExtractor);
    583         /*
    584         // If an extractor is set determin the window size automatically!
    585         fExtractWinFirst = fExtractor->GetHiGainFirst();
    586         fExtractWinLast  = fExtractor->GetHiGainLast();
    587 
    588         if (!fExtractor->HasLoGain())
    589         {
    590             fCheckWinFirst=fExtractWinFirst;
    591             fCheckWinLast =fExtractWinLast;
    592         }*/
     574
    593575        // fSignal->GetNumSamples() not yet initialized!!!
    594         const UInt_t num = fRunHeader->GetNumSamplesHiGain()+fRunHeader->GetNumSamplesLoGain();
     576        const UInt_t num = fRunHeader->GetNumSamples();
    595577        if (fExtractWinLast >= num)
    596578        {
    597             *fLog << err << GetDescriptor();
    598             *fLog << " - ERROR: Selected fExtractWinLast " << fExtractWinLast;
     579            *fLog << err;
     580            *fLog << "ERROR - Selected fExtractWinLast " << fExtractWinLast;
    599581            *fLog << " out of range (>=" << num<< ")." << endl;
    600582            return kFALSE;
    601583        }
    602584    }
     585    else
     586        if (fRunHeader->GetNumSamplesLoGain()==0 && (fCheckWinFirst!=0 || fCheckWinLast!=0))
     587        {
     588            *fLog << inf << "Data has no lo-gains... resetting check window to extraction window." << endl;
     589            SetCheckRange(fExtractWinFirst, fExtractWinLast);
     590        }
    603591
    604592    //CheckExtractionWindow();
Note: See TracChangeset for help on using the changeset viewer.