Changeset 2015 for trunk/MagicSoft/Mars/mhist/MHEnergyTime.cc
- Timestamp:
- 04/28/03 09:52:57 (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhist/MHEnergyTime.cc
r1330 r2015 62 62 // we set the radius range from 0 m to 500 m with 10 m bin --> 50 ybins 63 63 64 65 64 fName = name ? name : "MHEnergyTime"; 66 65 fTitle = title ? title : "Data to Calculate Collection Area"; … … 97 96 // -------------------------------------------------------------------------- 98 97 // 99 // Delete the three histograms100 //101 MHEnergyTime::~MHEnergyTime()102 {103 }104 105 // --------------------------------------------------------------------------106 //107 98 // Fill data into the histogram which contains all showers 108 99 // … … 122 113 void MHEnergyTime::Draw(Option_t* option) 123 114 { 124 if (!gPad)125 MakeDefCanvas(&fHist);115 TVirtualPad *pad = gPad ? gPad : MakeDefCanvas(fHist); 116 pad->SetBorderMode(0); 126 117 118 AppendPad(""); 119 120 pad->SetLogy(); 127 121 fHist.DrawCopy(option); 128 gPad->SetLogy();129 122 130 gPad->Modified(); 131 gPad->Update(); 132 } 133 134 // -------------------------------------------------------------------------- 135 // 136 // Creates a new canvas and draws the histogram into it. 137 // Be careful: The histogram belongs to this object and won't get deleted 138 // together with the canvas. 139 // 140 TObject *MHEnergyTime::DrawClone(Option_t* option) const 141 { 142 TCanvas *c = MakeDefCanvas(&fHist); 143 144 // 145 // This is necessary to get the expected bahviour of DrawClone 146 // 147 gROOT->SetSelectedPad(NULL); 148 149 ((TH2D&)fHist).DrawCopy(option); 150 gPad->SetLogy(); 151 152 c->Modified(); 153 c->Update(); 154 155 return c; 123 pad->Modified(); 124 pad->Update(); 156 125 } 157 126
Note:
See TracChangeset
for help on using the changeset viewer.