//------------------------------------------------------------------------------ // rootlogon.C: a sample ROOT logon macro allowing use of ROOT script // compiler in CDF RunII environment. The name of this macro file // is defined by the .rootrc file // // USESHLIBS variable has to be set to build Stntuple libraries locally: // // setenv USESHLIBS 1 // // Feb 12 2001 P.Murat //------------------------------------------------------------------------------ { #include #include // print overflows/underflows in the stat box gStyle->SetOptStat(11111111); // print fit results in the stat box gStyle->SetOptFit(1110); // this line reports the process ID which simplifies // debugging gInterpreter->ProcessLine(".! ps | grep root"); gROOT->SetStyle("Plain"); // See http://root.cern.ch/root/roottalk/roottalk00/1067.html // Objects like the title box and the statistics box are generated on the fly // when the histogram or graph is being drawn. // Use the TStyle control object to set your own defaults: // gStyle->SetTitleX(0.1); //Title box x position (top left-hand corner) gStyle->SetTitleY(0.995); //Title box y position (default value) gStyle->SetTitleW(0.6); //Title box width as fraction of pad size gStyle->SetTitleH(0.08); //Title box height as fraction of pad size gStyle->SetTitleColor(0); //Title box fill color gStyle->SetTitleTextColor(4); //Title box text color gStyle->SetTitleStyle(1001); //Title box fill style! //TitleFont = 10*fontid + 2 (12 is normal, 22 bold 32 italic) gStyle->SetTitleFont(32); //Title box font (32=italic times bold) gStyle->SetTitleBorderSize(2); //Title box border thickness gStyle->SetTitleOffset(0.8,"x"); //X-axis title offset from axis gStyle->SetTitleOffset(1.1,"y"); //X-axis title offset from axis gStyle->SetTitleSize(0.05,"x"); //X-axis title size gStyle->SetTitleSize(0.05,"y"); gStyle->SetTitleSize(0.05,"z"); gStyle->SetLabelOffset(0.025); gStyle->SetStatX(0.995); //Stat box x position (top right hand corner) gStyle->SetStatY(0.995); //Stat box y position gStyle->SetStatW(0.09); //Stat box width as fraction of pad size gStyle->SetStatH(0.09); //Size of each line in stat box gStyle->SetStatColor(0); //Stat box fill color gStyle->SetStatTextColor(1); //Stat box text color gStyle->SetStatStyle(1001); //Stat box fill style! //StatFont = 10*fontid + 2 (12 is normal, 22 bold 32 italic) gStyle->SetStatFont(62); //Stat box fond gStyle->SetStatBorderSize(2); //Stat box border thickness //gStyle->SetStatFormat("6.4g"); //Statistic box options (from left to right) gStyle->SetOptStat(1111111); //Integral, Overflow, Underflow, RMS, Mean, Nent, Name gStyle->SetOptFit(1111); //probability, Chi2, errors, name/values of parameters //Go to view menu on canvas, select markers to view possible values gStyle->SetMarkerStyle(20); //Marker is a circle gStyle->SetMarkerSize(.5); //Reasonable marker size // //to modify a given histogram already in a pad use this? //TPaveText *title = (TPavbeText*)gPad->GetPrimitive("title"); //title->SetX2NDC(0.6); //gPad->Modified(); gStyle->SetMarkerSize(.5); //Reasonable marker size gStyle->SetTitleOffset(0.8,"x"); //X-axis title offset from axis gStyle->SetTitleOffset(1.1,"y"); //X-axis title offset from axis gStyle->SetTickLength(-0.03,"XY"); gROOT->ForceStyle(); system("pwd"); }