|
Last change
on this file since 1099 was 1049, checked in by ansari, 25 years ago |
|
Ajout methodes Fits(X)NTuple::getObj() - R. Ansari 28/6/2000
|
|
File size:
1.6 KB
|
| Rev | Line | |
|---|
| [860] | 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);
|
|---|
| [1047] | 24 | FITS_NTuple(NTuple* obj);
|
|---|
| [860] | 25 | virtual ~FITS_NTuple();
|
|---|
| [1047] | 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);
|
|---|
| [972] | 33 | void Write(char outputfile[], bool OldFile=false);
|
|---|
| [860] | 34 | inline operator NTuple() { return(*dobj_); }
|
|---|
| [1049] | 35 | inline NTuple * getObj() { return(dobj_); }
|
|---|
| [860] | 36 |
|
|---|
| 37 | protected:
|
|---|
| 38 |
|
|---|
| 39 | // implementation de FitsFile
|
|---|
| [1047] | 40 | //virtual void ReadFromFits(FitsFile& fn);
|
|---|
| 41 | virtual void ReadFromFits();
|
|---|
| 42 | virtual void WriteToFits();
|
|---|
| [860] | 43 |
|
|---|
| 44 | float* getColFromObj(int colNr);
|
|---|
| 45 |
|
|---|
| [1047] | 46 | private :
|
|---|
| 47 |
|
|---|
| 48 | inline void InitNull()
|
|---|
| 49 | {
|
|---|
| 50 | fistLineToBeRead_= -1;
|
|---|
| 51 | numberOfLinesToBeRead_= -1;
|
|---|
| 52 | column_ = NULL;
|
|---|
| 53 | }
|
|---|
| 54 |
|
|---|
| 55 |
|
|---|
| [860] | 56 | // attributs de classe
|
|---|
| 57 | NTuple* dobj_;
|
|---|
| [1047] | 58 | bool ownobj_;
|
|---|
| 59 | int fistLineToBeRead_;
|
|---|
| 60 | int numberOfLinesToBeRead_;
|
|---|
| [860] | 61 | float* column_;
|
|---|
| 62 | };
|
|---|
| 63 | //////////////////////////////////////////////////////////////////
|
|---|
| 64 |
|
|---|
| 65 |
|
|---|
| 66 | } // Fin du namespace
|
|---|
| 67 |
|
|---|
| 68 | #endif
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.