[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"
|
---|
[544] | 10 |
|
---|
| 11 | #ifdef SANS_EVOLPLANCK
|
---|
[295] | 12 | #include "matrix.h"
|
---|
| 13 | #include "cvector.h"
|
---|
[544] | 14 | #else
|
---|
| 15 | #include "tmatrix.h"
|
---|
| 16 | #include "tvector.h"
|
---|
| 17 | #endif
|
---|
[295] | 18 |
|
---|
| 19 | //---------------------------------------------------------------
|
---|
| 20 | // Class Adaptateur d'objet (Pour NamedObjMgr) d'objet Vector
|
---|
| 21 | //---------------------------------------------------------------
|
---|
| 22 |
|
---|
| 23 | class NOMAdapter_Vector : public NObjMgrAdapter {
|
---|
| 24 | public:
|
---|
| 25 | NOMAdapter_Vector(Vector* v = NULL);
|
---|
| 26 | virtual ~NOMAdapter_Vector();
|
---|
| 27 |
|
---|
| 28 | virtual NObjMgrAdapter* Clone(AnyDataObj* o);
|
---|
| 29 |
|
---|
[1165] | 30 | virtual string GetDataObjType();
|
---|
| 31 |
|
---|
| 32 | virtual AnyDataObj* CloneDataObj();
|
---|
| 33 |
|
---|
[295] | 34 | // virtual void ReadFits(string const & flnm);
|
---|
| 35 | // virtual void SaveFits(string const & flnm);
|
---|
| 36 | virtual void SavePPF(POutPersist& s, string const & nom);
|
---|
| 37 |
|
---|
| 38 | virtual void Print(ostream& os);
|
---|
| 39 | virtual PIDrawer* GetDrawer(string& dopt);
|
---|
[344] | 40 | virtual NTupleInterface* GetNTupleInterface(bool& adel);
|
---|
[295] | 41 |
|
---|
| 42 | protected:
|
---|
| 43 | Vector* mVec;
|
---|
| 44 | };
|
---|
| 45 |
|
---|
| 46 | // Class Interface NTuple pour Vector
|
---|
| 47 | class NTupInt_Vector : public NTupleInterface {
|
---|
| 48 | public:
|
---|
| 49 | NTupInt_Vector(Vector* v);
|
---|
| 50 | virtual ~NTupInt_Vector();
|
---|
[326] | 51 | virtual uint_4 NbLines() const ;
|
---|
| 52 | virtual uint_4 NbColumns() const ;
|
---|
| 53 | virtual r_8 * GetLineD(int n) const ;
|
---|
| 54 | virtual string VarList_C(const char* nomx=NULL) const ;
|
---|
[295] | 55 | protected:
|
---|
| 56 | Vector* mVec;
|
---|
[326] | 57 | mutable r_8 mRet[2];
|
---|
[295] | 58 | };
|
---|
| 59 |
|
---|
| 60 |
|
---|
| 61 |
|
---|
| 62 | //---------------------------------------------------------------
|
---|
| 63 | // Class Adaptateur d'objet (Pour NamedObjMgr) d'objet Matrix
|
---|
| 64 | //---------------------------------------------------------------
|
---|
| 65 |
|
---|
| 66 | class NOMAdapter_Matrix : public NObjMgrAdapter {
|
---|
| 67 | public:
|
---|
| 68 | NOMAdapter_Matrix(Matrix* m = NULL);
|
---|
| 69 | virtual ~NOMAdapter_Matrix();
|
---|
| 70 |
|
---|
| 71 | virtual NObjMgrAdapter* Clone(AnyDataObj* o);
|
---|
| 72 |
|
---|
[1165] | 73 | virtual string GetDataObjType();
|
---|
| 74 |
|
---|
| 75 | virtual AnyDataObj* CloneDataObj();
|
---|
| 76 |
|
---|
[295] | 77 | // virtual void ReadFits(string const & flnm);
|
---|
| 78 | // virtual void SaveFits(string const & flnm);
|
---|
| 79 | virtual void SavePPF(POutPersist& s, string const & nom);
|
---|
| 80 |
|
---|
| 81 | virtual void Print(ostream& os);
|
---|
| 82 | virtual P2DArrayAdapter* Get2DArray(string& dopt);
|
---|
[344] | 83 | virtual NTupleInterface* GetNTupleInterface(bool& adel);
|
---|
[295] | 84 |
|
---|
| 85 | protected:
|
---|
| 86 | Matrix* mMtx;
|
---|
| 87 | };
|
---|
| 88 |
|
---|
| 89 | // Class Interface NTuple pour Matrix
|
---|
| 90 |
|
---|
| 91 | class NTupInt_Matrix : public NTupleInterface {
|
---|
| 92 | public:
|
---|
| 93 | NTupInt_Matrix(Matrix* m);
|
---|
| 94 | virtual ~NTupInt_Matrix();
|
---|
[326] | 95 | virtual uint_4 NbLines() const ;
|
---|
| 96 | virtual uint_4 NbColumns() const ;
|
---|
| 97 | virtual r_8 * GetLineD(int n) const ;
|
---|
| 98 | virtual string VarList_C(const char* nomx=NULL) const ;
|
---|
[295] | 99 | protected:
|
---|
| 100 | Matrix* mMtx;
|
---|
[326] | 101 | mutable r_8 mRet[3];
|
---|
[295] | 102 | };
|
---|
| 103 |
|
---|
| 104 |
|
---|
| 105 | #endif
|
---|