Tutorial for beginner (TTree::MakeClass TTree::MakeSelector)


I would like to ask if you can recommend me a tutorial for a very beginner?
I received root files with data.
I can already write a simple macro that opens a root file, draw a graph, a histogram, and save it to a new root file.

Now I would like to learn how I can extract numeric data from this file, for example, the largest X value, the average value, etc.

I probably need to learn how to use TTree::MakeClass
TTree::MakeSelector, but I don’t know if this is the simplest way.
Can you recommend me a tutorial for a very beginner?


See Get Started - ROOT and ROOT Primer - ROOT


Sorry for the too simple question.

I am doing the exercise with https://root.cern.ch/root/html534/guides/users-guide/Trees.html#using-ttreemakeclass
by typing .L libEvent.so
I get error macro libEvent.so not found in path .:/snap/root-framework/928/usr/local/macros

Is written:
if it doesn’t exist type make in $ROOTSYS/test

How to correctly execute make libEvent.so ?

cd $ROOTSYS/test
make -k

will create libEvent.so

I didn’t find the location in root_v26.10
Should I create $ROOTSYS/test ?

When you download the ROOT sources the test directory comes with

Thanks a lot for sharing! As someone who’s also just starting out in the world of ROOT analysis, your post is incredibly helpful.

I’ve managed to learn a bit so far, but starting with the basics is essential. And I haven’t even seen the tips on TTree:CloneTree and TTreeReader before. Thanks :slightly_smiling_face:

1 Like

Hi everyone! I would like to also get some tutorials for beginners. We recently switched to this framework, and to be honest, I feel lost sometimes. That’s why I’ve decided to join this forum in the first place.
So, if you have any tutorials for beginners, feel free to share.

1 Like

Welcome to the ROOT forum

The tuorials are available here: ROOT: Tutorials

To have a globl overview have.a look to the Manual: ROOT Manual - ROOT

Finally the Primer might also help you to start: ROOT Primer - ROOT

Thanks for the Root tutorials. I find them pretty helpful. Also, if you could share some practical problems to solve, it would be really helpful. But thanks anyway.

Usually, that’s ROOT users who have practical problems to solve. Expose yours and we will help.

1 Like

Thanks for your support. I usually try to play around to solve my problems. But in most cases, I get lost in my steps, and in the end, I have no clue what actually helped me.
But I like to read about problems that people share here, and I’m interested in reading about solutions or sharing my suggestions.

I am also a beginner in ROOT. I like video tutorials and I sometimes watch the channel https://www.youtube.com/watch?v=KPz-dNjdx40&list=PLLybgCU6QCGWLdDO4ZDaB0kLrO3maeYAe