source: Sophya/trunk/SophyaExt/FitsIOServer/fitsxntuple.h@ 1049

Last change on this file since 1049 was 1049, checked in by ansari, 25 years ago

Ajout methodes Fits(X)NTuple::getObj() - R. Ansari 28/6/2000

File size: 1.9 KB
Line 
1// Guy Le Meur 03/2000
2
3
4#ifndef FITSXNTuple_SEEN
5#define FITSXNTuple_SEEN
6#include "xntuple.h"
7#include "anydataobj.h"
8#include "ppersist.h"
9#include "fitsfile.h"
10
11namespace SOPHYA {
12///////////////////////////////////////////////////////////
13// Les objets delegues pour la gestion de persistance sur fichiers fits
14// pour XNTuple
15///////////////////////////////////////////////////////////
16
17class FITS_XNTuple : public FitsFile
18{
19
20public:
21FITS_XNTuple();
22FITS_XNTuple(char inputfile[],int hdunum=2);
23FITS_XNTuple(const XNTuple & obj);
24FITS_XNTuple(XNTuple* obj);
25~FITS_XNTuple();
26 void Read(char inputfile[],int hdunum=2);
27
28/*!
29fill the XNTuple only with lines from firstLine-th to (firstLine+numberOfLines-1)-th of the FITS-file inputfile.
30\param <firstLine> first line to be read (the first line of the file is numbered 0)
31\param <numberOfLines> number of lines to be read
32*/
33void ReadLines(char inputfile[],int firstLine, int numberOfLines,int hdunum=2);
34void Write(char outputfile[], bool OldFile=false);
35inline operator XNTuple() { return(*dobj_); }
36inline XNTuple * getObj() { return(dobj_); }
37
38protected:
39
40 // implementation de FitsFile
41// virtual void ReadFromFits(FitsFile& fn);
42 virtual void ReadFromFits();
43virtual void WriteToFits();
44void* getColFromObj(int colNr);
45double* getColDFromObj(int colNr);
46float* getColFFromObj(int colNr);
47int* getColIFromObj(int colNr);
48char** getColSFromObj(int colNr);
49
50 private :
51
52 void Clean();
53
54inline void InitNull()
55 {
56 fistLineToBeRead_= -1;
57 numberOfLinesToBeRead_= -1;
58 dcolumn_ = NULL;
59 fcolumn_ = NULL;
60 icolumn_ = NULL;
61 ccolumn_ = NULL;
62 }
63
64 // attributs de classe
65 XNTuple* dobj_;
66 bool ownobj_;
67 int fistLineToBeRead_;
68 int numberOfLinesToBeRead_;
69 double* dcolumn_;
70 float* fcolumn_;
71 int* icolumn_;
72 char** ccolumn_;
73};
74//////////////////////////////////////////////////////////////////
75
76
77} // Fin du namespace
78
79#endif
Note: See TracBrowser for help on using the repository browser.