| JANA2
    C++ framework for multi-threaded data processing | 
JService is a trait indicating that an object can be shared among JANA components via a simple ServiceLocator. More...
#include <JServiceLocator.h>
| Public Member Functions | |
| template<typename T > | |
| void | provide (std::shared_ptr< T > t) | 
| template<typename T > | |
| std::shared_ptr< T > | get () | 
| void | InitAllServices () | 
JService is a trait indicating that an object can be shared among JANA components via a simple ServiceLocator.
It provides a callback interface for configuring itself when it depends on other JServices. JServiceLocator is a nexus for collecting, initializing, and retrieving JServices. This may be exposed via the JApplication facade, or used on its own. JServiceLocator uses shared-pointer semantics to ensure that JServices always get freed, but also don't get freed prematurely if a JApplication or JServiceLocator go out of scope.
| 
 | inline | 
Retrieve a JService. If Init() and acquire_services() have not yet been called, they will be.
| 
 | inline | 
Make sure that all Services have been initialized. This is not strictly necessary, but it makes user errors easier to understand, and it prevents Services from being unpredictably initialized later on.
| 
 | inline | 
Publish a Service to the ServiceLocator. This Service should have already been constructed, but not finalized. Users are intended to call this from InitPlugin() most of the time