File indexing completed on 2025-01-18 10:17:39
0001
0002
0003
0004 #include <JANA/JService.h>
0005 #include <JANA/JException.h>
0006
0007
0008 void JService::DoInit(JServiceLocator* sl) {
0009 std::lock_guard<std::mutex> lock(m_mutex);
0010 if (this->m_status != Status::Uninitialized) return;
0011
0012 if (m_app != nullptr) {
0013
0014 auto params = m_app->GetJParameterManager();
0015 m_logger = params->GetLogger(GetLoggerName());
0016
0017 for (auto* parameter : m_parameters) {
0018 parameter->Configure(*params, m_prefix);
0019 }
0020
0021 for (auto* service : m_services) {
0022 service->Fetch(m_app);
0023 }
0024 }
0025
0026 CallWithJExceptionWrapper("JService::acquire_services", [&](){ this->acquire_services(sl); });
0027 CallWithJExceptionWrapper("JService::Init", [&](){ this->Init(); });
0028
0029 this->m_status = Status::Initialized;
0030 }