From 7fc6936fe59ea0fdbbf59245e64d87131ea8453c Mon Sep 17 00:00:00 2001 From: Jan David Mol <mol@astron.nl> Date: Thu, 21 Mar 2019 12:08:43 +0000 Subject: [PATCH] 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) --- LCS/Common/include/Common/InputParSet.h | 4 ++++ LCS/LofarStMan/include/LofarStMan/LofarStMan.h | 4 ++-- LCS/LofarStMan/src/LofarStMan.cc | 6 +++--- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/LCS/Common/include/Common/InputParSet.h b/LCS/Common/include/Common/InputParSet.h index 37a1ba66d38..0c206f2e6e2 100644 --- a/LCS/Common/include/Common/InputParSet.h +++ b/LCS/Common/include/Common/InputParSet.h @@ -30,10 +30,14 @@ //# Includes #include <Common/ParameterSet.h> +#ifdef HAVE_AIPSPP +# include <casacore/casa/Inputs/Input.h> +#else //# Forward declare Input. namespace casacore { class Input; } +#endif namespace LOFAR { diff --git a/LCS/LofarStMan/include/LofarStMan/LofarStMan.h b/LCS/LofarStMan/include/LofarStMan/LofarStMan.h index 985eb8273e1..4befb110f61 100644 --- a/LCS/LofarStMan/include/LofarStMan/LofarStMan.h +++ b/LCS/LofarStMan/include/LofarStMan/LofarStMan.h @@ -25,7 +25,7 @@ //# Includes #include <casacore/tables/DataMan/DataManager.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/Record.h> #include <Common/LofarTypes.h> @@ -331,7 +331,7 @@ private: vector<LofarColumn*> itsColumns; // On 32-bit systems regular IO is used. int itsFD; - casacore::LargeFiledesIO* itsRegFile; + casacore::FiledesIO* itsRegFile; casacore::Block<char> itsBuffer; //# buffer of size itsBLDataSize for regular IO // The seqnr file (if present) is always memory-mapped because it is small. casacore::MMapIO* itsSeqFile; diff --git a/LCS/LofarStMan/src/LofarStMan.cc b/LCS/LofarStMan/src/LofarStMan.cc index 424956034ad..8bae2e31170 100644 --- a/LCS/LofarStMan/src/LofarStMan.cc +++ b/LCS/LofarStMan/src/LofarStMan.cc @@ -226,8 +226,8 @@ void LofarStMan::openFiles (bool writable) // First close if needed. closeFiles(); String fname (fileName() + "data"); - itsFD = LargeFiledesIO::open (fname.c_str(), writable); - itsRegFile = new LargeFiledesIO (itsFD); + itsFD = FiledesIO::open (fname.c_str(), writable); + itsRegFile = new FiledesIO (itsFD); // Set correct number of rows. itsNrRows = itsRegFile->length() / itsBlockSize * itsAnt1.size(); // Map the file with seqnrs. @@ -261,7 +261,7 @@ void LofarStMan::mapSeqFile() void LofarStMan::closeFiles() { if (itsFD >= 0) { - LargeFiledesIO::close (itsFD); + FiledesIO::close (itsFD); itsFD = -1; } delete itsRegFile; -- GitLab