Skip to content
Snippets Groups Projects
Commit e39e8714 authored by adrien-matta's avatar adrien-matta
Browse files

Merge branch 'NPTool.2.dev' of https://github.com/adrien-matta/nptool into NPTool.2.dev

parents 09c66e45 4e375705
No related branches found
No related tags found
No related merge requests found
...@@ -95,9 +95,12 @@ CalibrationManager::~CalibrationManager() ...@@ -95,9 +95,12 @@ CalibrationManager::~CalibrationManager()
{} {}
////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////
bool CalibrationManager::AddParameter(std::string DetectorName , std::string ParameterName , std::string Token ){ bool CalibrationManager::AddParameter(std::string DetectorName , std::string ParameterName , std::string Token, std::vector<double> def ){
std::string ParameterPath = DetectorName + "/" + ParameterName ; std::string ParameterPath = DetectorName + "/" + ParameterName ;
fToken[Token] = ParameterPath ; fToken[Token] = ParameterPath ;
// Case where a default value is given
if(def.size()!=0)
fCalibrationCoeff[ParameterPath] = def;
return true; return true;
} }
......
...@@ -52,7 +52,7 @@ class CalibrationManager{ ...@@ -52,7 +52,7 @@ class CalibrationManager{
// call like : myCalibrationManager->AddParameter( "MUST2" ,"Telescope5_Si_X38_E", "T5_Si_X38_E" ) // call like : myCalibrationManager->AddParameter( "MUST2" ,"Telescope5_Si_X38_E", "T5_Si_X38_E" )
// return false if the token is not found in the file list // return false if the token is not found in the file list
bool AddParameter(std::string DetectorName , std::string ParameterName , std::string Token) ; bool AddParameter(std::string DetectorName , std::string ParameterName , std::string Token,std::vector<double> def=std::vector<double>()) ;
// call like : myCalibrationManager->ApplyCalibration( "MUST2/Telescope5_Si_X38_E" , RawEnergy ) // call like : myCalibrationManager->ApplyCalibration( "MUST2/Telescope5_Si_X38_E" , RawEnergy )
// return the Calibrated value // return the Calibrated value
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment