Commit 03e8f845422050f632ffc143b87a76bf5c0e9073

Authored by Benjamin Renard
1 parent b1237005

Instanciate netCDF file reader in LocalFileInterface

src/ParamGetImpl/LocalFileInterface/VirtualInstrument.cc
... ... @@ -16,6 +16,7 @@
16 16 #include "FileReaderCDF.hh"
17 17 #include "FileReaderASCII.hh"
18 18 #include "FileReaderVOTable.hh"
  19 +#include "FileReaderNetCDF.hh"
19 20  
20 21 #include <boost/filesystem/path.hpp>
21 22 #include <boost/filesystem.hpp>
... ... @@ -74,6 +75,11 @@ bool VirtualInstrument::createFileReader(LocalTimeFormat timeFormat)
74 75 _fileReaderPtr = new FileReaderVOTable();
75 76 LOG4CXX_INFO(gLogger, "VirtualInstrument::createFileReader - VOTable Reader created");
76 77 break;
  78 + case VIFileFormat::FORMAT_NETCDF :
  79 + //netCDF file format
  80 + _fileReaderPtr = new FileReaderNetCDF();
  81 + LOG4CXX_INFO(gLogger, "VirtualInstrument::createFileReader - netCDF Reader created");
  82 + break;
77 83 default:
78 84 LOG4CXX_ERROR(gLogger, "VirtualInstrument::createFileReader - Reader not implemented");
79 85 }
... ...
src/ParamGetImpl/LocalFileInterface/VirtualInstrument.hh
... ... @@ -41,7 +41,8 @@ typedef enum
41 41 FORMAT_UNKNOWN,
42 42 FORMAT_ASCII,
43 43 FORMAT_CDF,
44   - FORMAT_VOT
  44 + FORMAT_VOT,
  45 + FORMAT_NETCDF
45 46 } VIFileFormat;
46 47  
47 48 /*
... ...
src/ParamGetImpl/LocalFileInterface/VirtualInstrumentBaseParser.cc
... ... @@ -115,6 +115,8 @@ public:
115 115 lVI->setFilesFormat(VIFileFormat::FORMAT_CDF);
116 116 else if (loadedVIFormat == "VOT")
117 117 lVI->setFilesFormat(VIFileFormat::FORMAT_VOT);
  118 + else if (loadedVIFormat == "NETCDF")
  119 + lVI->setFilesFormat(VIFileFormat::FORMAT_NETCDF);
118 120 else
119 121 {
120 122 ERROR_EXCEPTION("Unknown format " << loadedVIFormat)
... ...