[295] | 1 | // This may look like C code, but it is really -*- C++ -*-
|
---|
| 2 | // Adaptateur d objets (pour NamedObjMgr) pour Histos/NTuple
|
---|
| 3 | // Reza 05/99
|
---|
| 4 | // LAL-IN2P3/CNRS CEA-DAPNIA
|
---|
| 5 |
|
---|
| 6 | #ifndef NOMMATVECADAPTER_H_SEEN
|
---|
| 7 | #define NOMMATVECADAPTER_H_SEEN
|
---|
| 8 |
|
---|
| 9 | #include "nomgadapter.h"
|
---|
[1207] | 10 | #include "generalfit.h"
|
---|
[544] | 11 |
|
---|
| 12 | #ifdef SANS_EVOLPLANCK
|
---|
[295] | 13 | #include "matrix.h"
|
---|
| 14 | #include "cvector.h"
|
---|
[544] | 15 | #else
|
---|
| 16 | #include "tmatrix.h"
|
---|
| 17 | #include "tvector.h"
|
---|
| 18 | #endif
|
---|
[295] | 19 |
|
---|
| 20 | //---------------------------------------------------------------
|
---|
| 21 | // Class Adaptateur d'objet (Pour NamedObjMgr) d'objet Vector
|
---|
| 22 | //---------------------------------------------------------------
|
---|
| 23 |
|
---|
| 24 | class NOMAdapter_Vector : public NObjMgrAdapter {
|
---|
| 25 | public:
|
---|
| 26 | NOMAdapter_Vector(Vector* v = NULL);
|
---|
| 27 | virtual ~NOMAdapter_Vector();
|
---|
| 28 |
|
---|
| 29 | virtual NObjMgrAdapter* Clone(AnyDataObj* o);
|
---|
| 30 |
|
---|
[1165] | 31 | virtual string GetDataObjType();
|
---|
| 32 |
|
---|
[1315] | 33 | virtual AnyDataObj* CloneDataObj(bool share=false);
|
---|
[1165] | 34 |
|
---|
[295] | 35 | virtual void SavePPF(POutPersist& s, string const & nom);
|
---|
| 36 |
|
---|
| 37 | virtual void Print(ostream& os);
|
---|
| 38 | virtual PIDrawer* GetDrawer(string& dopt);
|
---|
[344] | 39 | virtual NTupleInterface* GetNTupleInterface(bool& adel);
|
---|
[295] | 40 |
|
---|
[1207] | 41 | virtual GeneralFitData* GetGeneralFitData(bool& adel
|
---|
| 42 | ,GeneralFitData::FitErrType errtype=GeneralFitData::DefaultError
|
---|
| 43 | ,double errscale=1.,double errmin=0.
|
---|
| 44 | ,int i1=0,int i2=-1,int j1=0,int j2=-1);
|
---|
| 45 | virtual AnyDataObj* FitResidusObj(GeneralFit& mfit);
|
---|
| 46 | virtual AnyDataObj* FitFunctionObj(GeneralFit& mfit);
|
---|
| 47 |
|
---|
[295] | 48 | protected:
|
---|
| 49 | Vector* mVec;
|
---|
| 50 | };
|
---|
| 51 |
|
---|
| 52 | // Class Interface NTuple pour Vector
|
---|
| 53 | class NTupInt_Vector : public NTupleInterface {
|
---|
| 54 | public:
|
---|
| 55 | NTupInt_Vector(Vector* v);
|
---|
| 56 | virtual ~NTupInt_Vector();
|
---|
[2683] | 57 | virtual sa_size_t NbLines() const ;
|
---|
| 58 | virtual sa_size_t NbColumns() const ;
|
---|
| 59 | virtual r_8 * GetLineD(sa_size_t n) const ;
|
---|
[326] | 60 | virtual string VarList_C(const char* nomx=NULL) const ;
|
---|
[295] | 61 | protected:
|
---|
| 62 | Vector* mVec;
|
---|
[326] | 63 | mutable r_8 mRet[2];
|
---|
[295] | 64 | };
|
---|
| 65 |
|
---|
| 66 |
|
---|
| 67 |
|
---|
| 68 | //---------------------------------------------------------------
|
---|
| 69 | // Class Adaptateur d'objet (Pour NamedObjMgr) d'objet Matrix
|
---|
| 70 | //---------------------------------------------------------------
|
---|
| 71 |
|
---|
| 72 | class NOMAdapter_Matrix : public NObjMgrAdapter {
|
---|
| 73 | public:
|
---|
| 74 | NOMAdapter_Matrix(Matrix* m = NULL);
|
---|
| 75 | virtual ~NOMAdapter_Matrix();
|
---|
| 76 |
|
---|
| 77 | virtual NObjMgrAdapter* Clone(AnyDataObj* o);
|
---|
| 78 |
|
---|
[1165] | 79 | virtual string GetDataObjType();
|
---|
| 80 |
|
---|
[1315] | 81 | virtual AnyDataObj* CloneDataObj(bool share=false);
|
---|
[1165] | 82 |
|
---|
[295] | 83 | virtual void SavePPF(POutPersist& s, string const & nom);
|
---|
| 84 |
|
---|
| 85 | virtual void Print(ostream& os);
|
---|
| 86 | virtual P2DArrayAdapter* Get2DArray(string& dopt);
|
---|
[344] | 87 | virtual NTupleInterface* GetNTupleInterface(bool& adel);
|
---|
[295] | 88 |
|
---|
[1207] | 89 | virtual GeneralFitData* GetGeneralFitData(bool& adel
|
---|
| 90 | ,GeneralFitData::FitErrType errtype=GeneralFitData::DefaultError
|
---|
| 91 | ,double errscale=1.,double errmin=0.
|
---|
| 92 | ,int i1=0,int i2=-1,int j1=0,int j2=-1);
|
---|
| 93 | virtual AnyDataObj* FitResidusObj(GeneralFit& mfit);
|
---|
| 94 | virtual AnyDataObj* FitFunctionObj(GeneralFit& mfit);
|
---|
| 95 |
|
---|
[295] | 96 | protected:
|
---|
| 97 | Matrix* mMtx;
|
---|
| 98 | };
|
---|
| 99 |
|
---|
| 100 | // Class Interface NTuple pour Matrix
|
---|
| 101 |
|
---|
| 102 | class NTupInt_Matrix : public NTupleInterface {
|
---|
| 103 | public:
|
---|
| 104 | NTupInt_Matrix(Matrix* m);
|
---|
| 105 | virtual ~NTupInt_Matrix();
|
---|
[2683] | 106 | virtual sa_size_t NbLines() const ;
|
---|
| 107 | virtual sa_size_t NbColumns() const ;
|
---|
| 108 | virtual r_8 * GetLineD(sa_size_t n) const ;
|
---|
[326] | 109 | virtual string VarList_C(const char* nomx=NULL) const ;
|
---|
[295] | 110 | protected:
|
---|
| 111 | Matrix* mMtx;
|
---|
[326] | 112 | mutable r_8 mRet[3];
|
---|
[295] | 113 | };
|
---|
| 114 |
|
---|
| 115 |
|
---|
| 116 | #endif
|
---|