Belle II Software  release-08-01-10
CalibrationAlgorithm::ExecutionData Class Reference

A class to hold all data that is needed ONLY for the most recent single execution of the algorithm. More...

#include <CalibrationAlgorithm.h>

Collaboration diagram for CalibrationAlgorithm::ExecutionData:

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 IntervalOfValiditygetRequestedIov () const
 Getter for requested IOV.
 
std::list< Database::DBImportQuery > & getPayloads ()
 Get constants (in TObjects) for database update from last calibration.
 
std::list< Database::DBImportQuerygetPayloadValues ()
 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::DBImportQuerym_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. More...
 

Detailed Description

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.

Member Data Documentation

◆ m_mapCalibData

std::map<std::pair<std::string, RunRange>, std::shared_ptr<TNamed> > m_mapCalibData
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.


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