Changeset 1004 for trunk/MagicSoft/Mars/mhist/MHMcEnergy.cc
- Timestamp:
- 10/29/01 11:35:19 (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhist/MHMcEnergy.cc
r986 r1004 41 41 #include <TPaveLabel.h> 42 42 43 #include "MH.h" 44 43 45 ClassImp(MHMcEnergy); 44 46 … … 49 51 MHMcEnergy::MHMcEnergy(const char *name, const char *title) 50 52 { 51 *fTitle = title ? title : "Container for an energy distribution histogram";53 fTitle = title ? title : "Container for an energy distribution histogram"; 52 54 53 55 // - we initialize the histogram … … 55 57 // root don't allow us to have diferent histograms with the same name 56 58 57 fHist = new TH1F("", "", 40, 0.5, 4.5); 59 fHist = new TH1F("", "", 20, 0.5, 4.5); 60 61 fHist->SetDirectory(NULL); 58 62 fHist->SetXTitle("log(E/GeV)"); 59 63 fHist->SetYTitle("dN/dE"); … … 77 81 UInt_t idx = semicolon ? atoi(semicolon+1) : 0; 78 82 79 *fName = cname;83 fName = cname; 80 84 81 85 char text[256]; … … 86 90 87 91 char aux[256]; 88 strcpy(aux, " log(E)");92 strcpy(aux, "Threshold"); 89 93 90 94 if (idx>0) … … 163 167 { 164 168 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); 171 170 172 171 fHist->Draw(option); … … 180 179 TObject *MHMcEnergy::DrawClone(Option_t *option) const 181 180 { 182 TCanvas *c =new TCanvas(fHist->GetName(), fHist->GetTitle());181 TCanvas *c = MH::MakeDefCanvas(fHist); 183 182 184 183 //
Note:
See TracChangeset
for help on using the changeset viewer.