Tree Viewer Draw Error


I may have stumbled upon some form of strange bug (I can’t find any reference to it using the search function on the forum).

I’m using the TreeViewer to look at data I’ve collected and there is one certain plot that doesn’t draw correctly. I will attach an image below. When I ask it to draw one of the branches, it “blanks” part of the image. In the screenshot below, it didn’t draw the bottom half of the image. However, if I resize the bins and draw a different section of the branch, it may “blank” the top or have three or four “blank strips” down the middle of the plot… but it will still show the top and bottom of the plot. It’s very inconsistent in what part it “blanks.” Across all of my resizing, I have seen all of the data points and know that the data has processed correctly because it had been drawn at some point during my resizing. Also, it is only this plot, the rest of my branches came out fine.

Any information would be great,


EDIT: Also, since I’m starting a new thread. Is it possible to set the default draw/viewer style to something other than “default.” I’ve found reference on here to a “rootlogon.C” but haven’t located it within my installation which is newer than the one that was being discussed when the “rootlogon.C” solution was offered.

I do not understand how you can get this picture. Which version of ROOT are you using?

Concerning the TreeViewer option, you can set the draw option in the option box at the top of the viewer.
There is currently no way to specify this option at login time.


Hi Rene,

I am using Root 5.26. I still have been unable to resolve the drawing issue but it seems to be ONLY this plot and ONLY from this data run. Everything else is working fine. I can’t find what is triggering the issue at all.



EDIT: I just found another set of data behaving the same way. And after further inspection, almost all of my new data is doing the same thing. Image below:

Could you post the canvas.root file ?



I’ve searched my system and don’t see a “canvas.root” file. I have TCanvas.h, TCanvas.d, TCanvas.o,Canvas.C, TQCanvas.h and some other similar files. Most of these I’m assuming are header and execution files; but I’m also very new to this.Which file do you need? Sorry for all the inconvenience.

Is it just TRootCanvas.h? That seems most likely (even though its just the header file) so I will post the contents of that for now:

[code]#ifndef ROOT_TCanvasImp
#include “TCanvasImp.h”
#ifndef ROOT_TGFrame
#include “TGFrame.h”

class TGCanvas;
class TGMenuBar;
class TGPopupMenu;
class TGLayoutHints;
class TGStatusBar;
class TRootContainer;
class TGToolBar;
class TGHorizontal3DLine;
class TGVertical3DLine;
class TVirtualPadEditor;
class TGDockableFrame;
class TGDNDManager;
class TGToolTip;

