00001 /* -*- mode: c++ -*- */ 00002 00014 #ifndef _FunctionRep_H_ 00015 #define _FunctionRep_H_ 00016 00017 #include "DataRep.h" 00018 00019 class Fitter; 00020 class FunctionBase; 00021 class FunctionProjector; 00022 class TupleCut; 00023 00036 class MDL_HIPPOPLOT_API FunctionRep : public DataRep 00037 { 00038 00039 private: 00040 00045 DataRep * m_target; 00046 00049 FunctionRep ( const FunctionRep & ); 00050 00051 public: 00052 00056 FunctionRep ( const std::string & name, DataRep * rep ); 00057 00058 FunctionRep ( FunctionBase * function, DataRep * rep ); 00059 00063 virtual ~FunctionRep (); 00064 00067 virtual DataRep * clone (); 00068 00071 void initializeWith ( DataRep * ); 00072 00074 virtual bool hasNTupleBindings () const; 00075 00078 bool isComposite () const; 00079 00081 FunctionBase * getFunction () const; 00082 00084 DataRep * getTarget () const; 00085 00088 void setTarget ( DataRep * rep ); 00089 00092 void setFitter ( Fitter * fitter ); 00093 00095 Fitter * getFitter ( ) const; 00096 00098 const std::string & getFitterName () const; 00099 00102 bool fitFunction ( ); 00103 00106 const std::vector < std::string > & parmNames () const; 00107 00111 const std::vector < int > & getFixedFlags () const; 00112 00114 const std::vector < double > & parameters () const; 00115 00117 const std::vector< double > & principleErrors() const; 00118 00120 void saveParameters (); 00121 00123 void restoreParameters (); 00124 00126 void setParameters ( const std::vector<double> & params ); 00127 00130 void setFixedFlags ( const std::vector < int > & flags ); 00131 00133 void update ( const Observable * observed ); 00134 00138 virtual bool isTargetable () const; 00139 00140 virtual bool hasAxis ( hippodraw::Axes::Type ) const; 00141 00144 void setCutRange ( const Range & ); 00145 00148 void setCutRange ( bool yes = true ); 00149 00150 }; 00151 00152 #endif // _FunctionRep_H_