Changeset 1484 for trunk


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

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r1483 r1484  
    11                                                                  -*-*- END -*-*-
     2
     3 2002/08/06: Thomas Bretz
     4
     5   * mhist/MHHillas.cc:
     6     - fixed setting of binning for fCamera
     7
     8   * mhist/MH.cc, mhist/MBinning.cc:
     9     - added sanity check in ApplyBinning and Apply
     10
     11
    212
    313 2002/08/05: Thomas Bretz
  • 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.