class TRootCanvas : public TGMainFrame, public TCanvasImp {

friend class TRootContainer;

TGCanvas *fCanvasWindow; // canvas widget
TRootContainer *fCanvasContainer; // container in canvas widget
TGMenuBar *fMenuBar; // menubar
TGPopupMenu *fFileMenu; // file menu
TGPopupMenu *fFileSaveMenu; // save cascade submenu
TGPopupMenu *fEditMenu; // edit menu
TGPopupMenu *fEditClearMenu; // clear cascade submenu
TGPopupMenu *fViewMenu; // view menu
TGPopupMenu *fViewWithMenu; // view with… cascade submenu
TGPopupMenu *fOptionMenu; // option menu
TGPopupMenu *fToolsMenu; // tools menu
TGPopupMenu *fHelpMenu; // help menu
TGLayoutHints *fMenuBarLayout; // menubar layout hints
TGLayoutHints *fMenuBarItemLayout; // layout hints for menu in menubar
TGLayoutHints *fMenuBarHelpLayout; // layout hint for help menu in menubar
TGLayoutHints *fCanvasLayout; // layout for canvas widget
TGStatusBar *fStatusBar; // statusbar widget
TGLayoutHints *fStatusBarLayout; // layout hints for statusbar

TGCompositeFrame *fEditorFrame; // side frame for current pad editor
TGLayoutHints *fEditorLayout; // layout for editor frame
TGCompositeFrame *fMainFrame; // main frame containing canvas and side frame
TGLayoutHints *fToolBarLayout; // layout for toolbar widget
TGToolBar *fToolBar; // icon button toolbar
TGHorizontal3DLine *fToolBarSep; // toolbar separator
TGLayoutHints *fMainFrameLayout; // layout for main frame
TGVertical3DLine *fVertical1; // toolbar vertical separator
TGVertical3DLine *fVertical2; // toolbar vertical separator
TGHorizontal3DLine *fHorizontal1; // toolbar sepatator
TGLayoutHints *fVertical1Layout; // layout hints for separator
TGLayoutHints *fVertical2Layout; // layout hints for separator
TGLayoutHints *fHorizontal1Layout; // layout hints for separator
TGDockableFrame *fToolDock; // dockable frame holding the toolbar
TGLayoutHints *fDockLayout; // layout hints for dockable frame widget
const TGPicture *fIconPic; // icon picture
TGToolTip *fToolTip; // tooltip for object info

TVirtualPadEditor *fEditor; // pointer to currently loaded pad editor
Int_t fCanvasID; // index in fWindows array of TGX11
Bool_t fAutoFit; // when true canvas container keeps same size as canvas
Int_t fButton; // currently pressed button

TRootCanvas(const TRootCanvas&); // Not implemented
TRootCanvas& operator=(const TRootCanvas&); // Not implemented
void CreateCanvas(const char *name);
void CreateEditor();

Bool_t HandleContainerButton(Event_t *ev);
Bool_t HandleContainerDoubleClick(Event_t *ev);
Bool_t HandleContainerConfigure(Event_t *ev);
Bool_t HandleContainerKey(Event_t *ev);
Bool_t HandleContainerMotion(Event_t *ev);
Bool_t HandleContainerExpose(Event_t *ev);
Bool_t HandleContainerCrossing(Event_t *ev);

Bool_t HandleDNDDrop(TDNDData *data);
Atom_t HandleDNDPosition(Int_t x, Int_t y, Atom_t action,
Int_t xroot, Int_t yroot);
Atom_t HandleDNDEnter(Atom_t * typelist);
Bool_t HandleDNDLeave();

TRootCanvas(TCanvas *c = 0, const char *name = “ROOT Canvas”, UInt_t width = 500, UInt_t height = 300);
TRootCanvas(TCanvas *c, const char *name, Int_t x, Int_t y, UInt_t width, UInt_t height);
virtual ~TRootCanvas();

void AdjustSize();
void Close();
void ForceUpdate() { Layout(); }
void FitCanvas();
void EventInfo(Int_t event, Int_t px, Int_t py, TObject *selected);
UInt_t GetWindowGeometry(Int_t &x, Int_t &y, UInt_t &w, UInt_t &h);
UInt_t GetCwidth() const;
UInt_t GetCheight() const;
void Iconify() { IconifyWindow(); }
Int_t InitWindow();
void PrintCanvas();
void RaiseWindow();
void SetWindowPosition(Int_t x, Int_t y);
void SetWindowSize(UInt_t w, UInt_t h);
void SetWindowTitle(const char *newTitle);
void SetCanvasSize(UInt_t w, UInt_t h);
void SetStatusText(const char *txt = 0, Int_t partidx = 0);

void Show() { MapRaised(); }
void ShowMenuBar(Bool_t show = kTRUE);
void ShowStatusBar(Bool_t show = kTRUE);
void ShowEditor(Bool_t show = kTRUE);
void ShowToolBar(Bool_t show = kTRUE);
void ShowToolTips(Bool_t show = kTRUE);

Bool_t HasEditor() const;
Bool_t HasMenuBar() const;
Bool_t HasStatusBar() const;
Bool_t HasToolBar() const;
Bool_t HasToolTips() const;

TGMenuBar *GetMenuBar() const { return fMenuBar; }
TGLayoutHints *GetMenuBarItemLayout() const { return fMenuBarItemLayout; }
TGStatusBar *GetStatusBar() const { return fStatusBar; }
TGDockableFrame *GetToolDock() const { return fToolDock; }

// overridden from TGMainFrame
void CloseWindow();
Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
void ReallyDelete();

ClassDef(TRootCanvas,0) //ROOT native GUI version of main window with menubar and drawing area



I’ve figured out the problem, and it wasn’t ROOT. After going through and checking my system, my video card driver had crashed… so I had to do a manual update. After the manual update, it all seems to be working fine.

I apologize for the inconvenience, I never thought to check if the auto-update had crashed the driver.

Thanks for your time,