Default value of SetOptStat in TBrowser

ROOT Version : 6.24/06

Hi guys,

I would like to know if there is a way to change the default SetOptStat value definitively. To give a bit of context, I am looking at many histograms using TBrowser and everytime I switch from one histogram to another, the SetOptStat value gets back to 111.

So far I have tried using

gStyle->SetOptStat(111111);

before initializing my histograms in the code which creates them.

Thanks for reading me !

In the command input line, type gStyle->SetOptStat(111111)and then gROOT->ForceStyle()

Hi thanks for your response ! So it works nicely in the terminal, but is there a way to do it directly in your program ?

You mean in the source code of your application?

Hi,

I think you want to add the following into your ~/.rootlogon.C (create it if it does not exist):

{
    //... whatever you had here before (if anything)
    gStyle->SetOptStat(111111);
}

Then this will affect all your histograms.

1 Like

Thanks both of you for your responses. Your solution works fine !

Best,
Marius

As @bellenot said you might los need to add gROOT->ForceStyle() in your rootlogon.C in case you want to impose the style value to histograms read from a ROOT file and having their own OptStat.

I just added the SetOptStat command and it worked fine. If I have any problems later I will remember to try this !

Thanks