Ignore:
Timestamp:
04/18/05 10:17:03 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mhbase
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mhbase/MH.cc

    r6890 r6948  
    191191// --------------------------------------------------------------------------
    192192//
     193// Search in gPad for all objects with the name name and remove all of them
     194// (TList::Remove)
     195//
     196void MH::RemoveFromPad(const char *name)
     197{
     198    if (!gPad)
     199        return;
     200
     201    TList *list = gPad->GetListOfPrimitives();
     202    if (!list)
     203        return;
     204
     205    TObject *obj = 0;
     206    while ((obj = gPad->FindObject(name)))
     207        list->Remove(obj);
     208}
     209
     210// --------------------------------------------------------------------------
     211//
    193212// Applies a given binning to a 1D-histogram
    194213//
     
    572591// Tries to find a MBinning container with the name "Binning"+name
    573592// in the given parameter list. If it was found it is applied to the
    574 // given histogram. This is only valid for 1D-histograms
     593// given histogram. This is only valid for 1D-histograms.
     594// If the binning is found, but it IsDefault() kTRUE is returned, but
     595// no binning is applied.
    575596//
    576597Bool_t MH::ApplyBinning(const MParList &plist, TString name, TH1 *h)
     
    588609        return kFALSE;
    589610    }
     611
     612    if (bins->IsDefault())
     613        return kTRUE;
    590614
    591615    SetBinning(h, bins);
  • trunk/MagicSoft/Mars/mhbase/MH.h

    r5994 r6948  
    5757                                  UInt_t w=625, UInt_t h=440,
    5858                                  Bool_t usescreenfactor=kFALSE);
     59
     60    static void RemoveFromPad(const char *name);
    5961
    6062    // FIXME: * --> & !!!
Note: See TracChangeset for help on using the changeset viewer.