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

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.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_); }
36
37protected:
38
39 // implementation de FitsFile
40// virtual void ReadFromFits(FitsFile& fn);
41 virtual void ReadFromFits();
42virtual void WriteToFits();
43void* getColFromObj(int colNr);
44double* getColDFromObj(int colNr);
45float* getColFFromObj(int colNr);
46int* getColIFromObj(int colNr);
47char** getColSFromObj(int colNr);
48
49 private :
50
51 void Clean();
52
53inline void InitNull()
54 {
55 fistLineToBeRead_= -1;
56 numberOfLinesToBeRead_= -1;
57 dcolumn_ = NULL;
58 fcolumn_ = NULL;
59 icolumn_ = NULL;
60 ccolumn_ = NULL;
61 }
62
63 // attributs de classe
64 XNTuple* dobj_;
65 bool ownobj_;
66 int fistLineToBeRead_;
67 int numberOfLinesToBeRead_;
68 double* dcolumn_;
69 float* fcolumn_;
70 int* icolumn_;
71 char** ccolumn_;
72};
73//////////////////////////////////////////////////////////////////
74
75
76} // Fin du namespace
77
78#endif
Note: See TracBrowser for help on using the repository browser.