Changeset 4382 for trunk/MagicSoft


Ignore:
Timestamp:
07/14/04 19:49:43 (20 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r4378 r4382  
    4545    - fixed a bug causing a segmentation violation in the destructor
    4646      (array dimension was not respected correctly)
     47
     48  * mcalib/MHGausEvents.cc
     49    - removed an inconsistency in the naming of fHPowerProbability which
     50      can cause a memory leak (I hope, this was the cause of some of the
     51      leaks we had, but I'm not sure).
     52    - removed the setting of fPixId to -1 in the Clear()
    4753
    4854
  • trunk/MagicSoft/Mars/mcalib/MHGausEvents.cc

    r4361 r4382  
    179179
    180180  // delete histograms
    181   if (fHPowerProbability)
    182     delete fHPowerProbability;
     181//  if (fHPowerProbability)
     182//      if (gROOT->FindObject(fHPowerProbability->GetName()))
     183//        delete fHPowerProbability;
    183184 
    184185  // delete fits
     
    226227 
    227228  fCurrentSize       = 0;
    228   fPixId             = -1;
    229229
    230230  if (fHPowerProbability)
    231231    {
    232       delete fHPowerProbability;
    233       fHPowerProbability = NULL;
     232        if (gROOT->FindObject(fHPowerProbability->GetName()))
     233            delete fHPowerProbability;
     234        fHPowerProbability = NULL;
    234235    }
    235236 
     
    324325{
    325326
    326   Float_t *xaxis = new Float_t[n];
     327  Float_t *xaxis = new Float_t[n];  fHPowerProbability->SetDirectory(NULL);
    327328
    328329  if (fEventFrequency)
     
    342343// Create the fourier spectrum using the class MFFT.
    343344// The result is projected into a histogram and fitted by an exponential
    344 //
     345//   fHPowerProbability->SetDirectory(NULL);
    345346void MHGausEvents::CreateFourierSpectrum()
    346347{
     
    386387  fPowerSpectrum     = fourier.PowerSpectrumDensity(&fEvents);
    387388  fHPowerProbability = ProjectArray(*fPowerSpectrum, fPowerProbabilityBins,
    388                                     Form("%s%s","PowerProbability",GetName()),
     389                                    Form("%s%s","PowerProbability",GetName()),
    389390                                    "Probability of Power occurrance");
    390391  fHPowerProbability->SetXTitle("P(f)");
     
    392393  fHPowerProbability->GetYaxis()->CenterTitle();
    393394  fHPowerProbability->SetDirectory(NULL);
     395  fHPowerProbability->SetBit(kCanDelete); 
    394396  //
    395397  // First guesses for the fit (should be as close to reality as possible,
Note: See TracChangeset for help on using the changeset viewer.