File: mslistitem.h

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 (39 lines) | stat: -rw-r--r-- 1,078 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
33
34
35
36
37
38
39
#ifndef MS_LIST_ITEM_H_
#define MS_LIST_ITEM_H_

#include <string>

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

#include "../msproviders/msdatadescription.h"

namespace wsclean {

/**
 * Represent an item in a list of (selected) measurement sets. It associates
 * the measurement set with its original filename index on the command line.
 */
struct MsListItem {
  std::unique_ptr<MSDataDescription> ms_description;
  /**
   * Index of the measurement set in the filename list (@ref
   * Settings::filenames). This is useful to associate the measurement set with
   * other information that might depend on the original measurment set index,
   * such as the h5parm solution files (@ref Settings::facetSolutionFiles).
   */
  size_t ms_index;

  void Serialize(aocommon::SerialOStream& stream) const {
    stream.Object(*ms_description).UInt64(ms_index);
  }

  void Unserialize(aocommon::SerialIStream& stream) {
    ms_description = MSDataDescription::Unserialize(stream);
    stream.UInt64(ms_index);
  }
};

}  // namespace wsclean

#endif