void MacroName ( ) { < . . . your lines of CINT code . . . > } The macro is executed by typing > root MacroName . cxx at the system prompt, or it can be loaded into a ROOT session and then be executed by typing root [ 0 ] . L MacroName . cxx root [ 1 ] MacroName ( ) ; at the ROOT prompt. Note that more than one macro can be loaded this way, as each macro has a unique name in the ROOT name space. Because many other macros may have been executed in the same shell before, it is a good idea to reset all ROOT parameters at the beginning of a macro and dene your preferred graphics options, e. g. with the code fragment // re-initialise ROOT gROOT->Reset ( ) ; // re-initialize ROOT gROOT->SetStyle ( "Plain" ) ; // set empty TStyle (nicer on paper) gStyle->SetOptStat (111111) ; // print statistics on plots , ( 0 ) for no output gStyle->SetOptFit (1111) ; // print fit results on plot , ( 0 ) for no ouput gStyle->SetPalette ( 1 ) ; // set nicer colors than default gStyle->SetOptTitle ( 0 ) ; // suppress title box . . . Next, you should create a canvas for graphical output, with size, subdivisions and format suitable to your needs, see documentation of class TCanvas: // create a canvas , specify position and size in pixels TCanvas c1 ("c1","",0,0,400,300); c1.Divide(2,2); // set subdivisions, called pads c1.cd(1); // change to pad 1 o f canvas c1