Skip to content
Snippets Groups Projects
Commit 7fc6936f authored by Jan David Mol's avatar Jan David Mol
Browse files

SW-589: Fixed LargeFiledesIO deprecation warnings, and added include in...

SW-589: Fixed LargeFiledesIO deprecation warnings, and added include in InputParSet.h to import the conditional namespace #define in casacore2, making it compatible with both casacore2 and 3 (Merged r41783,r41784,r41928 from Cobalt2 branch)
parent 5faed6d8
No related branches found
No related tags found
No related merge requests found
...@@ -30,10 +30,14 @@ ...@@ -30,10 +30,14 @@
//# Includes //# Includes
#include <Common/ParameterSet.h> #include <Common/ParameterSet.h>
#ifdef HAVE_AIPSPP
# include <casacore/casa/Inputs/Input.h>
#else
//# Forward declare Input. //# Forward declare Input.
namespace casacore { namespace casacore {
class Input; class Input;
} }
#endif
namespace LOFAR { namespace LOFAR {
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
//# Includes //# Includes
#include <casacore/tables/DataMan/DataManager.h> #include <casacore/tables/DataMan/DataManager.h>
#include <casacore/casa/IO/MMapIO.h> #include <casacore/casa/IO/MMapIO.h>
#include <casacore/casa/IO/LargeFiledesIO.h> #include <casacore/casa/IO/FiledesIO.h>
#include <casacore/casa/Containers/Block.h> #include <casacore/casa/Containers/Block.h>
#include <casacore/casa/Containers/Record.h> #include <casacore/casa/Containers/Record.h>
#include <Common/LofarTypes.h> #include <Common/LofarTypes.h>
...@@ -331,7 +331,7 @@ private: ...@@ -331,7 +331,7 @@ private:
vector<LofarColumn*> itsColumns; vector<LofarColumn*> itsColumns;
// On 32-bit systems regular IO is used. // On 32-bit systems regular IO is used.
int itsFD; int itsFD;
casacore::LargeFiledesIO* itsRegFile; casacore::FiledesIO* itsRegFile;
casacore::Block<char> itsBuffer; //# buffer of size itsBLDataSize for regular IO casacore::Block<char> itsBuffer; //# buffer of size itsBLDataSize for regular IO
// The seqnr file (if present) is always memory-mapped because it is small. // The seqnr file (if present) is always memory-mapped because it is small.
casacore::MMapIO* itsSeqFile; casacore::MMapIO* itsSeqFile;
......
...@@ -226,8 +226,8 @@ void LofarStMan::openFiles (bool writable) ...@@ -226,8 +226,8 @@ void LofarStMan::openFiles (bool writable)
// First close if needed. // First close if needed.
closeFiles(); closeFiles();
String fname (fileName() + "data"); String fname (fileName() + "data");
itsFD = LargeFiledesIO::open (fname.c_str(), writable); itsFD = FiledesIO::open (fname.c_str(), writable);
itsRegFile = new LargeFiledesIO (itsFD); itsRegFile = new FiledesIO (itsFD);
// Set correct number of rows. // Set correct number of rows.
itsNrRows = itsRegFile->length() / itsBlockSize * itsAnt1.size(); itsNrRows = itsRegFile->length() / itsBlockSize * itsAnt1.size();
// Map the file with seqnrs. // Map the file with seqnrs.
...@@ -261,7 +261,7 @@ void LofarStMan::mapSeqFile() ...@@ -261,7 +261,7 @@ void LofarStMan::mapSeqFile()
void LofarStMan::closeFiles() void LofarStMan::closeFiles()
{ {
if (itsFD >= 0) { if (itsFD >= 0) {
LargeFiledesIO::close (itsFD); FiledesIO::close (itsFD);
itsFD = -1; itsFD = -1;
} }
delete itsRegFile; delete itsRegFile;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment