#include "TString.h"
#include "hemccalibraterpar.h"
#include "hpario.h"
#include "hdetpario.h"
#include "hparamlist.h"
using namespace std;
ClassImp(HEmcCalibraterPar)
HEmcCalibraterPar::HEmcCalibraterPar(const char* name,const char* title,const char* context)
: HParCond(name,title,context) {
clear();
}
void HEmcCalibraterPar::clear(void) {
fMatchWindowMin = 0.F;
fMatchWindowMin = 0.F;
}
void HEmcCalibraterPar::setMatchWindow(Float_t min, Float_t max) {
fMatchWindowMin = min;
fMatchWindowMax = max;
}
void HEmcCalibraterPar::putParams(HParamList* l) {
if (!l) return;
TArrayF fMatchWindow;
fMatchWindow.Set(2);
fMatchWindow[0] = fMatchWindowMin;
fMatchWindow[1] = fMatchWindowMax;
l->add("fMatchWindow", fMatchWindow);
}
Bool_t HEmcCalibraterPar::getParams(HParamList* l) {
if (!l) return kFALSE;
TArrayF fMatchWindow;
if (!(l->fill("fMatchWindow", &fMatchWindow))) return kFALSE;
if (fMatchWindow.GetSize() != 2)
{
Error("HEmcCalibraterPar::getParams(HParamList* l)",
"Array size of fMatchWindow=%d does not fit to %d", fMatchWindow.GetSize(), 2);
return kFALSE;
}
fMatchWindowMin = fMatchWindow[0];
fMatchWindowMax = fMatchWindow[1];
return kTRUE;
}