source: Sophya/trunk/SophyaPI/PIext/piafitting.h@ 384

Last change on this file since 384 was 384, checked in by ercodmgr, 26 years ago

Diverses modifs + Fonc. Link Dyn pour fitting - Reza+cmv 12/8/99

File size: 2.3 KB
Line 
1// This may look like C code, but it is really -*- C++ -*-
2// Classe d ajustement pour piapp
3// cmv 98-99
4// CEA-DAPNIA LAL-IN2P3/CNRS
5
6#ifndef PIAFITTING_H_SEEN
7#define PIAFITTING_H_SEEN
8
9#include "machdefs.h"
10#include <string>
11#include <vector>
12#if defined(__KCC__)
13using std::string ;
14#include <vector.h>
15#endif
16
17#include "anydataobj.h"
18
19#include "pdlmgr.h"
20#include "dlftypes.h"
21#include "piacmd.h"
22#include "cvector.h"
23
24class PIStdImgApp;
25class PIAFitterWind;
26class GeneralFunction;
27class GeneralFitData;
28class GeneralFit;
29class Histo;
30class Matrix; class Histo2D; class RzImage;
31
32class PIAFitter : public CmdExecutor {
33public :
34 PIAFitter(PIACmd* piac, PIStdImgApp* app);
35 virtual ~PIAFitter();
36 virtual int Execute(string& keyw, vector<string>& args);
37 virtual void LinkFitFunc(string const & fname, string const & funcname, int nvar, int npar);
38 virtual void PrepareFitFuncCFile(string const & fname, string const & funcname, int nvar, int npar);
39
40friend class PIAFitterWind;
41
42protected :
43
44typedef struct DFOptions {
45 bool okres, okfun;
46 int polcx,polcy; double xc,yc;
47 double err_e, err_E;
48 double stc2;
49 int nstep;
50 int lp,lpg;
51 int i1,i2,j1,j2;
52 bool fromlastfit;
53} DFOPTIONS ;
54
55void ResetDPointer(void);
56void ResetOptions(void);
57void DecodeOptions(string opt);
58void DecodeObject(string obj);
59void CheckOptions(void);
60void PrintOptions(void);
61void FillGData(void);
62void DecodeFunction(string func);
63void ReSetParam(void);
64void InitParFromLastFit(void);
65void DecodeParam(string par,string step,string min,string max,string fix);
66int DoFit(void);
67void FitFunRes(void);
68void LinFit(void);
69
70PIStdImgApp* mApp; // Do not delete
71PIAFitterWind* FWindFit;
72string mNObj; AnyDataObj* mObj; // Do not delete
73GeneralFunction* mFunc; string mFName;
74GeneralFitData* mGData;
75int mNPar,mNVar,mNBinX,mNBinY,mNData;
76Vector mPar; Vector mStep; Vector mMin; Vector mMax; Vector mFix;
77Vector mParSave; Vector mStepSave; Vector mMinSave; Vector mMaxSave; Vector mFixSave;
78GeneralFit* mFit;
79DFOPTIONS mOpt;
80DFOPTIONS mOptSave;
81// Objets a fitter
82Vector* mV; Histo* mH; // Do not delete
83Matrix* mM; Histo2D* mH2; RzImage* mIm; // Do not delete
84GeneralFitData* mG; // Do not delete
85
86// Gestion de fonction de fit user
87PDynLinkMgr* mDlUFunc;
88string mNameFitFunc;
89DlUserFitFunc mFitFunc;
90DlUserFitFuncDer mFitFuncDer;
91int mUFNVar, mUFNPar;
92};
93
94#endif
Note: See TracBrowser for help on using the repository browser.