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