Exercise Guides

Some useful ROOT Macros

The simple macros above can be executed with:
> root 
>> gStyle initialized
root [0] .x random_1.C            
Note: if macro filename (say, filename.C) and the function name in the macro are different (say void function()), then the way to execute the function is:
root [0] .L filename.C
root [0] function()
Note that to run the examples above one has to remove the ".html" at the end of the filename.