[585] | 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"
|
---|
[1207] | 12 | #include "generaldata.h"
|
---|
[585] | 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 |
|
---|
[1165] | 26 | virtual string GetDataObjType();
|
---|
| 27 |
|
---|
[1315] | 28 | virtual AnyDataObj* CloneDataObj(bool share=false);
|
---|
[1165] | 29 |
|
---|
[1321] | 30 | virtual void ReadFits(string const & flnm);
|
---|
| 31 | virtual void SaveFits(string const & flnm);
|
---|
[585] | 32 | virtual void SavePPF(POutPersist& s, string const & nom);
|
---|
| 33 |
|
---|
| 34 | virtual void Print(ostream& os);
|
---|
| 35 | virtual PIDrawer* GetDrawer(string& dopt);
|
---|
| 36 | virtual P2DArrayAdapter* Get2DArray(string& dopt);
|
---|
| 37 | virtual NTupleInterface* GetNTupleInterface(bool& adel);
|
---|
| 38 |
|
---|
[1207] | 39 | virtual GeneralFitData* GetGeneralFitData(bool& adel
|
---|
| 40 | ,GeneralFitData::FitErrType errtype=GeneralFitData::DefaultError
|
---|
| 41 | ,double errscale=1.,double errmin=0.
|
---|
| 42 | ,int i1=0,int i2=-1,int j1=0,int j2=-1);
|
---|
| 43 | virtual AnyDataObj* FitResidusObj(GeneralFit& mfit);
|
---|
| 44 | virtual AnyDataObj* FitFunctionObj(GeneralFit& mfit);
|
---|
| 45 |
|
---|
[585] | 46 | protected:
|
---|
| 47 | TMatrix<T>* mMtx;
|
---|
| 48 | };
|
---|
| 49 |
|
---|
| 50 | // Class Interface NTuple pour TMatrix<T>
|
---|
| 51 |
|
---|
| 52 | template <class T>
|
---|
| 53 | class NTupInt_TMatrix : public NTupleInterface {
|
---|
| 54 | public:
|
---|
| 55 | NTupInt_TMatrix(TMatrix<T>* m);
|
---|
| 56 | virtual ~NTupInt_TMatrix();
|
---|
| 57 | virtual uint_4 NbLines() const ;
|
---|
| 58 | virtual uint_4 NbColumns() const ;
|
---|
| 59 | virtual r_8 * GetLineD(int n) const ;
|
---|
| 60 | virtual string VarList_C(const char* nomx=NULL) const ;
|
---|
| 61 | protected:
|
---|
| 62 | TMatrix<T>* mMtx;
|
---|
| 63 | mutable r_8 mRet[8];
|
---|
| 64 | };
|
---|
| 65 |
|
---|
| 66 |
|
---|
| 67 | #endif
|
---|