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

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

user function for fit cmv 13/8/99

File size: 2.6 KB
RevLine 
[361]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"
[379]22#include "cvector.h"
[361]23
24class PIStdImgApp;
[379]25class PIAFitterWind;
[385]26class GeneralFunction; class GeneralFunc; class GeneralFit;
[379]27class GeneralFitData;
[385]28class Histo; class Matrix; class Histo2D; class RzImage;
[361]29
30class PIAFitter : public CmdExecutor {
31public :
[379]32 PIAFitter(PIACmd* piac, PIStdImgApp* app);
33 virtual ~PIAFitter();
34 virtual int Execute(string& keyw, vector<string>& args);
[385]35 virtual void LinkFitFunc(string const& fname, string const& funcname
36 ,int nvar,int npar);
37 virtual void PrepareFitFuncCFile(string const& fname, string const& funcname
38 ,int nvar,int npar);
[361]39
[379]40friend class PIAFitterWind;
[361]41
42protected :
[379]43
[361]44typedef struct DFOptions {
[379]45 bool okres, okfun;
[361]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;
[379]52 bool fromlastfit;
[361]53} DFOPTIONS ;
54
[379]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
[385]70// Graphique
[379]71PIStdImgApp* mApp; // Do not delete
[385]72PIAFitterWind* FWindFit; // Fenetre de config interactive
73// Objet a fitter
[379]74string mNObj; AnyDataObj* mObj; // Do not delete
[385]75// Structure de data pour le fit, parametres et options
[379]76GeneralFitData* mGData;
77int mNPar,mNVar,mNBinX,mNBinY,mNData;
78Vector mPar; Vector mStep; Vector mMin; Vector mMax; Vector mFix;
79Vector mParSave; Vector mStepSave; Vector mMinSave; Vector mMaxSave; Vector mFixSave;
80GeneralFit* mFit;
81DFOPTIONS mOpt;
82DFOPTIONS mOptSave;
[385]83// Possibles objets a fitter
[379]84Vector* mV; Histo* mH; // Do not delete
85Matrix* mM; Histo2D* mH2; RzImage* mIm; // Do not delete
86GeneralFitData* mG; // Do not delete
[385]87// Gestion des fonctions de fit predefinies
88GeneralFunction* mFunction; string mFName;
89// Gestion de fonction de fit definie par l'utilisateur
90GeneralFunc* mFunc;
[384]91PDynLinkMgr* mDlUFunc;
92string mNameFitFunc;
93DlUserFitFunc mFitFunc;
94DlUserFitFuncDer mFitFuncDer;
95int mUFNVar, mUFNPar;
[361]96};
97
98#endif
Note: See TracBrowser for help on using the repository browser.