source: Sophya/trunk/SophyaPI/PIext/nommatvecadapter.h@ 376

Last change on this file since 376 was 344, checked in by ercodmgr, 26 years ago

1/ Extension de fonctionalites de gestion de repertoires (Lock, ...)
2/ Plus de NTupIntf_Adapter quand les objets heritent de NTupleInterface
3/ Support pour affichage info texte, ds PINtuple et PIStarList

File size: 2.6 KB
Line 
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
17class NOMAdapter_Vector : public NObjMgrAdapter {
18public:
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);
30 virtual NTupleInterface* GetNTupleInterface(bool& adel);
31
32protected:
33 Vector* mVec;
34};
35
36// Class Interface NTuple pour Vector
37class NTupInt_Vector : public NTupleInterface {
38public:
39 NTupInt_Vector(Vector* v);
40 virtual ~NTupInt_Vector();
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 ;
45protected:
46 Vector* mVec;
47 mutable r_8 mRet[2];
48};
49
50
51
52//---------------------------------------------------------------
53// Class Adaptateur d'objet (Pour NamedObjMgr) d'objet Matrix
54//---------------------------------------------------------------
55
56class NOMAdapter_Matrix : public NObjMgrAdapter {
57public:
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);
69 virtual NTupleInterface* GetNTupleInterface(bool& adel);
70
71protected:
72 Matrix* mMtx;
73};
74
75// Class Interface NTuple pour Matrix
76
77class NTupInt_Matrix : public NTupleInterface {
78public:
79 NTupInt_Matrix(Matrix* m);
80 virtual ~NTupInt_Matrix();
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 ;
85protected:
86 Matrix* mMtx;
87 mutable r_8 mRet[3];
88};
89
90
91#endif
Note: See TracBrowser for help on using the repository browser.