I am trying to read a root file generated by REST using separate C++ code that links to REST/ROOT. I have generated the CMakeLists.txt file by taking a lot of inspiration from the ones in the REST repository to the point that I am able to successfully include ROOT and REST libraries e.g. #include <TRestG4Metadata.h> .
However when I open a root file TFile *f = new TFile(root_file); there appears some warnings about missing dictionaries:
Is there a problem with the makefile? I thought that with the line include(MacroRootDict) it would be fixed but thats not the case. I would appreciate some information about where the dictionaries are stored etc. so I can have a better understanding of the problem.
just before the use of those classes, should solve the problem. Of course, you should be able to do #include "TRestTools.h". That will be able if you properly added header paths in your CMakeLists.txt.
You can get some inspiration from restRoot I guess.
TRestTools::LoadRESTLibrary() searches, and loads all REST libraries found. Probably a better name for this method would be using plural. LoadRESTLibraries().
You are welcome. Probably it is a good moment for you to create a dummy package inside the packages directory with a dummy executable that is able to use REST libraries. Then it can be used in the future as a template to create new packages, and just copy/paste/rename the directory, and rename few variables.
Something like REST_v2/packages/template/ or REST_v2/packages/dummy/. That compiles an executable restDummy and installs it in the system defined REST_PATH/bin installation.