Does anyone know of a useful guide for migrating macros from Root 5 to Root 6? I have seen various talks and read some forum posts, but I think it would be useful to collect some common use patterns and solutions in a central place, with some explanation. I did a google search, and found e.g. this thread:
which did however not turn up a link to a talk or documentation page.
thanks for looking in ROOT6, only release cycle actively developed since a few years. We did our best to maintain as much compatibility as possible. For example, old files are still readable and dictionary generation invocation commands.
I would say that 90% of the potential hurdles can be solved remembering that:
Macros are not executed line by line anymore. Cling, unlike cint, “looks” at them in their entirety (it’s based on a compiler)
Together with the dictionary, rootcint (an alias to rootcling) and genreflex generate a pcm file. These pcm files need to sit in the same directory of the shared libraries containing the dictionaries.
Header files used to generate dictionaries can be parsed at runtime. Therefore they need to be available to ROOT. Either they can sit in the same directory where they were when the dictionary was generated or in one of the paths of the ROOT_INCLUDE_PATH environment variable, the content of which needs to be “formatted” as the one of LD_LIBRARY_PATH, i.e. with “:” as path separators.
Let us know how your migration goes and if we can help you.