Changeset 5204 for trunk/MagicSoft/Mars


Ignore:
Timestamp:
10/08/04 00:14:54 (20 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r5201 r5204  
    2626      MHCalibrationChargeCam which behaved fine until now.
    2727
     28  * mpedestal/MPedCalcFromLoGain.cc
     29    - fixed the case that a window size of 1. is handed over which
     30      previously set the window size to the next smaller even number,
     31      which is 0. Now, it sets it to 2. This makes this class usable
     32      together with the amplitude spline.
     33       
    2834
    2935 2004/10/06: Hendrik Bartko
  • trunk/MagicSoft/Mars/mpedestal/MPedCalcFromLoGain.cc

    r5030 r5204  
    268268void MPedCalcFromLoGain::SetWindowSize(Byte_t windowh, Byte_t windowl)
    269269{
     270
    270271    fWindowSizeHiGain = windowh & ~1;
    271272    fWindowSizeLoGain = windowl & ~1;
     
    284285        *fLog << int(fWindowSizeLoGain) << " samples " << endl;
    285286    }
    286      
     287
     288    if (fWindowSizeHiGain == 0)
     289    {
     290        *fLog << warn;
     291        *fLog << GetDescriptor() << ": HiGain window currently set to 0, will set it to 2 samples ";
     292        fWindowSizeHiGain = 2;
     293    }
     294   
     295    if (fWindowSizeLoGain == 0)
     296    {
     297        *fLog << warn;
     298        *fLog << GetDescriptor() << ": LoGain window currently set to 0, will set it to 2 samples ";
     299        fWindowSizeLoGain = 2;
     300    }
     301   
    287302    const Byte_t availhirange = (fHiGainLast-fHiGainFirst+1) & ~1;
    288303    const Byte_t availlorange = (fLoGainLast-fLoGainFirst+1) & ~1;
     
    431446    if (fWindowSizeLoGain==0)
    432447    {
    433         *fLog << err << "ERROR - HiGain windows size == 0... abort." << endl;
     448        *fLog << err << "ERROR - LoGain windows size == 0... abort." << endl;
    434449        return kFALSE;
    435450    }
     
    564579
    565580    if (fPedestalUpdate)
    566     {
    567         //fPedestals->ReCalc(*fGeom);
    568         fPedestals->SetReadyToSave();
    569     }
     581      fPedestals->SetReadyToSave();
    570582
    571583    return kTRUE;
     
    598610
    599611    fPedestals->SetTotalEntries((UInt_t)(sum/npix*(fWindowSizeLoGain+fWindowSizeHiGain)));
     612    fPedestals->SetReadyToSave();
    600613    fPedestals->ReCalc(*fGeom);
    601     fPedestals->SetReadyToSave();
    602614    return kTRUE;
    603615}
  • trunk/MagicSoft/Mars/mpedestal/MPedCalcPedRun.cc

    r4629 r5204  
    237237          << int(fWindowSizeLoGain) << " samples " << endl;
    238238   
     239
     240    if (fWindowSizeHiGain == 0)
     241    {
     242        *fLog << warn;
     243        *fLog << GetDescriptor() << ": HiGain window currently set to 0, will set it to 2 samples ";
     244        fWindowSizeHiGain = 2;
     245    }
     246   
     247    if (fWindowSizeLoGain == 0)
     248    {
     249        *fLog << warn;
     250        *fLog << GetDescriptor() << ": LoGain window currently set to 0, will set it to 2 samples ";
     251        fWindowSizeLoGain = 2;
     252    }
     253
    239254  const Byte_t availhirange = (fHiGainLast-fHiGainFirst+1) & ~1;
    240255  const Byte_t availlorange = (fLoGainLast-fLoGainFirst+1) & ~1;
Note: See TracChangeset for help on using the changeset viewer.