Belle II Software development
|
A class to hold all data that is needed ONLY for the most recent single execution of the algorithm. More...
#include <CalibrationAlgorithm.h>
Public Member Functions | |
void | reset () |
Resets this class back to what is needed at the beginning of an execution. | |
void | clearCalibrationData () |
Clear calibration data. | |
const std::vector< Calibration::ExpRun > & | getRequestedRuns () const |
Returns the vector of ExpRuns. | |
void | setRequestedRuns (const std::vector< Calibration::ExpRun > &requestedRuns) |
Sets the vector of ExpRuns. | |
int | getIteration () const |
Getter for current iteration. | |
void | setIteration (int iteration) |
Setter for current iteration. | |
EResult | getResult () const |
Getter for current result. | |
void | setResult (EResult result) |
Setter for current iteration. | |
void | setRequestedIov (const IntervalOfValidity &iov=IntervalOfValidity(0, 0, -1, -1)) |
Sets the requested IoV for this execution, based on the. | |
const IntervalOfValidity & | getRequestedIov () const |
Getter for requested IOV. | |
std::list< Database::DBImportQuery > & | getPayloads () |
Get constants (in TObjects) for database update from last calibration. | |
std::list< Database::DBImportQuery > | getPayloadValues () |
Get constants (in TObjects) for database update from last calibration but passed by VALUE. | |
std::shared_ptr< TNamed > | getCalibObj (const std::string &name, const RunRange &runRange) const |
Get a previously created object in m_mapCalibData if one exists, otherwise return shared_ptr(nullptr) | |
void | setCalibObj (const std::string &name, const RunRange &runRange, const std::shared_ptr< TNamed > &objectPtr) |
Insert a newly created object in m_mapCalibData. Overwrites a previous entry if one exists. | |
Private Attributes | |
std::vector< Calibration::ExpRun > | m_requestedRuns {} |
Runs for which the calibration has been last requested, either requested explicitly or generated from the collected data. | |
int | m_iteration { -1} |
current iteration for execution | |
EResult | m_result {c_Undefined} |
Result of execution, default undefined to indicate we haven't run yet. | |
IntervalOfValidity | m_iov |
Current IoV to be executed, default empty. Will be either set by user explicitly or generated from collected/requested runs. | |
std::list< Database::DBImportQuery > | m_payloads {} |
Payloads saved by execution. | |
std::map< std::pair< std::string, RunRange >, std::shared_ptr< TNamed > > | m_mapCalibData |
Map of shared pointers to merged calibration objects created by getObjectPtr() calls. | |
A class to hold all data that is needed ONLY for the most recent single execution of the algorithm.
This is then reset upon calling execute() again. All other data members aren't reset unless you do it explicitly.
Definition at line 53 of file CalibrationAlgorithm.h.
|
inline |
Definition at line 55 of file CalibrationAlgorithm.h.
|
inline |
Definition at line 56 of file CalibrationAlgorithm.h.
|
inline |
Clear calibration data.
Definition at line 69 of file CalibrationAlgorithm.h.
|
inline |
Get a previously created object in m_mapCalibData if one exists, otherwise return shared_ptr(nullptr)
Definition at line 98 of file CalibrationAlgorithm.h.
|
inline |
Getter for current iteration.
Definition at line 78 of file CalibrationAlgorithm.h.
|
inline |
Get constants (in TObjects) for database update from last calibration.
Definition at line 94 of file CalibrationAlgorithm.h.
|
inline |
Get constants (in TObjects) for database update from last calibration but passed by VALUE.
Definition at line 96 of file CalibrationAlgorithm.h.
|
inline |
Getter for requested IOV.
Definition at line 92 of file CalibrationAlgorithm.h.
|
inline |
Returns the vector of ExpRuns.
Definition at line 74 of file CalibrationAlgorithm.h.
|
inline |
Getter for current result.
Definition at line 86 of file CalibrationAlgorithm.h.
|
inline |
Resets this class back to what is needed at the beginning of an execution.
Definition at line 58 of file CalibrationAlgorithm.h.
|
inline |
Insert a newly created object in m_mapCalibData. Overwrites a previous entry if one exists.
Definition at line 107 of file CalibrationAlgorithm.h.
|
inline |
Setter for current iteration.
Definition at line 80 of file CalibrationAlgorithm.h.
|
inline |
Sets the requested IoV for this execution, based on the.
Definition at line 90 of file CalibrationAlgorithm.h.
|
inline |
Sets the vector of ExpRuns.
Definition at line 76 of file CalibrationAlgorithm.h.
|
inline |
Setter for current iteration.
Definition at line 88 of file CalibrationAlgorithm.h.
|
private |
Current IoV to be executed, default empty. Will be either set by user explicitly or generated from collected/requested runs.
Definition at line 120 of file CalibrationAlgorithm.h.
|
private |
current iteration for execution
Definition at line 116 of file CalibrationAlgorithm.h.
|
private |
Map of shared pointers to merged calibration objects created by getObjectPtr() calls.
Used to lookup previously created objects instead of recreating them needlessly. Using shared_ptr allows us to return a shared_ptr so the user knows that they don't own the pointer exclusively, but that they could hold onto a shared_ptr for longer than the reset of this ExecutionData object if they really wanted to i.e. you could hold onto a previous execution's created data if you wish (not recommended), but if you don't care then you can be assured that the memory will clear itself for you upon a new execute().
Definition at line 131 of file CalibrationAlgorithm.h.
|
private |
Payloads saved by execution.
Definition at line 122 of file CalibrationAlgorithm.h.
|
private |
Runs for which the calibration has been last requested, either requested explicitly or generated from the collected data.
Definition at line 114 of file CalibrationAlgorithm.h.
|
private |
Result of execution, default undefined to indicate we haven't run yet.
Definition at line 118 of file CalibrationAlgorithm.h.