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