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"
|
---|
12 |
|
---|
13 | //---------------------------------------------------------------
|
---|
14 | // Class Adaptateur d'objet (Pour NamedObjMgr) d'objet TMatrix
|
---|
15 | //---------------------------------------------------------------
|
---|
16 |
|
---|
17 | template <class T>
|
---|
18 | class NOMAdapter_TMatrix : public NObjMgrAdapter {
|
---|
19 | public:
|
---|
20 | NOMAdapter_TMatrix(TMatrix<T>* m = NULL);
|
---|
21 | virtual ~NOMAdapter_TMatrix();
|
---|
22 |
|
---|
23 | virtual NObjMgrAdapter* Clone(AnyDataObj* o);
|
---|
24 | virtual AnyDataObj* GetCopyObj();
|
---|
25 |
|
---|
26 | // virtual void ReadFits(string const & flnm);
|
---|
27 | // virtual void SaveFits(string const & flnm);
|
---|
28 | virtual void SavePPF(POutPersist& s, string const & nom);
|
---|
29 |
|
---|
30 | virtual void Print(ostream& os);
|
---|
31 | virtual PIDrawer* GetDrawer(string& dopt);
|
---|
32 | virtual P2DArrayAdapter* Get2DArray(string& dopt);
|
---|
33 | virtual NTupleInterface* GetNTupleInterface(bool& adel);
|
---|
34 |
|
---|
35 | protected:
|
---|
36 | TMatrix<T>* mMtx;
|
---|
37 | };
|
---|
38 |
|
---|
39 | // Class Interface NTuple pour TMatrix<T>
|
---|
40 |
|
---|
41 | template <class T>
|
---|
42 | class NTupInt_TMatrix : public NTupleInterface {
|
---|
43 | public:
|
---|
44 | NTupInt_TMatrix(TMatrix<T>* m);
|
---|
45 | virtual ~NTupInt_TMatrix();
|
---|
46 | virtual uint_4 NbLines() const ;
|
---|
47 | virtual uint_4 NbColumns() const ;
|
---|
48 | virtual r_8 * GetLineD(int n) const ;
|
---|
49 | virtual string VarList_C(const char* nomx=NULL) const ;
|
---|
50 | protected:
|
---|
51 | TMatrix<T>* mMtx;
|
---|
52 | mutable r_8 mRet[8];
|
---|
53 | };
|
---|
54 |
|
---|
55 |
|
---|
56 | #endif
|
---|