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

ErfFitObject.cpp

00001 #include "ErfFitObject.h"
00002 #include "FitFunctions.h"
00003 
00004 #include <TMath.h>
00005 #include <TH1.h>
00006 #include <TF1.h>
00007 
00008 using namespace Sct;
00009 
00010 namespace SctData {
00011 
00015 vector<string> ErfFitObject::createParNames() {
00016     vector<string> parNames(3);
00017     parNames[0] = "Prefact";
00018     parNames[1] = "Mean";
00019     parNames[2] = "Sigma";
00020     return parNames;
00021 }
00022 
00023 vector<string> ErfFitObject::parNames = ErfFitObject::createParNames();
00024     
00025 ErfFitObject::ErfFitObject() : FitObject("erf", 3, parNames) {
00026 }
00027 
00028 ErfFitObject::ErfFitObject(const TF1& f) : FitObject("erf", 3, parNames, f) {
00029 }
00030 
00031 shared_ptr<FitObject> ErfFitObject::clone() const throw() {
00032     return shared_ptr<FitObject>(new ErfFitObject(*this));
00033 }
00034 
00035 ErfFitObject& ErfFitObject::operator= (const TF1& f) throw(LogicError) {
00036     this->FitObject::operator=(f);
00037     return *this;
00038 }
00039 
00040 // Call the appropriate constructor for making a ROOT TF1 object from this ErfFitObject::
00041 auto_ptr<TF1> ErfFitObject::makeBasicRootTF1() const throw(LogicError) {
00042     auto_ptr<TF1> r( new ::TF1("myerf", erf, this->getVarMin(0), this->getVarMax(0), 3));
00043     if (!r.get())
00044         throw InvariantViolatedError("ErfFitObject::makeBasicRootTF1()", __FILE__, __LINE__);
00045     return r;
00046 }
00047 
00048 }  // end of namespace SctData
00049 

Generated on Thu Jul 15 09:50:45 2004 for SCT DAQ/DCS Software - C++ by doxygen 1.3.5