diff --git a/src/libraries/JANA/JApplication.cc b/src/libraries/JANA/JApplication.cc index 1df10802f..ee8a33033 100644 --- a/src/libraries/JANA/JApplication.cc +++ b/src/libraries/JANA/JApplication.cc @@ -151,6 +151,10 @@ void JApplication::Initialize() { topology_builder->create_topology(); auto execution_engine = m_service_locator->get(); + + // Make sure that Init() is called on any remaining JServices + m_service_locator->wire_everything(); + m_initialized = true; // This needs to be at the end so that m_initialized==false while InitPlugin() is being called } diff --git a/src/libraries/JANA/Services/JServiceLocator.h b/src/libraries/JANA/Services/JServiceLocator.h index 21cfd0218..3be0206d1 100644 --- a/src/libraries/JANA/Services/JServiceLocator.h +++ b/src/libraries/JANA/Services/JServiceLocator.h @@ -46,6 +46,7 @@ class JServiceLocator { std::lock_guard lock(mutex); auto svc = std::dynamic_pointer_cast(t); assert(svc != nullptr); + svc->SetTypeName(JTypeInfo::demangle()); underlying[std::type_index(typeid(T))] = svc; }