Namespace: Correctionmanager
-
namespace correctionManager
namespace used for the CorrectionManager
-
class CorrectionManager
- #include <CorrectionManager.hxx>
Public Functions
-
inline CorrectionManager()
-
inline ~CorrectionManager()
-
const correction::Correction *loadCorrection(const std::string &filePath, const std::string &corrName)
Load a correctionlib correction from a file and return it. This function works for most corrections found in correctionlib files (the default type for corrections is correction::Correction) . If the requested correction is already loaded, it will return a pointer to the already loaded correction. If not, the correction will be loaded and stored in the CorrectionManager.
- Parameters:
filePath – The path to the correctionlib file
corrName – The name of the correction to load
- Returns:
const correction::Correction*
-
const correction::CompoundCorrection *loadCompoundCorrection(const std::string &filePath, const std::string &corrName)
Load a correctionlib correction from a file and return it. This function works correction::CompoundCorrection objects. If the requested CompoundCorrection is already loaded, it will return a pointer to the already loaded CompoundCorrection. If not, the CompoundCorrection will be loaded and stored in the CorrectionManager.
- Parameters:
filePath – The path to the correctionlib file
corrName – The name of the correction to load
- Returns:
const correction::Correction*
-
const nlohmann::json *loadjson(const std::string &filePath)
Load a json file from a file and return it. This function works works for all json files. If the requested json file is already loaded, it will return a pointer to the already loaded json. If not, the json will be loaded and stored in the CorrectionManager.
- Parameters:
filePath – The path to the json file
- Returns:
const nlohmann::json
-
void report()
Report the number of corrections managed by the CorrectionManager.
Private Members
-
std::unordered_map<std::string, std::unordered_map<std::string, std::shared_ptr<const correction::Correction>>> correction_map
-
std::unordered_map<std::string, std::unordered_map<std::string, std::shared_ptr<const correction::CompoundCorrection>>> correctionCompound_map
-
std::unordered_map<std::string, std::shared_ptr<const nlohmann::json>> json_map
-
int n_corrections = 0
-
inline CorrectionManager()
-
class CorrectionManager