#include "AculCalib.h" //---------------------------------------------------------------------------- AculCalib::AculCalib() { //documentation example printf("AculCalib::Default constructor called.\n"); Init(); } //---------------------------------------------------------------------------- /*AculCalib::AculCalib(const char* parfile) { printf("AculCalib::Constructor called.\n"); SetParFile(parfile); Init(); }*/ //---------------------------------------------------------------------------- AculCalib::~AculCalib() { printf("AculCalib::Destructor called.\n"); delete fPars; } //---------------------------------------------------------------------------- void AculCalib::Init() { fPars = 0; } //---------------------------------------------------------------------------- void AculCalib::SetParFile(const char* parfile) { fParFileName = parfile; return; } //---------------------------------------------------------------------------- void AculCalib::PrintParameters(const char* option) { if (!fPars) { cerr << "\"AculCalib::PrintParameters\" parameters were not initialized." << endl; return; } fPars->PrintParameters(option); } //---------------------------------------------------------------------------- void AculCalib::PrintCalibParameters() { cout << "i\ta\t\b" << endl; for (Int_t i = 0; i<=(Int_t)fA.size(); i++) { cout << i << "\t" << fA[i] << "\t" << fB[i] << endl; } } //---------------------------------------------------------------------------- Double_t AculCalib::GetA(Int_t i) { if (i >= (Int_t)fA.size()) //if i >= number of array element { return 0.; } return fA[i]; } //---------------------------------------------------------------------------- Double_t AculCalib::GetB(Int_t i) { if (i >= (Int_t)fB.size()) //if i >= number of array element { return 0.; } return fB[i]; } //---------------------------------------------------------------------------- void AculCalib::CanDivider(TCanvas *c, Int_t noPads, Int_t columns, Int_t rows) { c->Clear(); if (noPads == 16) { c->Divide(4, 4); return; } if (rows != 0 && columns != 0) { c->Divide(columns, rows); return; } } //---------------------------------------------------------------------------- ClassImp(AculCalib);