source: Sophya/trunk/SophyaPI/PIext/nomtarradapter.h@ 2180

Last change on this file since 2180 was 1321, checked in by ercodmgr, 25 years ago

Adaptateur de TArray et lecture FITS - Reza 13/11/2000

File size: 1.7 KB
Line 
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 NOMTARRAYADAPTER_H_SEEN
8#define NOMTARRAYADAPTER_H_SEEN
9
10#include "nomgadapter.h"
11#include "tarray.h"
12
13//---------------------------------------------------------------
14// Class Adaptateur d'objet (Pour NamedObjMgr) d'objet TArray
15//---------------------------------------------------------------
16
17template <class T>
18class NOMAdapter_TArray : public NObjMgrAdapter {
19public:
20 NOMAdapter_TArray(TArray<T>* m = NULL);
21 virtual ~NOMAdapter_TArray();
22
23 virtual NObjMgrAdapter* Clone(AnyDataObj* o);
24
25 virtual string GetDataObjType();
26
27 virtual AnyDataObj* CloneDataObj(bool share=false);
28
29 virtual void ReadFits(string const & flnm);
30 virtual void SaveFits(string const & flnm);
31 virtual void SavePPF(POutPersist& s, string const & nom);
32
33 virtual void Print(ostream& os);
34 virtual PIDrawer* GetDrawer(string& dopt);
35 virtual P2DArrayAdapter* Get2DArray(string& dopt);
36 virtual NTupleInterface* GetNTupleInterface(bool& adel);
37
38protected:
39 TArray<T>* mArr;
40};
41
42// Class Interface NTuple pour TArray<T>
43
44template <class T>
45class NTupInt_TArray : public NTupleInterface {
46public:
47 NTupInt_TArray(TArray<T>* m);
48 virtual ~NTupInt_TArray();
49 virtual uint_4 NbLines() const ;
50 virtual uint_4 NbColumns() const ;
51 virtual r_8 * GetLineD(int n) const ;
52 virtual string VarList_C(const char* nomx=NULL) const ;
53protected:
54 TArray<T>* mArr;
55 mutable r_8 mRet[11];
56};
57
58
59#endif
Note: See TracBrowser for help on using the repository browser.