JANA2
JCalibrationManager Class Reference
Inheritance diagram for JCalibrationManager:
Collaboration diagram for JCalibrationManager:

Public Member Functions

void acquire_services (JServiceLocator *service_locator)
 
void AddCalibrationGenerator (JCalibrationGenerator *generator)
 
void RemoveCalibrationGenerator (JCalibrationGenerator *generator)
 
vector< JCalibrationGenerator * > GetCalibrationGenerators ()
 
void GetJCalibrations (vector< JCalibration * > &calibs)
 
JCalibrationGetJCalibration (unsigned int run_number)
 
template<class T >
bool GetCalib (unsigned int run_number, unsigned int event_number, string namepath, map< string, T > &vals)
 
template<class T >
bool GetCalib (unsigned int run_number, unsigned int event_number, string namepath, vector< T > &vals)
 
- Public Member Functions inherited from JService
virtual ~JService ()=default
 acquire_services is a callback which allows the user to configure a JService which relies on other JServices. More...
 

Member Function Documentation

template<class T >
bool JCalibrationManager::GetCalib ( unsigned int  run_number,
unsigned int  event_number,
string  namepath,
map< string, T > &  vals 
)
inline

Get the JCalibration object from JApplication for the run number of the current event and call its Get() method to get the constants.

References JCalibration::Get(), and GetJCalibration().

Here is the call graph for this function:

template<class T >
bool JCalibrationManager::GetCalib ( unsigned int  run_number,
unsigned int  event_number,
string  namepath,
vector< T > &  vals 
)
inline

Get the JCalibration object from JApplication for the run number of the current event and call its Get() method to get the constants.

References JCalibration::Get(), and GetJCalibration().

Here is the call graph for this function:

JCalibration* JCalibrationManager::GetJCalibration ( unsigned int  run_number)
inline

Return a pointer to the JCalibration object that is valid for the given run number.

This first searches through the list of existing JCalibration objects (created by this JApplication object) to see if it already has the right one.If so, a pointer to it is returned. If not, a new JCalibration object is created and added to the internal list. Note that since we need to make sure the list is not modified by one thread while being searched by another, a mutex is locked while searching the list. It is NOT efficient to get or even use the JCalibration object every event. Factories should access it in their brun() callback and keep a local copy of the required constants for use in the evnt() callback.

References JCalibrationGenerator::CheckOpenable(), JCalibrationGenerator::Description(), and JCalibrationGenerator::MakeJCalibration().

Referenced by GetCalib().

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this class was generated from the following file: