Last change
on this file since 1047 was 1047, checked in by ansari, 25 years ago |
modifs pour introduction lecteur de fits par lignes
|
File size:
1.6 KB
|
Line | |
---|
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 |
|
---|
36 | protected:
|
---|
37 |
|
---|
38 | // implementation de FitsFile
|
---|
39 | //virtual void ReadFromFits(FitsFile& fn);
|
---|
40 | virtual void ReadFromFits();
|
---|
41 | virtual void WriteToFits();
|
---|
42 |
|
---|
43 | float* getColFromObj(int colNr);
|
---|
44 |
|
---|
45 | private :
|
---|
46 |
|
---|
47 | inline void InitNull()
|
---|
48 | {
|
---|
49 | fistLineToBeRead_= -1;
|
---|
50 | numberOfLinesToBeRead_= -1;
|
---|
51 | column_ = NULL;
|
---|
52 | }
|
---|
53 |
|
---|
54 |
|
---|
55 | // attributs de classe
|
---|
56 | NTuple* dobj_;
|
---|
57 | bool ownobj_;
|
---|
58 | int fistLineToBeRead_;
|
---|
59 | int numberOfLinesToBeRead_;
|
---|
60 | float* column_;
|
---|
61 | };
|
---|
62 | //////////////////////////////////////////////////////////////////
|
---|
63 |
|
---|
64 |
|
---|
65 | } // Fin du namespace
|
---|
66 |
|
---|
67 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.