JeffersonLab / JANA2

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

JService is now a JComponent #283

Closed nathanwbrei closed 3 months ago

nathanwbrei commented 3 months ago

This means that JServices can access parameters and services via Omni-style registered members, and are furnished with a logger, a JApplication pointer, and an Init() callback with proper exception handling.

There's a bigger change under the hood that made this possible: JANA2 has always had a problem with circular dependencies due to all of the member function templates. Among other things, this is why we need to #include<JANA/JEvent.h> whenever we declare a subclass of JFactoryT. In this pull request we finally resolve this problem by splitting JApplication.h into JApplicationFwd.h (which contains the class definition and forward declarations of the member templates) and JApplication.h (which contains the member template definitions and also pulls in JApplicationFwd.h). This way, anything that doesn't explicitly need the problematic member template definitions won't get them, and everything looks the same to users downstream.