Ignore:
Timestamp:
02/07/05 15:06:39 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mhbase/MH3.cc

    r5994 r6280  
    505505void MH3::Paint(Option_t *o)
    506506{
    507     /*
    508      *fLog << all << fHist << " " << gPad->GetName() << " ----> Paint " << o << endl;
    509      TListIter Next(gPad->GetListOfPrimitives()); TObject *obj;
    510      while ((obj=Next())) *fLog << obj << " " << obj->GetName() << " " << obj->ClassName() << " " << Next.GetOption() << " " << (int)obj->TestBit(kCanDelete) << endl;
    511      */
    512     /*
    513     TString str(o);
    514 
    515     if (str.Contains("log", TString::kIgnoreCase))
    516     {
    517         if (fHist->TestBit(kIsLogx) && fHist->GetEntries()>0) gPad->SetLogx();
    518         if (fHist->TestBit(kIsLogy) && fHist->GetEntries()>0) gPad->SetLogy();
    519         if (fHist->TestBit(kIsLogz) && fHist->GetEntries()>0) gPad->SetLogz();
    520     }
    521 
    522     if (str.Contains("upd", TString::kIgnoreCase))
    523     {
    524 
    525         // Set pretty color palette
    526         // gStyle->SetPalette(1, 0);
    527 
    528         TProfile* h0;
    529         if ((h0 = (TProfile*)gPad->FindObject(fNameProfX)))
    530             ((TH2*)fHist)->ProfileX(fNameProfX, -1, 9999, "s");
    531         if ((h0 = (TProfile*)gPad->FindObject(fNameProfY)))
    532             ((TH2*)fHist)->ProfileY(fNameProfY, -1, 9999, "s");
    533             }
    534             */
    535 
    536507    fHist->SetFillStyle(4000);
    537508
     
    550521    str.ReplaceAll("profy", "");
    551522
     523    // WARNING: Don't use FindObject directly always use GetListOfPrimitives!!
     524
    552525    // FIXME: We may have to remove all our own options from str!
    553     if (!only && !gPad->FindObject(fHist))
     526    if (!only && !gPad->GetListOfPrimitives()->FindObject(fHist))
    554527        fHist->Draw(str);
    555528
     
    557530    {
    558531        TProfile *p = ((TH2*)fHist)->ProfileX("ProfX", -1, 9999, "s");
    559         if (!gPad->FindObject(p))
     532        if (!gPad->GetListOfPrimitives()->FindObject(p))
    560533        {
    561534            p->UseCurrentStyle();
     
    571544    {
    572545        TProfile *p = ((TH2*)fHist)->ProfileY("ProfY", -1, 9999, "s");
    573         if (!gPad->FindObject(p))
     546        if (!gPad->GetListOfPrimitives()->FindObject(p))
    574547        {
    575548            p->UseCurrentStyle();
Note: See TracChangeset for help on using the changeset viewer.