[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);
|
---|
[463] | 29 | virtual AnyDataObj* GetCopyObj();
|
---|
[295] | 30 |
|
---|
| 31 | // virtual void ReadFits(string const & flnm);
|
---|
| 32 | // virtual void SaveFits(string const & flnm);
|
---|
| 33 | virtual void SavePPF(POutPersist& s, string const & nom);
|
---|
| 34 |
|
---|
| 35 | virtual void Print(ostream& os);
|
---|
| 36 | virtual PIDrawer* GetDrawer(string& dopt);
|
---|
[344] | 37 | virtual NTupleInterface* GetNTupleInterface(bool& adel);
|
---|
[295] | 38 |
|
---|
| 39 | protected:
|
---|
| 40 | Vector* mVec;
|
---|
| 41 | };
|
---|
| 42 |
|
---|
| 43 | // Class Interface NTuple pour Vector
|
---|
| 44 | class NTupInt_Vector : public NTupleInterface {
|
---|
| 45 | public:
|
---|
| 46 | NTupInt_Vector(Vector* v);
|
---|
| 47 | virtual ~NTupInt_Vector();
|
---|
[326] | 48 | virtual uint_4 NbLines() const ;
|
---|
| 49 | virtual uint_4 NbColumns() const ;
|
---|
| 50 | virtual r_8 * GetLineD(int n) const ;
|
---|
| 51 | virtual string VarList_C(const char* nomx=NULL) const ;
|
---|
[295] | 52 | protected:
|
---|
| 53 | Vector* mVec;
|
---|
[326] | 54 | mutable r_8 mRet[2];
|
---|
[295] | 55 | };
|
---|
| 56 |
|
---|
| 57 |
|
---|
| 58 |
|
---|
| 59 | //---------------------------------------------------------------
|
---|
| 60 | // Class Adaptateur d'objet (Pour NamedObjMgr) d'objet Matrix
|
---|
| 61 | //---------------------------------------------------------------
|
---|
| 62 |
|
---|
| 63 | class NOMAdapter_Matrix : public NObjMgrAdapter {
|
---|
| 64 | public:
|
---|
| 65 | NOMAdapter_Matrix(Matrix* m = NULL);
|
---|
| 66 | virtual ~NOMAdapter_Matrix();
|
---|
| 67 |
|
---|
| 68 | virtual NObjMgrAdapter* Clone(AnyDataObj* o);
|
---|
[463] | 69 | virtual AnyDataObj* GetCopyObj();
|
---|
[295] | 70 |
|
---|
| 71 | // virtual void ReadFits(string const & flnm);
|
---|
| 72 | // virtual void SaveFits(string const & flnm);
|
---|
| 73 | virtual void SavePPF(POutPersist& s, string const & nom);
|
---|
| 74 |
|
---|
| 75 | virtual void Print(ostream& os);
|
---|
| 76 | virtual P2DArrayAdapter* Get2DArray(string& dopt);
|
---|
[344] | 77 | virtual NTupleInterface* GetNTupleInterface(bool& adel);
|
---|
[295] | 78 |
|
---|
| 79 | protected:
|
---|
| 80 | Matrix* mMtx;
|
---|
| 81 | };
|
---|
| 82 |
|
---|
| 83 | // Class Interface NTuple pour Matrix
|
---|
| 84 |
|
---|
| 85 | class NTupInt_Matrix : public NTupleInterface {
|
---|
| 86 | public:
|
---|
| 87 | NTupInt_Matrix(Matrix* m);
|
---|
| 88 | virtual ~NTupInt_Matrix();
|
---|
[326] | 89 | virtual uint_4 NbLines() const ;
|
---|
| 90 | virtual uint_4 NbColumns() const ;
|
---|
| 91 | virtual r_8 * GetLineD(int n) const ;
|
---|
| 92 | virtual string VarList_C(const char* nomx=NULL) const ;
|
---|
[295] | 93 | protected:
|
---|
| 94 | Matrix* mMtx;
|
---|
[326] | 95 | mutable r_8 mRet[3];
|
---|
[295] | 96 | };
|
---|
| 97 |
|
---|
| 98 |
|
---|
| 99 | #endif
|
---|