Ignore:
Timestamp:
08/06/02 08:49:51 (22 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mhist
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mhist/MBinning.cc

    r1483 r1484  
    3131
    3232#include <fstream.h>
     33
     34#include <TH1.h>        // InheritsFrom
     35
     36#include "MLog.h"
     37#include "MLogManip.h"
    3338
    3439#include "MH.h"
     
    97102void MBinning::Apply(TH1 &h)
    98103{
     104    if (h.InheritsFrom("TH2") || h.InheritsFrom("TH3"))
     105    {
     106        *fLog << warn << "MBinning::Apply: '" << h.GetName() << "' is not a basic TH1 object... no binning applied." << endl;
     107        return;
     108    }
     109
    99110    MH::SetBinning(&h, this);
    100111}
  • trunk/MagicSoft/Mars/mhist/MH.cc

    r1463 r1484  
    366366Bool_t MH::ApplyBinning(const MParList &plist, TString name, TH1 *h)
    367367{
     368    if (h->InheritsFrom(TH2::Class()) || h->InheritsFrom(TH3::Class()))
     369    {
     370        gLog << warn << "MH::ApplyBinning: '" << h->GetName() << "' is not a basic TH1 object... no binning applied." << endl;
     371        return kFALSE;
     372    }
     373
    368374    const MBinning *bins = (MBinning*)plist.FindObject("Binning"+name);
    369375    if (!bins)
Note: See TracChangeset for help on using the changeset viewer.