source: Sophya/trunk/SophyaExt/FitsIOServer/fitsntuple.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.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
11namespace SOPHYA {
12///////////////////////////////////////////////////////////////////
13// Classe pour la gestion de persistance sur fichiers fits
14// pout NTuple
15////////////////////////////////////////////////////////////////
16class FITS_NTuple : public FitsFile
17{
18
19public:
20
21FITS_NTuple();
22FITS_NTuple(char inputfile[],int hdunum=2);
23FITS_NTuple(const NTuple & obj);
24 FITS_NTuple(NTuple* obj);
25virtual ~FITS_NTuple();
26 void Read(char inputfile[],int hdunum=2);
27/*!
28fill 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);
33void Write(char outputfile[], bool OldFile=false);
34inline operator NTuple() { return(*dobj_); }
35inline NTuple * getObj() { return(dobj_); }
36
37protected:
38
39 // implementation de FitsFile
40//virtual void ReadFromFits(FitsFile& fn);
41virtual void ReadFromFits();
42virtual void WriteToFits();
43
44float* getColFromObj(int colNr);
45
46 private :
47
48inline 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
Note: See TracBrowser for help on using the repository browser.