Changeset 2414 for trunk/MagicSoft/Mars/mhist
- Timestamp:
- 10/20/03 18:33:11 (21 years ago)
- Location:
- trunk/MagicSoft/Mars/mhist
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhist/MFillH.cc
r2206 r2414 324 324 const Ssiz_t length = last-first-1; 325 325 326 // 327 // Make a copy before stripping leading and trailing White Spaces. 328 // 326 329 TString strip = fHName(first+1, length); 327 330 return strip.Strip(TString::kBoth); … … 340 343 return kTRUE; 341 344 342 if (!fH->OverwritesDraw())343 return kTRUE;344 345 345 if (TestBit(kDoNotDisplay)) 346 346 return kTRUE; 347 347 348 const Bool_t dr = fH->OverwritesDraw(); 349 const Bool_t ts = fH->OverwritesDraw(NULL, "TS"); 350 if (!dr && !ts) 351 return kTRUE; 352 353 if (!ts) 354 { 355 *fLog << warn << "You overwrote " << fH->ClassName() << "::"; 356 *fLog << "Draw instead of " << fH->ClassName() << "::DrawTS" << endl; 357 *fLog << "This is not thread safe and might result in trouble using" << endl; 358 *fLog << "multithreaded programs like MONA." << endl; 359 *fLog << "" << endl; 360 return kTRUE; 361 } 362 348 363 fCanvas = &fDisplay->AddTab(fH->GetName()); 349 fH->Draw(); 364 fH->DrawTS(fCanvas); 365 366 return kTRUE; 367 } 368 369 // -------------------------------------------------------------------------- 370 // 371 // 372 Bool_t MFillH::DrawCloneToDisplay() 373 { 374 fH->DrawCloneTS(fCanvas); 375 fCanvas->Modified(); 376 fCanvas->Update(); 350 377 351 378 return kTRUE; … … 506 533 // 507 534 if (fDisplay && fDisplay->HasCanvas(fCanvas)) 508 { 509 fCanvas->cd(); 510 fH->DrawClone("nonew"); 511 fCanvas->Modified(); 512 fCanvas->Update(); 513 } 535 DrawCloneToDisplay(); 514 536 515 537 return kTRUE; -
trunk/MagicSoft/Mars/mhist/MFillH.h
r2206 r2414 44 44 45 45 Bool_t DrawToDisplay(); 46 Bool_t DrawCloneToDisplay(); 46 47 47 48 public: … … 63 64 Int_t PostProcess(); 64 65 66 MH *GetH() { return fH; } 67 TCanvas *GetCanvas() { return fCanvas; } 68 65 69 ClassDef(MFillH, 2) // Task to fill a histogram with data from a parameter container 66 70 }; -
trunk/MagicSoft/Mars/mhist/MHHadronness.cc
r2307 r2414 503 503 gPad->SetBorderMode(0); 504 504 //gStyle->SetOptStat(10); 505 MH::Draw (*fGhness, *fPhness, "Hadronness"); // Displ both stat boxes505 MH::DrawSame(*fGhness, *fPhness, "Hadronness"); // Displ both stat boxes 506 506 507 507 pad->cd(2); -
trunk/MagicSoft/Mars/mhist/MHTriggerLvl0.cc
r2377 r2414 171 171 } 172 172 173 void MHTriggerLvl0::Draw (Option_t *)173 void MHTriggerLvl0::DrawTS(TVirtualPad *p=NULL, Option_t * ="") 174 174 { 175 TVirtualPad *pad = gPad ? gPad: MakeDefCanvas(this);175 TVirtualPad *pad = p ? p : MakeDefCanvas(this); 176 176 pad->SetBorderMode(0); 177 177 178 //----------------------------- 178 179 pad->Divide(1,2); 179 180 180 pad->cd(1); 181 gPad->SetBorderMode(0); 182 gPad->Divide(1,1); 183 gPad->cd(1); 184 gPad->SetBorderMode(0); 185 fSum->Draw(); 181 p = pad->GetPad(1); 182 p->SetBorderMode(0); 183 p->Divide(1,1); 184 p->cd(1); 185 p->SetBorderMode(0); 186 // fSum does not derive from MParContainer 187 MParContainer::DrawTS(fSum, p); 186 188 187 pad->cd(2); 188 gPad->SetBorderMode(0); 189 fSum->Draw("EPhist"); 189 p = pad->GetPad(2); 190 p->SetBorderMode(0); 191 // fSum does not derive from MParContainer 192 MParContainer::DrawTS(fSum, p, "EPhist"); 193 //----------------------------- 194 195 //MParContainer::DrawTS(fSum, p); 190 196 } -
trunk/MagicSoft/Mars/mhist/MHTriggerLvl0.h
r2298 r2414 34 34 TH1 *GetHistByName(const TString name=""); 35 35 36 void Draw(Option_t * =""); 36 //void Draw(Option_t * =""); 37 void DrawTS(TVirtualPad *pad=NULL, Option_t * =""); 37 38 38 39 void PrintOutlayers(Float_t s) const;
Note:
See TracChangeset
for help on using the changeset viewer.