Ignore:
Timestamp:
12/21/08 18:09:49 (16 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mbase/MStatusDisplay.cc

    r9185 r9195  
    6262
    6363#include <errno.h>
     64#include <stdlib.h>               // mktemp (Ubunto 8.10)
    6465
    6566#include <fstream>                // fstream
     
    110111#include "MParContainer.h"        // MParContainer::GetDescriptor
    111112#include "MStatusArray.h"         // MStatusArray
     113
     114#if ROOT_VERSION_CODE <= ROOT_VERSION(5,22,00)
     115#include "../mhbase/MH.h"
     116#endif
    112117
    113118#undef DEBUG
     
    10401045
    10411046    if (gPad)
     1047    {
     1048        // Find the object which will get picked by the GetObjectInfo
     1049        // due to buffer overflows in many root-versions
     1050        // in TH1 and TProfile we have to work around and implement
     1051        // our own GetObjectInfo which make everything a bit more
     1052        // complicated.
     1053#if ROOT_VERSION_CODE > ROOT_VERSION(5,22,00)
    10421054        SetStatusLine2(selected->GetObjectInfo(px,py));
     1055#else
     1056        TObjLink *link=0;
     1057        static_cast<TPad*>(gPad)->Pick(px, py, link);
     1058
     1059        const TObject *o = link ? link->GetObject() : 0;
     1060        if (o)
     1061            SetStatusLine2(MH::GetObjectInfo(px, py, *o));
     1062#endif
     1063    }
    10431064
    10441065    gPad=save;
     
    11191140    c.Connect("ProcessedEvent(Int_t,Int_t,Int_t,TObject*)",
    11201141              "MStatusDisplay", this, "EventInfo(Int_t,Int_t,Int_t,TObject*)");
     1142
     1143    // Make sure that root itself doesn't try to call GetObjectInfo
     1144    // This is now handled from EventsInfo. This is necessary
     1145    // due to the buffer overflow bug in GetObjectInfo of
     1146    // TProfile and TH1
     1147    c.ResetBit(TCanvas::kShowEventStatus);
    11211148
    11221149    // Remove the canvas from the global list to make sure it is
Note: See TracChangeset for help on using the changeset viewer.