Skip to content

Commit

Permalink
Fix issue #295
Browse files Browse the repository at this point in the history
The JEventSourceGenerator needs to pass a JApplication pointer to the JEventSource constructor. However this pointer needs to be injected into the generator first. I'm hoping to get the JApplication pointer out of the EventSource constructor completely, and move all initialization logic into Init() instead.
  • Loading branch information
nathanwbrei committed May 1, 2024
1 parent 56d1719 commit 574dad5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/libraries/JANA/JApplication.cc
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,12 @@ void JApplication::Initialize() {
// Attach all plugins
plugin_loader->attach_plugins(component_manager.get());

// Resolve all event sources now that all plugins have been loaded
component_manager->resolve_event_sources();

// Give all components a JApplication pointer and a logger
component_manager->configure_components();

// Resolve all event sources now that all plugins have been loaded
component_manager->resolve_event_sources();

// Set desired nthreads. We parse the 'nthreads' parameter two different ways for backwards compatibility.
m_desired_nthreads = 1;
m_params->SetDefaultParameter("nthreads", m_desired_nthreads, "Desired number of worker threads, or 'Ncores' to use all available cores.");
Expand Down

0 comments on commit 574dad5

Please sign in to comment.