JeffersonLab / JANA2

Multi-threaded HENP Event Reconstruction
https://jeffersonlab.github.io/JANA2/
Other
6 stars 9 forks source link

jana-generate.py creates ROOT plugin by default #279

Closed nathanwbrei closed 3 months ago

nathanwbrei commented 6 months ago

Steps to reproduce:

  1. Following the tutorial: jana-generate.py Plugin QuickTutorial
  2. Observe:
    • It has created a CMakeLists.txt with find_package(ROOT REQUIRED)
    • It has created a QuickTutorial.cc file which contains a ROOT event processor, instead of a basic event processor

This defeats the purpose of the tutorial, which is to familiarize the user with JANA concepts without having them to install and invest in understanding ROOT

nathanwbrei commented 3 months ago

This is because create_plugin() has include_root=True by default. We can change the default to false, then update the documentation to mention that there are different ways of calling it.

Side note: Even though lots of users will in principle need create_plugin(), in practice none of them need what currently exists. EICrecon users mainly use plugins for organizing factories, and do their analysis downstream. Furthermore, EICrecon has a much more sophisticated CMake setup for JANA plugins which we may consider upstreaming. On the other hand, GlueX users at least do use plugins for different analyses, but they write all of their histograms to a single file, whereas our example writes a separate file for each analysis. Furthermore, I don't want to encourage people to use JGlobalRootLock, because we are moving towards a more declarative world, along the lines of JEventProcessorSequentialRoot.