Changeset 3082 for trunk/MagicSoft/Mars/mhist/MHPixVsTime.cc
- Timestamp:
- 02/10/04 16:35:42 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhist/MHPixVsTime.cc
r3043 r3082 68 68 t += " vs Time"; 69 69 70 fGraph .SetName("MCamEvent");71 fGraph .SetTitle(t);70 fGraph->SetName("MCamEvent"); 71 fGraph->SetTitle(t); 72 72 } 73 73 … … 151 151 t = fTime->GetAxisTime(); 152 152 else 153 t = fHeader ? fHeader->GetDAQEvtNumber() : fGraph .GetN();154 155 fGraph .SetPoint(fGraph.GetN(), t, val);153 t = fHeader ? fHeader->GetDAQEvtNumber() : fGraph->GetN(); 154 155 fGraph->SetPoint(fGraph->GetN(), t, val); 156 156 return kTRUE; 157 157 } … … 172 172 TH1 *MHPixVsTime::GetHistByName(const TString name) 173 173 { 174 return fGraph.GetHistogram(); 175 } 176 177 void MHPixVsTime::Draw(Option_t *) 178 { 179 /* 174 return fGraph->GetHistogram(); 175 } 176 177 void MHPixVsTime::Draw(Option_t *opt) 178 { 179 180 if (fGraph->GetN()==0) 181 return; 182 180 183 TVirtualPad *pad = gPad ? gPad : MakeDefCanvas(this); 181 184 pad->SetBorderMode(0); 182 185 183 pad->Divide(2,2); 184 185 pad->cd(1); 186 gPad->SetBorderMode(0); 187 gPad->Divide(1,1); 188 gPad->cd(1); 189 gPad->SetBorderMode(0); 190 fSum->Draw(); 191 192 pad->cd(3); 193 gPad->SetBorderMode(0); 194 fSum->Draw("EPhist"); 186 AppendPad(""); 187 188 TString str(opt); 195 189 196 190 fGraph->GetHistogram()->SetXTitle("Time"); … … 198 192 fGraph->GetHistogram()->GetXaxis()->SetTimeDisplay(1); 199 193 fGraph->GetHistogram()->GetXaxis()->SetLabelSize(0.033); 200 */ 201 } 194 195 fGraph->GetHistogram()->SetYTitle(""); 196 197 if (!str.Contains("A")) 198 str += "A"; 199 if (!str.Contains("P")) 200 str += "P"; 201 202 if (str.Contains("same", TString::kIgnoreCase)) 203 { 204 str.ReplaceAll("same", ""); 205 str.ReplaceAll("A", ""); 206 } 207 208 fGraph->Draw(str); 209 210 pad->Modified(); 211 pad->Update(); 212 213 }
Note:
See TracChangeset
for help on using the changeset viewer.