In [ ]:
import ROOT
In [2]:
# Your code here
Now, you can invoke the ls command from within the notebook to list the files in this directory. Check that the file is there. You can invoke the rootls command to see what's inside the file.
In [3]:
# Your invocations here
Access the histograms and draw them in Python. Remember that you need to create a TCanvas before and draw it too in order to inline the plots in the notebooks. You can switch to the interactive JavaScript visualisation using the %jsroot on "magic" command.
In [4]:
# Your code here
You can now repeat the exercise above using C++. Transform the cell in a C++ cell using the %%cpp "magic".
In [ ]:
# Your code here
ROOT provides a different kind of TFile, TXMLFile. It has the same interface and it's very useful to better understand how objects are written in files by ROOT. Repeat the exercise above, either on Python or C++ - your choice, using a TXMLFILE rather than a TFile and then display its content with the cat command. Can you see how the content of the individual bins of the histograms is stored? And the colour of its markers? Do you understand why the xml file is bigger than the root one even if they have the same content?
In [ ]:
# Your invocations here