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

COB-66: Move logging IERS to rtcp to avoid replicating logspam.

parent e922b454
No related branches found
No related tags found
1 merge request!6Import cobalt2 into lofar4
...@@ -61,6 +61,7 @@ ...@@ -61,6 +61,7 @@
#include <CoInterface/Stream.h> #include <CoInterface/Stream.h>
#include <CoInterface/SelfDestructTimer.h> #include <CoInterface/SelfDestructTimer.h>
#include <InputProc/SampleType.h> #include <InputProc/SampleType.h>
#include <InputProc/Delays/Delays.h>
#include <InputProc/WallClockTime.h> #include <InputProc/WallClockTime.h>
#include <InputProc/Buffer/StationID.h> #include <InputProc/Buffer/StationID.h>
...@@ -418,6 +419,13 @@ int main(int argc, char **argv) ...@@ -418,6 +419,13 @@ int main(int argc, char **argv)
LOG_WARN_STR("Cannot lock all memory: " << ex.what()); 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 * RUN stage
*/ */
......
...@@ -52,11 +52,6 @@ namespace LOFAR ...@@ -52,11 +52,6 @@ namespace LOFAR
{ {
namespace Cobalt namespace Cobalt
{ {
static std::string time2str(const time_t time)
{
return TimeDouble::toString(time, false);
}
//##---------------- Public methods ----------------##// //##---------------- Public methods ----------------##//
Delays::Delays(const Parset &parset, size_t stationIdx, const TimeStamp &from, size_t increment) Delays::Delays(const Parset &parset, size_t stationIdx, const TimeStamp &from, size_t increment)
...@@ -70,11 +65,6 @@ namespace LOFAR ...@@ -70,11 +65,6 @@ namespace LOFAR
ASSERTSTR(test(), "Delay compensation engine is broken"); ASSERTSTR(test(), "Delay compensation engine is broken");
init(); 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));
} }
......
...@@ -45,6 +45,8 @@ ...@@ -45,6 +45,8 @@
#include <casacore/casa/Quanta/MVDirection.h> #include <casacore/casa/Quanta/MVDirection.h>
#include <casacore/casa/Quanta/MVPosition.h> #include <casacore/casa/Quanta/MVPosition.h>
#include <casacore/casa/Quanta/MVEpoch.h> #include <casacore/casa/Quanta/MVEpoch.h>
#include <ctime>
#endif #endif
namespace LOFAR namespace LOFAR
...@@ -149,6 +151,15 @@ 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 ); 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: private:
const Parset &parset; const Parset &parset;
const size_t stationIdx; const size_t stationIdx;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment