I am working through the CMS Open Data Workshop information from 2021 and I have gotten stuck on the “Using ROOT with C++ to write and read a file” in the “C++ and ROOT basics” section. I have created the write_ROOT_file, read_ROOT_file, and Makefile all as described in the lesson. Every time I try to run the “make write_ROOT_file” command, I get an error message. The error message I get says:
g++ -o write_ROOT_file.o write_ROOT_file.cc
write_ROOT_file.cc:5:19: fatal error: TROOT.h: No such file or directory
compilation terminated.
make: *** [write_ROOT_file] Error 1
I have run the “cmsenv” command several times, I have access to ROOT in the shell, and I have rearranged the order of the “#include” commands at the beginning of the file to see if any of these were causing the problem. None of these helped or changed the error message in any way. Can anyone help me to fix my make command so that I will be able to run my files?