1 | // Guy Le Meur 03/2000
|
---|
2 |
|
---|
3 |
|
---|
4 | #ifndef FITSNTuple_SEEN
|
---|
5 | #define FITSNTuple_SEEN
|
---|
6 | #include "ntuple.h"
|
---|
7 | #include "anydataobj.h"
|
---|
8 | #include "ppersist.h"
|
---|
9 | #include "fitsfile.h"
|
---|
10 |
|
---|
11 | namespace SOPHYA {
|
---|
12 | ///////////////////////////////////////////////////////////////////
|
---|
13 | // Classe pour la gestion de persistance sur fichiers fits
|
---|
14 | // pout NTuple
|
---|
15 | ////////////////////////////////////////////////////////////////
|
---|
16 | class FITS_NTuple : public FitsFile
|
---|
17 | {
|
---|
18 |
|
---|
19 | public:
|
---|
20 |
|
---|
21 | FITS_NTuple();
|
---|
22 | FITS_NTuple(char inputfile[],int hdunum=2);
|
---|
23 | FITS_NTuple(const NTuple & obj);
|
---|
24 | FITS_NTuple(NTuple* obj);
|
---|
25 | virtual ~FITS_NTuple();
|
---|
26 | void Read(char inputfile[],int hdunum=2);
|
---|
27 | /*!
|
---|
28 | fill the XNTuple only with lines from firstLine-th to (firstLine+numberOfLines-1)-th of the FITS-file inputfile.
|
---|
29 | \param <firstLine> first line to be read (the first line of the file is numbered 0)
|
---|
30 | \param <numberOfLines> number of lines to be read
|
---|
31 | */
|
---|
32 | void ReadLines(char inputfile[],int firstLine, int numberOfLines,int hdunum=2);
|
---|
33 | void Write(char outputfile[], bool OldFile=false);
|
---|
34 | inline operator NTuple() { return(*dobj_); }
|
---|
35 | inline NTuple * getObj() { return(dobj_); }
|
---|
36 |
|
---|
37 | protected:
|
---|
38 |
|
---|
39 | // implementation de FitsFile
|
---|
40 | //virtual void ReadFromFits(FitsFile& fn);
|
---|
41 | virtual void ReadFromFits();
|
---|
42 | virtual void WriteToFits();
|
---|
43 |
|
---|
44 | float* getColFromObj(int colNr);
|
---|
45 |
|
---|
46 | private :
|
---|
47 |
|
---|
48 | inline void InitNull()
|
---|
49 | {
|
---|
50 | fistLineToBeRead_= -1;
|
---|
51 | numberOfLinesToBeRead_= -1;
|
---|
52 | column_ = NULL;
|
---|
53 | }
|
---|
54 |
|
---|
55 |
|
---|
56 | // attributs de classe
|
---|
57 | NTuple* dobj_;
|
---|
58 | bool ownobj_;
|
---|
59 | int fistLineToBeRead_;
|
---|
60 | int numberOfLinesToBeRead_;
|
---|
61 | float* column_;
|
---|
62 | };
|
---|
63 | //////////////////////////////////////////////////////////////////
|
---|
64 |
|
---|
65 |
|
---|
66 | } // Fin du namespace
|
---|
67 |
|
---|
68 | #endif
|
---|