Ignore:
Timestamp:
01/11/05 16:46:58 (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/MBinning.cc

    r4966 r5803  
    4848#include "MLogManip.h"
    4949
     50#include "MParList.h"
     51
    5052#include "MH.h"
    5153
     
    8587
    8688    SetEdges(nbins, lo, hi, opt);
     89}
     90
     91// --------------------------------------------------------------------------
     92//
     93// Search in the parameter list for the binning with name "name". If found,
     94// set the edges and title accordingly. Default is name of object.
     95// return kTRUE if object found, kFALSE otherwise.
     96//
     97Bool_t MBinning::SetEdges(const MParList &list, const char *name)
     98{
     99    MBinning *bins = (MBinning*)list.FindObject(name ? name : fName.Data(), "MBinning");
     100    if (!bins)
     101        return kFALSE;
     102
     103    SetEdges(*bins);
     104    return kTRUE;
    87105}
    88106
  • trunk/MagicSoft/Mars/mhbase/MBinning.h

    r5692 r5803  
    1212class TH1;
    1313class TAxis;
     14
     15class MParList;
    1416
    1517class MBinning : public MParContainer
     
    5254    }
    5355
     56    Bool_t SetEdges(const MParList &list, const char *name=0);
    5457    void SetEdges(const TAxis &axe);
    55     void SetEdges(const MBinning &bins) { SetEdges(bins.fEdges); fType = bins.fType; }
     58    void SetEdges(const MBinning &bins) { SetEdges(bins.fEdges); fType = bins.fType; fTitle = bins.fTitle; }
    5659    void SetEdges(const TH1 &h, const Char_t axis='x');
    5760    void SetEdges(const Int_t nbins, const Axis_t lo, Axis_t up);
Note: See TracChangeset for help on using the changeset viewer.