#include "CalPars.h" ClassImp(CalPars); CalPars::CalPars(const char* clbfile) { ReadParFile(clbfile); } CalPars::~CalPars() { printf("CalPars::Destructor called.\n"); } Double_t CalPars::GetA(Int_t i) { if (i >= fA.GetSize()) { return 0.; } return fA[i]; } Double_t CalPars::GetB(Int_t i) { if (i >= fB.GetSize()) { return 0.; } return fB[i]; } Double_t CalPars::GetC(Int_t i) { if (i >= fC.GetSize()) { return 0.; } return fC[i]; } void CalPars::ReadParFile(const char* clbfile) { clbFile = clbfile; std::ifstream infile(clbfile); if ( !infile.is_open() ) { printf("CalPars::ReadParFile: File %s was not open.\n", clbfile); printf("CalPars::ReadParFile: Calibration parameters are empty!!!\n"); return; } TString line; Int_t nopars; Double_t a, b; Int_t c; //threshold printf("CalPars::ReadParFile: File %s was open.\n", clbfile); line.ReadLine(infile); sscanf(line.Data(), "%*d %d", &nopars); // Info("CalPars::ReadParFile", "%d calibration parameters will be loaded", nopars); printf("CalPars::ReadParFile: %d calibration parameters will be loaded\n", nopars); fA.Set(nopars); fB.Set(nopars); fC.Set(nopars); for (Int_t i = 0; i