Changeset 1130 for trunk/MagicSoft


Ignore:
Timestamp:
12/19/01 14:13:31 (23 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r1129 r1130  
    2727     - fix bug of Pedestal and Pedestal fluctuaions correspondence.
    2828
     29 2001/12/19: Thomas Bretz
     30 
     31   * mbase/MEvtLoop.cc:
     32     - added #ifdef directive to make it work on older root also
     33     
     34   * mbase/MReadTree.cc:
     35     - added #ifdef directive to get rid of the memory leak in prior
     36       root 3.02/* versions
     37
     38
     39     
    2940 2001/12/18: Thomas Bretz
    3041 
  • trunk/MagicSoft/Mars/manalysis/MMcPedestalNSBAdd.cc

    r1125 r1130  
    180180    pedestals->InitSize(num);
    181181
    182     MGeomPix &pixgeom0 = (*geometry)[0];
    183     const Float_t size0   = pixgeom0.GetR()*pixgeom0.GetR();
     182    const Float_t size0 = (*geometry)[0].GetR()*(*geometry)[0].GetR();
    184183
    185184    for (int i=0; i<num; i++)
     
    188187        MGeomPix     &pixgeom = (*geometry)[i];
    189188
    190         const Float_t pedrms = pix.GetSigma();
    191         const Float_t size   = pixgeom.GetR()*pixgeom.GetR()/size0;
     189        const Float_t pedrms  = pix.GetSigma();
     190        const Float_t size    = pixgeom.GetR()*pixgeom.GetR()/size0;
    192191
    193         pix.SetSigma(sqrt(pedrms*pedrms+fDnsbPixel*fadc->GetAmplitud()*fadc->GetAmplitud()*size));
     192        const Float_t ampl    = fadc->GetAmplitud();
     193
     194        pix.SetSigma(sqrt(pedrms*pedrms + fDnsbPixel*ampl*ampl*size));
    194195    }
    195196
  • trunk/MagicSoft/Mars/mbase/MEvtLoop.cc

    r1115 r1130  
    190190            {
    191191                fProgress->SetPosition(++dummy);
     192#if ROOT_VERSION_CODE < ROOT_VERSION(3,02,06)
     193                gSystem->ProcessEvents();
     194#else
    192195                gClient->ProcessEventsFor(fProgress);
     196#endif
    193197            }
    194198        else
     
    200204            {
    201205                fProgress->SetPosition(maxcnt - dummy);
     206#if ROOT_VERSION_CODE < ROOT_VERSION(3,02,06)
     207                gSystem->ProcessEvents();
     208#else
    202209                gClient->ProcessEventsFor(fProgress);
     210#endif
    203211            }
    204212        else
  • trunk/MagicSoft/Mars/mbase/MReadTree.cc

    r1116 r1130  
    565565//  If the end of the file is reached the Eventloop is stopped.
    566566//
     567#if ROOT_VERSION_CODE < ROOT_VERSION(3,02,06)
     568#include "../mraw/MRawEvtData.h"
     569#endif
    567570Bool_t MReadTree::Process()
    568571{
     
    573576    if (fNumEntry >= fNumEntries)
    574577        return kFALSE;
     578
     579#if ROOT_VERSION_CODE < ROOT_VERSION(3,02,06)
     580    //
     581    // This fixes 99.9% of a memory leak using a root version prior
     582    // to 3.02/??
     583    //
     584    TChainElement *element=NULL;
     585    TIter Next(fChain->GetStatus());
     586    while ((element=(TChainElement*)Next()))
     587    {
     588        MParContainer **c = (MParContainer**)element->GetBaddress();
     589        if (!c) continue;
     590        if ((*c)->InheritsFrom(MRawEvtData::Class()))
     591            ((MRawEvtData*)(*c))->DeletePixels(kFALSE);
     592
     593    }
     594#endif
    575595
    576596    Bool_t rc = fChain->GetEntry(fNumEntry++) != 0;
Note: See TracChangeset for help on using the changeset viewer.