File: metadatacache.cpp

package info (click to toggle)
wsclean 3.6-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 16,296 kB
  • sloc: cpp: 129,246; python: 22,066; sh: 360; ansic: 230; makefile: 185
file content (32 lines) | stat: -rw-r--r-- 908 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include "metadatacache.h"

#include <aocommon/io/serialostream.h>
#include <aocommon/io/serialistream.h>

namespace wsclean {

void MetaDataCache::Serialize(aocommon::SerialOStream& stream) const {
  stream.UInt64(msDataVector.size());
  for (const Entry& entry : msDataVector) {
    stream.Double(entry.min_w)
        .Double(entry.max_w)
        .Double(entry.max_w_with_flags)
        .Double(entry.max_baseline_uvw)
        .Double(entry.max_baseline_in_m)
        .Double(entry.integration_time);
  }
}

void MetaDataCache::Unserialize(aocommon::SerialIStream& stream) {
  msDataVector.resize(stream.UInt64());
  for (Entry& entry : msDataVector) {
    stream.Double(entry.min_w)
        .Double(entry.max_w)
        .Double(entry.max_w_with_flags)
        .Double(entry.max_baseline_uvw)
        .Double(entry.max_baseline_in_m)
        .Double(entry.integration_time);
  }
}

}  // namespace wsclean