00001 /* -*- mode:c++ -*- */ 00002 00016 class FunctionController 00017 { 00018 %TypeHeaderCode 00019 #include "controllers/FunctionController.h" 00020 %End 00021 00022 private: 00023 00024 FunctionController (); 00025 00026 public: 00027 00028 static FunctionController * instance (); 00029 00030 FunctionBase * addFunction ( PlotterBase *, const std::string & ) 00031 throw ( FactoryException ); 00032 00033 bool fitFunction ( PlotterBase *, unsigned int = 0 ); 00034 double getChiSquared ( const PlotterBase * ); 00035 int getDegreesOfFreedom ( const PlotterBase * ); 00036 const std::vector < double > parameters ( PlotterBase *, 00037 unsigned int = 0 ); 00038 const std::vector < double > principleErrors ( PlotterBase *, 00039 unsigned int = 0 ); 00040 const std::vector < double > getErrors ( const PlotterBase * ); 00041 void saveParameters ( PlotterBase * ); 00042 void restoreParameters ( PlotterBase * ); 00043 void removeFunction ( PlotterBase *, unsigned int = 0 ); 00044 NTuple * createNTuple ( PlotterBase * ) /Factory/; 00045 00048 const std::vector < std::string > & getFitterNames () const; 00049 00052 Fitter * getFitter ( const PlotterBase * ); 00053 00057 const std::string & getFitterName ( const PlotterBase * ); 00058 00065 bool setFitter ( const PlotterBase *, const std::string & ); 00066 00073 void setFitRange ( PlotterBase *, double, double ); 00074 00075 };