Developing ROOT Software

Hello,
This is just a general question, and I’m not sure if this is the best place to ask it…
I am an undergraduate student in physics graduating in May, and I’ve been using the ROOT software to do HEP data-analysis research for about a year. I aspire to one day develop ROOT software, so I am trying to look into Master’s programs to apply to that will get me closer to this goal. I don’t really have a background in software development, but I have been practicing programming in C++ every day and also in Research and tuoring. My plan is to apply to computational science Master’s programs.

I basically would like some advice on what to do with regards to applying to graduate programs and what I can do in the interim, to be able to one day contribute to ROOT software.

Hi @Edward_Finkelstein,

Typically the forum is focused on asking/answering questions on ROOT itself, but there we go.

To reply to your first question, I am sorry I cannot recommend any MSc programme; I guess that depends mostly on the specific area of interest within Computer Science, Universities in your area (if you plan to personally attend the course), or whether it is a pure-online programme. Maybe if you provide information about your location, other people can make any recommendation.

Regarding contributing to ROOT, we accept contributions from any user via a GitHub pull-request. Pull requests are always reviewed by an expert in the corresponding part of ROOT before being integrated into the master branch.

If you want to contribute to ROOT, I would recommend browsing through GitHub issues here. Find something that is easy to accomplish, get familiarized with ROOT source code, and try to contribute a solution via a pull-request.

Cheers,
J.

1 Like

Thank you @jalopezg for replying. I am at Stony Brook in Long Island New York applying to Masters Programs abroad in Germany for physics and computational science, and one in Finland for theoretical and computational methods which I was accepted to.
Thank you to referring me to the gitHub page. I would like to contribute but I have no idea about how the whole process works, or how people find out what the source of a problem is in such a big software such as ROOT. This is one thing I really want to learn but have no idea how to go about it.
There are a lot of things about using ROOT that I am still unfamiliar with. This is why I am wondering if it would be smarter to go into a physics program and gain more proficiency in using ROOT software, before trying to contribute to the actual software. This may also help me learn more about how ROOT could be expanded, for instance.

Hi @Edward_Finkelstein,

Good to know that you were accepted in an MSc programme in Finland. As I told you in my last post, there might be forum users who can share their experience here, but I would better search for an opinion in specific forums.

In regards to contributing to ROOT, if you are still unfamiliar with some parts of ROOT as a user, I’d suggest experimenting with those. For the coding/debugging part, you would have first to become proficient both in C++ and Python (for PyROOT and so). Before trying to contribute to ROOT, you should be able to browse large codebases (such as the ROOT one), debug with gdb/lldb, and depending on the part of ROOT, fairly low-level stuff (parallelism in software, compiler theory -for Cling-, etc.).

At this point, I assume that you don’t have enough knowledge on the above topics, so would probably suggest you to browse the GitHub issues and search for something like fixing documentation, or otherwise simple issues.

Cheers,
J.

I like to think I am at least somewhat proficient in Python and C/C++; I tutor people in these subjects after all. Edward F. - Calculus, Physics, and C Tutor in Port Jefferson, NY | Wyzant Tutoring
I think what you are saying is to dive in headfirst and try to make sense of everything in the ROOT GitHub page, and eventually, I’ll be able to understand enough to contribute, because at this point browsing the GitHub page is like trying to read a foreign language.

My two cents: ROOT is huge, and you don’t need to understand it all to contribute. It’s much simpler to pick one issue that seems self-contained enough, ideally related to ROOT features that you are already a bit familiar with, and try to figure out what’s needed to fix that – ROOT devs will be happy to help you along and reply to any questions.

Also to familiarize with a new codebase it’s not so useful to read it as if it was a book. It’s simpler to start from a feature or component and ask “how does this work?”, and you can look at its code but also run a debugger on a toy program to see what the interesting code paths are, or use ad-hoc tools such as sourcetrail to navigate the sources.

Cheers,
Enrico

Thanks, and sorry for the late reply (I feel more confident in my coding skills now). So how do I download the ROOT source code in a way that I can navigate through it using sorcetrail? Is there some tutorial?

ROOT uses CMake as its build system, and sourcetrail supports cmake projects well.

The documentation for building ROOT from source is at Installing ROOT - ROOT and the documentation for setting up sourcetrail is at Sourcetrail - Documentation .
The short of it is: you have to do a git clone of GitHub - root-project/root: The official repository for ROOT: analyzing, storing and visualizing big data, scientifically , then build the project from source following the instructions linked above (make sure to install all dependencies before starting the build) and you also need to pass the cmake flag -DCMAKE_EXPORT_COMPILE_COMMANDS=ON. Then you point sourcetrail to the file compile_commands.json that is generated with the build and that’s mostly it.

On my laptop it takes ~15/20 minutes to compile ROOT and ~40 for sourcetrail to index the full project.

I hope this helps!
Enrico

1 Like

Thanks!

Let me throw another 2 cents into the ring:

Awesome that you contacted us, thanks for doing that - it’s an excellent question! Here’s what I’d recommend you to do:

Keep ROOT in the back of your head for the MSc program, but select a topic that’s of interest for you! E.g. high-throughput computing, or data transfer / memory, or sustainable interface design - there are so many options! You probably want to try out several, and pick what you liked back. During your courses, why don’t you check how ROOT does it - old classes, new classes - and send us your comments and ideas for improvement! That’s how I got my job :wink: and it’s a great way for you to learn / apply what you learn in practice, and for ROOT to improve!

Good luck, let’s stay in touch!

1 Like

Thank you so much for this response! I am going to do my Master’s in Physics in JGU Mainz starting this October. I know my coding skills are at a point where I can contribute to ROOT software, and I would really really like to structure a Master’s thesis where I can contribute something. I will certainly get back to you, once I have an advisor who could supervise me for it.

@eguiraud Thanks for this again. I have built ROOT from the source with the cmake flag that you said to include after cloning from GIT and I have fully indexed the software with Sourcetrail. It is really amazing! For some reason, SourceTrail tells me there are 7 Fatal Errors, which are that the following files were not found: “Options.inc”, “LipoOpts.inc”, “ObjcopyOpts.inc”, and “Opts.inc”. So, if I wanted to attempt to change something in a file, how would I then recompile the software and test the modification?

you can safely ignore them or remove everything under interpreter/ from the sourcetrail project

Sourcetrail is only for code navigation. To do actual development, you can proceed as usual. Change the code with an editor, recompile, test, etc.

1 Like