diff --git a/RTCP/Cobalt/GPUProc/src/rtcp.cc b/RTCP/Cobalt/GPUProc/src/rtcp.cc index ea73929a3b2cd6fc3b79a2e004bdbe13bfaf5be8..791ddfdaa5e002d846a6d4a447cebfd983eb4e97 100644 --- a/RTCP/Cobalt/GPUProc/src/rtcp.cc +++ b/RTCP/Cobalt/GPUProc/src/rtcp.cc @@ -61,6 +61,7 @@ #include <CoInterface/Stream.h> #include <CoInterface/SelfDestructTimer.h> #include <InputProc/SampleType.h> +#include <InputProc/Delays/Delays.h> #include <InputProc/WallClockTime.h> #include <InputProc/Buffer/StationID.h> @@ -418,6 +419,13 @@ int main(int argc, char **argv) LOG_WARN_STR("Cannot lock all memory: " << ex.what()); } + // IERS table information + struct Delays::IERS_tablestats stats = Delays::get_IERS_tablestats(); + + LOG_INFO_STR("Using IERS table " << stats.realpath + << ", last entry is " << TimeDouble::toString(stats.last_entry_timestamp, false) + << ", table written on " << TimeDouble::toString(stats.last_fs_modification, false)); + /* * RUN stage */ diff --git a/RTCP/Cobalt/InputProc/src/Delays/Delays.cc b/RTCP/Cobalt/InputProc/src/Delays/Delays.cc index 240c3e9aabe85da7790007467cc0e21740263e8d..3a43bcc62fbcda87736a9c9610e35350ef65d9a0 100644 --- a/RTCP/Cobalt/InputProc/src/Delays/Delays.cc +++ b/RTCP/Cobalt/InputProc/src/Delays/Delays.cc @@ -52,11 +52,6 @@ namespace LOFAR { namespace Cobalt { - static std::string time2str(const time_t time) - { - return TimeDouble::toString(time, false); - } - //##---------------- Public methods ----------------##// Delays::Delays(const Parset &parset, size_t stationIdx, const TimeStamp &from, size_t increment) @@ -70,11 +65,6 @@ namespace LOFAR ASSERTSTR(test(), "Delay compensation engine is broken"); init(); - - // Log TAI_UTC table information to inform the user about the age of the delay information we're about to use - struct IERS_tablestats stats = get_IERS_tablestats(); - - LOG_INFO_STR("Using IERS table " << stats.realpath << ", last entry is " << time2str(stats.last_entry_timestamp) << ", table written on " << time2str(stats.last_fs_modification)); } diff --git a/RTCP/Cobalt/InputProc/src/Delays/Delays.h b/RTCP/Cobalt/InputProc/src/Delays/Delays.h index f81abb6241f45a6ee2428a755606b38ba3395b0b..cd85ef8b4e962b5e580b7f20b36796ac887f6a4e 100644 --- a/RTCP/Cobalt/InputProc/src/Delays/Delays.h +++ b/RTCP/Cobalt/InputProc/src/Delays/Delays.h @@ -45,6 +45,8 @@ #include <casacore/casa/Quanta/MVDirection.h> #include <casacore/casa/Quanta/MVPosition.h> #include <casacore/casa/Quanta/MVEpoch.h> + +#include <ctime> #endif namespace LOFAR @@ -149,6 +151,15 @@ namespace LOFAR */ void generateMetaData( const AllDelays &delaysAtBegin, const AllDelays &delaysAfterEnd, const std::vector<size_t> &subbands, std::vector<SubbandMetaData> &metaDatas, std::vector<ssize_t> &read_offsets ); + struct IERS_tablestats { + std::string path; // path to the IERS table, as provided by casacore + std::string realpath; // path to the IERS table, with all symlinks resolved + time_t last_fs_modification; // last modification to the IERS table, according to the file system (f.e. when table was written) + time_t last_entry_timestamp; // timestamp of last entry in the table + }; + + static struct IERS_tablestats get_IERS_tablestats(); + private: const Parset &parset; const size_t stationIdx;