DP3
InputStep.h
Go to the documentation of this file.
1 // InputStep.h: Abstract base class for a Step generating input
2 // Copyright (C) 2023 ASTRON (Netherlands Institute for Radio Astronomy)
3 // SPDX-License-Identifier: GPL-3.0-or-later
4 
8 
9 #ifndef DP3_STEPS_INPUTSTEP_H_
10 #define DP3_STEPS_INPUTSTEP_H_
11 
12 #include <memory>
13 
14 #include "Step.h"
15 
16 #include "base/UVWCalculator.h"
17 #include "base/FlagCounter.h"
18 #include "common/ParameterSet.h"
19 #include "common/Timer.h"
20 
21 namespace casacore {
22 class MeasurementSet;
23 class RefRows;
24 } // namespace casacore
25 
26 namespace dp3 {
27 namespace steps {
28 
30 
36 
37 class InputStep : public Step {
38  public:
39  ~InputStep() override;
40 
41  common::Fields getRequiredFields() const override { return {}; }
42 
43  common::Fields getProvidedFields() const override { return fields_to_read_; }
44 
47  virtual std::string msName() const;
48 
50  virtual void setFieldsToRead(const dp3::common::Fields& fields) {
51  fields_to_read_ = fields;
52  };
53 
56  return fields_to_read_;
57  };
58 
60  virtual const casacore::Table& table() const;
61 
65  static bool HasBda(const casacore::MeasurementSet& ms);
66 
72  static std::unique_ptr<InputStep> CreateReader(const common::ParameterSet&);
73 
74  private:
77  dp3::common::Fields fields_to_read_;
78 };
79 
80 } // namespace steps
81 } // namespace dp3
82 
83 #endif
Class to keep counts of nr of flagged points.
Class to hold code for virtual base class for Flaggers in DP3.
Class to calculate UVW coordinates Note: this code is used by LOFAR and APERTIF software.
Definition: Fields.h:16
Implements a map of Key-Value pairs.
Definition: ParameterSet.h:31
Abstract base class for a Step generating input.
Definition: InputStep.h:37
common::Fields getRequiredFields() const override
Get the fields required by the current step.
Definition: InputStep.h:41
const dp3::common::Fields & getFieldsToRead() const
Get which fields must be read.
Definition: InputStep.h:55
static bool HasBda(const casacore::MeasurementSet &ms)
virtual void setFieldsToRead(const dp3::common::Fields &fields)
Set which fields must be read.
Definition: InputStep.h:50
virtual std::string msName() const
virtual const casacore::Table & table() const
Get the main MS table.
common::Fields getProvidedFields() const override
Definition: InputStep.h:43
static std::unique_ptr< InputStep > CreateReader(const common::ParameterSet &)
Abstract base class for a DP3 step.
Definition: Step.h:52
Definition: InputStep.h:21
This file has generic helper routines for testing steps.
Definition: AntennaConfig.h:53