Here is an example of using a Makefile to compile ROOT using some data from an old experiment.
Attach:RootSimMakefile
Attach:RootSimCode
Attach:RootSimSetupData
Attach:RootSimInputData
- Download the files and put them into a folder of their own. Open the folder in a terminal and type 'make' into the command line. This creates an executable file, as well as some others which we don't need to look at (they can all be removed by typing in 'make clean').
- Executing the file normally prints a little message saying how it should actually be executed: you need to be the name of the input file and then the setup file after the executable name. In other words type in './<nameofexecutable> Mu_BC_data.txt setup.txt'. This should bring up a graph, which you can play around with.
- To end it all double click on the graph. *IMPORTANT* You can see all the things that the program created are all deleted at the end to stop any memory leaks - always try and do this in your programs.
~Matt C