Changeset 8633 for trunk


Ignore:
Timestamp:
07/14/07 01:07:05 (17 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r8632 r8633  
    1818
    1919                                                 -*-*- END OF LINE -*-*-
     20
     21
     22 2007/07/14 Thomas Bretz
     23
     24   * mpedestal/MPedestalSubtract.[h,cc]:
     25     - fixed the buggy Memcpy function introduced with the last change
     26       07/06/17 ;( This bug was effecting the old FADC data only, the
     27       MUX data were (by chance) correctly copied
     28
     29   * mpedestal/MExtractPedestal.cc:
     30     - some cosmetics
     31
     32  * mfilter/MFMagicCuts.cc:
     33     - changed some comments
     34
     35   * mjobs/MJCut.cc:
     36     - some cosmetics. Simplified the setting of the scale factor
     37
    2038
    2139
  • trunk/MagicSoft/Mars/mfilter/MFMagicCuts.cc

    r8624 r8633  
    368368    const Double_t slope  = fMatrix ? GetVal(kESlope)   : fHilExt->GetSlopeLong()/TMath::Sign(fMm2Deg, fHilSrc->GetCosDeltaAlpha());
    369369
    370         // Do Ghostbusting with slope and m3l
     370    // Do Ghostbusting with slope and m3l
    371371    const Double_t sign1 = (dist-c[9])*c[8]-slope;
    372372    const Double_t sign2 = m3long-c[5];
     373
     374    // Calculate disp including sign
    373375    const Double_t p = sign1<0 || sign2<0 ? -disp : disp;
    374376
  • trunk/MagicSoft/Mars/mjobs/MJCut.cc

    r8618 r8633  
    635635    plist.AddToList(&fit);
    636636    if (set.IsWobbleMode())
    637     {
    638         fit.SetScaleMode(MAlphaFitter::kNone);
    639         fit.SetScaleUser(1./fNumOffSourcePos);
    640     }
     637        fit.SetScaleUser(1./fNumOffSourcePos); // includes fit.SetScaleMode(MAlphaFitter::kUserScale);
    641638
    642639    MHAlpha *halphaoff = CreateNewHist(plist, "Off");
  • trunk/MagicSoft/Mars/mpedestal/MExtractPedestal.cc

    r8582 r8633  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: MExtractPedestal.cc,v 1.33 2007-06-19 09:25:39 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: MExtractPedestal.cc,v 1.34 2007-07-14 00:02:24 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    714714        CalcSums(pixel, offset, ab[0], ab[1]);
    715715
    716     fNumEventsUsed[idx]++;
    717 
    718716    if (fIntermediateStorage)
    719717        (*fPedestalsInter)[idx].Set(sum, 0, 0, fNumEventsUsed[idx]);
     
    723721    fSumx[idx]  += sum;
    724722    fSumx2[idx] += sqrsum;
     723
     724    fNumEventsUsed[idx]++;
    725725
    726726    if (!fExtractor && pixel.IsABFlagValid())
  • trunk/MagicSoft/Mars/mpedestal/MPedestalSubtract.cc

    r8571 r8633  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: MPedestalSubtract.cc,v 1.7 2007-06-17 14:51:55 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: MPedestalSubtract.cc,v 1.8 2007-07-14 00:02:24 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    129129}
    130130
    131 void MPedestalSubtract::Memcpy(void *dest, Int_t offset, void *src, Int_t cnt) const
     131void MPedestalSubtract::Memcpy(void *dest, void *src, Int_t cnt) const
    132132{
    133133    if (fRawEvt->GetNumBytesPerSample()==2)
    134         memcpy((UShort_t*)dest+offset, src, cnt*2);
     134        memcpy((UShort_t*)dest, src, cnt*2);
    135135    else
    136136    {
    137         const Byte_t *b = (Byte_t*)src+offset;
     137        const Byte_t *b = (Byte_t*)src;
    138138        for (USample_t *ptr=(USample_t*)dest; ptr<(USample_t*)dest+cnt; ptr++)
    139139            *ptr = *b++;
     
    171171
    172172        // copy hi- and lo-gains samples together
    173         Memcpy(sample, 0,    pixel.GetHiGainSamples(), numh);
    174         Memcpy(sample, numh, pixel.GetLoGainSamples(), numl);
     173        Memcpy(sample,      pixel.GetHiGainSamples(), numh);
     174        Memcpy(sample+numh, pixel.GetLoGainSamples(), numl);
    175175
    176176        // start of destination array, end of hi-gain destination array
  • trunk/MagicSoft/Mars/mpedestal/MPedestalSubtract.h

    r8565 r8633  
    2626    Int_t  Process();
    2727
    28     void Memcpy(void *sample, Int_t offset, void *ptr, Int_t cnt) const;
     28    void Memcpy(void *sample, void *ptr, Int_t cnt) const;
    2929
    3030public:
Note: See TracChangeset for help on using the changeset viewer.