Ignore:
Timestamp:
08/05/02 16:12:14 (22 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r1477 r1483  
    3636ClassImp(MBinning);
    3737
     38static const TString gsDefName  = "MBinning";
     39static const TString gsDefTitle = "Container describing the binning of an axis";
     40
    3841// --------------------------------------------------------------------------
    3942//
     
    4649    //   set the name and title of this object
    4750    //
    48     fName  = name  ? name  : "MBinning";
    49     fTitle = title ? title : "Container describing the binning of an axis";
     51    fName  = name  ? name  : gsDefName.Data();
     52    fTitle = title ? title : gsDefTitle.Data();
    5053
    5154    SetEdges(10, 0, 1);
     
    105108void MBinning::StreamPrimitive(ofstream &out) const
    106109{
    107     out << "   MBinning " << ToLower(fName) << "(\"";
    108     out << fName << "\", \"" << fTitle << "\");" << endl;
     110    out << "   MBinning " << GetUniqueName();
     111    if (fName!=gsDefName)
     112    {
     113        out << "(\"" << fName << "\"";
     114        if (fTitle!=gsDefTitle)
     115            out << ", \"" << fTitle << "\"";
     116        out <<")";
     117    }
     118    out << ";" << endl;
    109119
    110120    if (IsDefault())
     
    113123    if (IsLinear() || IsLogarithmic())
    114124    {
    115         out << "   " << ToLower(fName) << ".SetEdges";
     125        out << "   " << GetUniqueName() << ".SetEdges";
    116126        if (IsLogarithmic())
    117127            out << "Log";
     
    124134    for (int i=0; i<GetNumEdges(); i++)
    125135        out << "      dummy[" << i << "]=" << GetEdges()[i] << ";" << endl;
    126     out << "      " << ToLower(fName) << ".SetEdges(dummy);" << endl;
     136    out << "      " << GetUniqueName() << ".SetEdges(dummy);" << endl;
    127137    out << "   }" << endl;
    128138}
Note: See TracChangeset for help on using the changeset viewer.