OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
EnvsatFile.h
Go to the documentation of this file.
1 /*
2  * File: EnvsatFile.h
3  * Author: dshea
4  *
5  * Created on November 28, 2012, 1:07 PM
6  */
7 
8 #ifndef ENVSATFILE_H
9 #define ENVSATFILE_H
10 
11 #include "EnvsatMPH.h"
12 #include "EnvsatSPH.h"
13 #include "MerisSPH.h"
14 #include "EnvsatDSD.h"
15 #include "EnvsatDSR.h"
16 #include "TiepointDSR.h"
17 #include "MeasurementDSR.h"
18 #include "RadianceDSR.h"
19 #include "FlagsDSR.h"
20 #include "EnvsatUtil.h"
21 
22 class EnvsatFile {
23 public:
24 
25  //EnvsatFile();
26  EnvsatFile(const EnvsatFile& orig);
27  EnvsatFile(const std::string& filename);
28  virtual ~EnvsatFile();
29 
30  virtual EnvsatFile& operator=(const EnvsatFile& src);
31 
32  virtual int openFile(bool write = false);
33 
35  virtual int readHeader();
36 
38  virtual int writeHeader();
39 
40  virtual const std::string& getFileName();
41  virtual void setFileName(const std::string& name);
42 
43  virtual EnvsatMPH* getMPH();
44  virtual EnvsatSPH* getSPH();
45 
46  virtual void print();
47  virtual void printRecursive();
48 
49  virtual void closeFile();
50 
51  virtual int getNumScans();
52  virtual int getNumPixels();
53 
54  virtual int seekData(EnvsatDSD* dsd, int scanLine = 0);
55  virtual int readData(EnvsatDSR* dsr);
56  virtual int writeData(EnvsatDSR* dsr);
57 
58  virtual void modifyProductName();
59 
60 private:
63 
65  int fd;
66 
68  EnvsatMPH* mph;
69  EnvsatSPH* sph;
70 
71  void init(const std::string& name);
72 
73 };
74 
75 #endif /* ENVSATFILE_H */
76 
virtual EnvsatFile & operator=(const EnvsatFile &src)
Definition: EnvsatFile.cpp:54
virtual int writeData(EnvsatDSR *dsr)
Definition: EnvsatFile.cpp:185
virtual void setFileName(const std::string &name)
Definition: EnvsatFile.cpp:116
virtual int seekData(EnvsatDSD *dsd, int scanLine=0)
Definition: EnvsatFile.cpp:173
virtual EnvsatMPH * getMPH()
Definition: EnvsatFile.cpp:120
virtual ~EnvsatFile()
Definition: EnvsatFile.cpp:38
@ string
virtual int getNumScans()
Definition: EnvsatFile.cpp:150
virtual void print()
Definition: EnvsatFile.cpp:128
virtual int readData(EnvsatDSR *dsr)
Definition: EnvsatFile.cpp:181
virtual int readHeader()
Definition: EnvsatFile.cpp:86
virtual EnvsatSPH * getSPH()
Definition: EnvsatFile.cpp:124
char filename[FILENAME_MAX]
Definition: atrem_corl1.h:122
virtual void modifyProductName()
Definition: EnvsatFile.cpp:189
virtual int writeHeader()
Definition: EnvsatFile.cpp:99
virtual void printRecursive()
Definition: EnvsatFile.cpp:133
virtual int openFile(bool write=false)
Definition: EnvsatFile.cpp:74
EnvsatFile(const EnvsatFile &orig)
Definition: EnvsatFile.cpp:26
virtual const std::string & getFileName()
Definition: EnvsatFile.cpp:112
virtual void closeFile()
Definition: EnvsatFile.cpp:143
virtual int getNumPixels()
Definition: EnvsatFile.cpp:165