Skip to content

Conversation

@lubynets
Copy link
Contributor

  1. Enabled filling of a GenericContainer - the channelized object like Hit, Track, Particle, but without default fields (this opportunity was previously envisioned but not taken to its logical conclusion).
  2. Created a GenericContainerFiller class - with functionality complementary to PlainTreeFiller.
  3. Fixed some compilation and linker warnings *
  4. Cosmetics changes.

*) There was a linker warning after compilation of the examples directory: Warning: Unused class rule: UserTaskWrite. It's worth noting that the linker error was related only to the first .cpp (and .hpp) entry in the CMakeLists.txt, e.g. UserTaskRead did not produce such an error. In the newly generated G__AnalysisTreeUser.cxx file among "Header files passed as explicit arguments" the UserTaskWrite.hpp was missing. It turned out, that the rootcling command called by ROOT_GENERATE_DICTIONARY() function, by mistake prepended the list of headers with a key -I, however this key should be used only with directories, not files. Therefore the first header was wrongly considered as a directory, that produced the described above behavior.
This problem was addressed by replacing the include_directories() function with the target_include_directories().
P.S. The same function, include_directories(), was used in the CMakeLists.txt of the infra directory, however there was no such a linker error there. The point is that although the first header, SimpleCut.hpp, was missing in the G__AnalysisTreeInfra.cxx, it was present in other headers, which were included further (e.g. in Cuts.hpp).
P.P.S. If for any reasons you cannot refrain from using the include_directories(), the mentioned linker error can be addressed in a different way: (1) remove G__AnalysisTreeUser.cxx from the add_library() function; (2) add MODULE AnalysisTreeUser in the ROOT_GENERATE_DICTIONARY() function.
But in general, include_directories() usage is deprecated and should be avoided where possible.

@lubynets
Copy link
Contributor Author

After replacement the include_directories() with target_include_directories() the test at Ubuntu 20.04 machine with ROOT 6.20 and c++ 11 standard was failed at the stage of ROOT_GENERATE_DICTIONARY() in infra. As the most probable reason of it I would suggest the ROOT version, since the behavior of ROOT_GENERATE_DICTIONARY() is known to change between its versions; but this problem was not investigated in details.
In order to address this fail, the approach mentioned in "P.P.S." above was used.
In case if support of c++ 11 will not be considered necessary, this fix can be reverted again together with removal of build_ubuntu20_root_6_20_cpp11 test.

@lubynets lubynets merged commit 24420e1 into HeavyIonAnalysis:master Apr 22, 2025
4 checks passed
@lubynets lubynets deleted the dev branch April 22, 2025 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant