JANA2
|
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 | |
virtual | ~JService ()=default |
acquire_services is a callback which allows the user to configure a JService which relies on other JServices. More... | |
virtual void | acquire_services (JServiceLocator *sl) |
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.
|
virtualdefault |
acquire_services is a callback which allows the user to configure a JService which relies on other JServices.
The idea is that the user uses a constructor or initialize() method to configure things which don't rely on other JServices, and then use acquire_services() to configure the things which do. We need this because due to JANA's plugin architecture, we can't guarantee the order in which JServices get provided. So instead, we collect all of the JServices first and wire them together afterwards in a separate phase.
Note: Don't call JApplication::GetService() or JServiceLocator::get() from InitPlugin()!