| [3493] | 1 | /* | 
|---|
|  | 2 | --- SOPHYA software - FitsIOServer module --- | 
|---|
|  | 3 | C. Magneville, 2001 | 
|---|
|  | 4 | (C) UPS+LAL IN2P3/CNRS     (C) DAPNIA-SPP/CEA | 
|---|
|  | 5 | */ | 
|---|
| [1505] | 6 | /* Interface Fits BINARY/ASCII Table     cmv 21/05/2001 */ | 
|---|
|  | 7 | #ifndef FBTNTINTF_H_SEEN | 
|---|
|  | 8 | #define FBTNTINTF_H_SEEN | 
|---|
|  | 9 |  | 
|---|
|  | 10 | #include "machdefs.h" | 
|---|
| [2322] | 11 | #include <iostream> | 
|---|
| [1505] | 12 | #include <string.h> | 
|---|
|  | 13 | #include <string> | 
|---|
|  | 14 |  | 
|---|
|  | 15 | #include "anydataobj.h" | 
|---|
|  | 16 | #include "ntupintf.h" | 
|---|
|  | 17 | #include "FitsIO/fitsio.h" | 
|---|
|  | 18 |  | 
|---|
|  | 19 | #include <vector> | 
|---|
|  | 20 |  | 
|---|
|  | 21 | namespace SOPHYA { | 
|---|
|  | 22 |  | 
|---|
|  | 23 | class FitsBTNtuIntf : public AnyDataObj, public NTupleInterface { | 
|---|
|  | 24 | public: | 
|---|
| [1646] | 25 | FitsBTNtuIntf(string fname,int ihdu=0,int_4 blen=100,int_4 bsens=1,uint_2 lp=0); | 
|---|
|  | 26 | FitsBTNtuIntf(char *cfname,int ihdu=0,int_4 blen=100,int_4 bsens=1,uint_2 lp=0); | 
|---|
| [1507] | 27 | FitsBTNtuIntf(FitsBTNtuIntf& fbtnt); | 
|---|
| [1646] | 28 | FitsBTNtuIntf(); | 
|---|
| [1505] | 29 | virtual ~FitsBTNtuIntf(); | 
|---|
|  | 30 |  | 
|---|
|  | 31 | void SetNulVal(r_8 nulval=0.) {NulVal = nulval;} | 
|---|
| [1507] | 32 | void ChangeBuffer(int_4 blen,int_4 bsens=1); | 
|---|
| [1505] | 33 | virtual void Print(ostream& os,int lp=1) const; | 
|---|
|  | 34 | inline  void Print(int lp=1) const {Print(cout,lp);} | 
|---|
|  | 35 |  | 
|---|
| [2683] | 36 | virtual sa_size_t NbLines() const ; | 
|---|
|  | 37 | virtual sa_size_t NbColumns() const ; | 
|---|
|  | 38 | virtual r_8 * GetLineD(sa_size_t  n) const ; | 
|---|
|  | 39 | virtual r_8 GetCell( sa_size_t n, sa_size_t  k) const ; | 
|---|
| [1505] | 40 | virtual string VarList_C(const char* nomx=NULL) const ; | 
|---|
|  | 41 |  | 
|---|
|  | 42 | protected: | 
|---|
| [1507] | 43 | inline void SetBuffer(int_4 blen=100,int_4 bsens=1) | 
|---|
|  | 44 | {BuffLen = (blen<=0)?1:blen; BuffSens = bsens;} | 
|---|
|  | 45 | void DeAllocBuff(void); | 
|---|
|  | 46 | void AllocBuff(void); | 
|---|
| [1505] | 47 | void Init(void); | 
|---|
|  | 48 | void Delete(void); | 
|---|
|  | 49 | void printerror(int sta) const; | 
|---|
|  | 50 |  | 
|---|
|  | 51 | string FitsFN; | 
|---|
|  | 52 | int IHdu; | 
|---|
|  | 53 | uint_2 DbgLevel; | 
|---|
|  | 54 | fitsfile *FitsPtr; | 
|---|
| [3166] | 55 | LONGLONG NBline; | 
|---|
| [1505] | 56 | int  NBcol; | 
|---|
|  | 57 | r_8 NulVal; | 
|---|
| [1507] | 58 | int_4 BuffLen, BuffSens; | 
|---|
| [3166] | 59 | mutable uint_8 NFitsRead; | 
|---|
|  | 60 | mutable LONGLONG LineDeb, LineFin; | 
|---|
| [1505] | 61 | vector<string> ColName; | 
|---|
|  | 62 | bool* ColReadable; | 
|---|
|  | 63 | double **Buffer; | 
|---|
|  | 64 | mutable r_8 * mRet; | 
|---|
|  | 65 | }; | 
|---|
|  | 66 |  | 
|---|
|  | 67 | } // namespace SOPHYA | 
|---|
|  | 68 | #endif    /* FBTNTINTF_H_SEEN */ | 
|---|