1 | // This may look like C code, but it is really -*- C++ -*-
|
---|
2 | // Adaptateur d objets (pour NamedObjMgr)
|
---|
3 | // pour les classes TMatrix<T>, TVector<T> de Sophya
|
---|
4 | // Reza 11/99
|
---|
5 | // LAL-IN2P3/CNRS CEA-DAPNIA
|
---|
6 |
|
---|
7 | #ifndef NOMTMATVECADAPTER_H_SEEN
|
---|
8 | #define NOMTMATVECADAPTER_H_SEEN
|
---|
9 |
|
---|
10 | #include "nomgadapter.h"
|
---|
11 | #include "tmatrix.h"
|
---|
12 | #include "generaldata.h"
|
---|
13 |
|
---|
14 | //---------------------------------------------------------------
|
---|
15 | // Class Adaptateur d'objet (Pour NamedObjMgr) d'objet TMatrix
|
---|
16 | //---------------------------------------------------------------
|
---|
17 |
|
---|
18 | template <class T>
|
---|
19 | class NOMAdapter_TMatrix : public NObjMgrAdapter {
|
---|
20 | public:
|
---|
21 | NOMAdapter_TMatrix(TMatrix<T>* m = NULL);
|
---|
22 | virtual ~NOMAdapter_TMatrix();
|
---|
23 |
|
---|
24 | virtual NObjMgrAdapter* Clone(AnyDataObj* o);
|
---|
25 |
|
---|
26 | virtual string GetDataObjType();
|
---|
27 |
|
---|
28 | virtual AnyDataObj* CloneDataObj(bool share=false);
|
---|
29 |
|
---|
30 | virtual void SavePPF(POutPersist& s, string const & nom);
|
---|
31 |
|
---|
32 | virtual void Print(ostream& os, int lev=0);
|
---|
33 | virtual PIDrawer* GetDrawer(string& dopt);
|
---|
34 | virtual P2DArrayAdapter* Get2DArray(string& dopt);
|
---|
35 | virtual NTupleInterface* GetNTupleInterface(bool& adel);
|
---|
36 |
|
---|
37 | virtual GeneralFitData* GetGeneralFitData(bool& adel
|
---|
38 | ,GeneralFitData::FitErrType errtype=GeneralFitData::DefaultError
|
---|
39 | ,double errscale=1.,double errmin=0.
|
---|
40 | ,int i1=0,int i2=-1,int j1=0,int j2=-1);
|
---|
41 | virtual AnyDataObj* FitResidusObj(GeneralFit& mfit);
|
---|
42 | virtual AnyDataObj* FitFunctionObj(GeneralFit& mfit);
|
---|
43 |
|
---|
44 | protected:
|
---|
45 | TMatrix<T>* mMtx;
|
---|
46 | };
|
---|
47 |
|
---|
48 | // Class Interface NTuple pour TMatrix<T>
|
---|
49 |
|
---|
50 | template <class T>
|
---|
51 | class NTupInt_TMatrix : public NTupleInterface {
|
---|
52 | public:
|
---|
53 | NTupInt_TMatrix(TMatrix<T>* m);
|
---|
54 | virtual ~NTupInt_TMatrix();
|
---|
55 | virtual sa_size_t NbLines() const ;
|
---|
56 | virtual sa_size_t NbColumns() const ;
|
---|
57 | virtual r_8 * GetLineD(sa_size_t n) const ;
|
---|
58 | virtual string VarList_C(const char* nomx=NULL) const ;
|
---|
59 | protected:
|
---|
60 | TMatrix<T>* mMtx;
|
---|
61 | mutable r_8 mRet[8];
|
---|
62 | };
|
---|
63 |
|
---|
64 |
|
---|
65 | #endif
|
---|