Ignore:
Timestamp:
09/26/06 11:45:32 (18 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mhvstime
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mhvstime/MHPixVsTime.cc

    r7091 r7971  
    224224    TString str(opt);
    225225
     226    // This is not done automatically anymore since root 5.12/00
     227    // and it is necessary to force a proper update of the axis.
    226228    TH1 *h = fGraph->GetHistogram();
     229    if (h)
     230    {
     231        delete h;
     232        fGraph->SetHistogram(0);
     233        h = fGraph->GetHistogram();
     234    }
    227235
    228236    h->SetXTitle("Time");
  • trunk/MagicSoft/Mars/mhvstime/MHSectorVsTime.cc

    r7841 r7971  
    291291    }
    292292
     293    // This is not done automatically anymore since root 5.12/00
     294    // and it is necessary to force a proper update of the axis.
    293295    TH1 *h = fGraph->GetHistogram();
     296    if (h)
     297    {
     298        delete h;
     299        fGraph->SetHistogram(0);
     300        h = fGraph->GetHistogram();
     301    }
    294302
    295303    h->SetXTitle("Time");
  • trunk/MagicSoft/Mars/mhvstime/MHVsTime.cc

    r7842 r7971  
    264264     while ((obj=Next())) *fLog << obj << " " << obj->GetName() << " " << obj->ClassName() << " " << Next.GetOption() << endl;
    265265     */
    266 
    267266    if (!fGraph)
    268267        return;
     
    284283    }
    285284
    286     // SetPoint deletes the histogram!
    287     if (fUseEventNumber)
    288         fGraph->GetHistogram()->SetXTitle("Event Number");
    289     else
    290     {
    291         fGraph->GetHistogram()->SetXTitle("Time");
    292         fGraph->GetHistogram()->GetXaxis()->SetLabelSize(0.033);
    293         fGraph->GetHistogram()->GetXaxis()->SetTimeFormat("%H:%M %F1995-01-01 00:00:00 GMT");
    294         fGraph->GetHistogram()->GetXaxis()->SetTimeDisplay(1);
     285    // This is not done automatically anymore since root 5.12/00
     286    // and it is necessary to force a proper update of the axis.
     287    TH1 *h = fGraph->GetHistogram();
     288    if (h)
     289    {
     290        delete h;
     291        fGraph->SetHistogram(0);
     292        h = fGraph->GetHistogram();
     293    }
     294    if (h)
     295    {
     296        TAxis *axe = h->GetXaxis();
     297        // SetPoint deletes the histogram!
     298        if (fUseEventNumber)
     299            axe->SetTitle("Event Number");
     300        else
     301        {
     302            axe->SetTitle("Time");
     303            axe->SetLabelSize(0.033);
     304            axe->SetTimeFormat("%H:%M %F1995-01-01 00:00:00 GMT");
     305            axe->SetTimeDisplay(1);
     306        }
    295307    }
    296308
     
    300312    // This is a workaround if the TGraph has only one point.
    301313    // Otherwise MStatusDisplay::Update hangs.
    302     gPad->GetListOfPrimitives()->Remove(fGraph);
    303     fGraph->Draw(fGraph->GetN()<2 ? "A" : str.Data());
     314//    gPad->GetListOfPrimitives()->Remove(fGraph);
     315//    fGraph->Draw(fGraph->GetN()<2 ? "A" : str.Data());
    304316    //gPad->GetListOfPrimitives()->Add(fGraph, fGraph->GetN()<2 ? "A" : opt);
    305317    //    AppendPad(str);
     
    319331    pad->SetBorderMode(0);
    320332    AppendPad(opt);
     333
     334    fGraph->Draw("A");
    321335}
    322336
Note: See TracChangeset for help on using the changeset viewer.