Main Page   Modules   Namespace List   Class Hierarchy   Data Structures   File List   Namespace Members   Data Fields   Globals   Related Pages  

ErfFitObject.cpp

Go to the documentation of this file.
00001 #include "ErfFitObject.h"
00002 
00003 using namespace Sct;
00004 
00005 namespace SctData {
00006 ErfFitObject::ErfFitObject() throw() {
00007     this->init();
00008     this->reset();
00009 }
00010 
00011 ErfFitObject::ErfFitObject(const TF1& f) throw(LogicError) {
00012     this->init();
00013     this->reset();
00014     *this=f;
00015 }
00016 
00017 auto_ptr<FitObject> ErfFitObject::clone() const throw() {
00018     return auto_ptr<FitObject>(new ErfFitObject(*this));
00019 }
00020 
00021 ErfFitObject& ErfFitObject::operator= (const TF1& f) throw(LogicError) {
00022     this->FitObject::operator=(f);
00023     return *this;
00024 }
00025 
00026 void ErfFitObject::init() throw() {
00027     this->setNDim(1);
00028     this->setNPar(3);
00029     try {
00030     this->setParName(0,"Prefact");
00031     this->setParName(1,"Mean");
00032     this->setParName(2,"Sigma");
00033     } catch (LogicError&) {} // Throw away LogicError that should never happen
00034     this->setFormula("erf");
00035 }
00036 
00037 // Call the appropriate constructor for making a ROOT TF1 object from this ErfFitObject::
00038 auto_ptr<TF1> ErfFitObject::makeBasicRootTF1() const throw(LogicError) {
00039     auto_ptr<TF1> r( new ::TF1("myerf", erf, this->getVarMin(0), this->getVarMax(0), 3));
00040     if (!r.get())
00041         throw InvariantViolatedError("ErfFitObject::makeBasicRootTF1()", __FILE__, __LINE__);
00042     return r;
00043 }
00044 
00045 }  // end of namespace SctData
00046 

Generated on Mon Dec 15 19:36:00 2003 for SCT DAQ/DCS Software by doxygen1.3-rc3