Ignore:
Timestamp:
10/29/01 11:35:19 (23 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r986 r1004  
    4141#include <TPaveLabel.h>
    4242
     43#include "MH.h"
     44
    4345ClassImp(MHMcEnergy);
    4446
     
    4951MHMcEnergy::MHMcEnergy(const char *name, const char *title)
    5052{
    51     *fTitle = title ? title : "Container for an energy distribution histogram";
     53    fTitle = title ? title : "Container for an energy distribution histogram";
    5254
    5355    //  - we initialize the histogram
     
    5557    //    root don't allow us to have diferent histograms with the same name
    5658
    57     fHist = new TH1F("", "", 40, 0.5, 4.5);
     59    fHist = new TH1F("", "", 20, 0.5, 4.5);
     60
     61    fHist->SetDirectory(NULL);
    5862    fHist->SetXTitle("log(E/GeV)");
    5963    fHist->SetYTitle("dN/dE");
     
    7781    UInt_t idx = semicolon ? atoi(semicolon+1) : 0;
    7882
    79     *fName = cname;
     83    fName = cname;
    8084
    8185    char text[256];
     
    8690
    8791    char aux[256];
    88     strcpy(aux, "log(E)");
     92    strcpy(aux, "Threshold");
    8993
    9094    if (idx>0)
     
    163167{
    164168    if (!gPad)
    165     {
    166         if (!gROOT->GetMakeDefCanvas())
    167             return;
    168         (gROOT->GetMakeDefCanvas())();
    169     }
    170     //TCanvas *c=new TCanvas(fHist->GetName(), fHist->GetTitle());
     169        MH::MakeDefCanvas(fHist);
    171170
    172171    fHist->Draw(option);
     
    180179TObject *MHMcEnergy::DrawClone(Option_t *option) const
    181180{
    182     TCanvas *c=new TCanvas(fHist->GetName(), fHist->GetTitle());
     181    TCanvas *c = MH::MakeDefCanvas(fHist);
    183182
    184183    //
Note: See TracChangeset for help on using the changeset viewer.