9 #ifndef DP3_STEPS_STEP_H_
10 #define DP3_STEPS_STEP_H_
54 typedef std::shared_ptr<Step>
ShPtr;
76 virtual bool process(std::unique_ptr<base::DPBuffer> buffer) {
77 throw std::runtime_error(
"Step does not support regular data processing.");
83 virtual bool process(std::unique_ptr<base::BdaBuffer>) {
84 throw std::runtime_error(
"Step does not support BDA data processing.");
113 virtual void show(std::ostream&)
const = 0;
131 next_step_ = std::move(nextStep);
132 next_step_->setPrevStep(
this);
160 virtual void addToMS(
const std::string& msName);
163 std::shared_ptr<Step> next_step_;
164 Step* previous_step_ =
nullptr;
168 inline static bool threading_is_initialized_ =
false;
Buffer holding baseline-dependently averaged (BDA) data.
Buffer holding the data of a timeslot/band.
General info about DP3 data processing attributes like averaging.
General info about DP3 data processing attributes like averaging.
Definition: DPInfo.h:35
@ kData
Is the visibility data needed?
@ kUvw
Are the uvw needed?
@ kWeights
Are the weights needed?
@ kFlags
Are the flags needed?
Common interface for steps that produce model data.
Definition: Step.h:172
common::Fields getProvidedFields() const override
Definition: Step.h:174
virtual base::Direction GetFirstDirection() const =0
Abstract base class for a DP3 step.
Definition: Step.h:52
virtual void updateInfo(const base::DPInfo &)
virtual void show(std::ostream &) const =0
Show the step parameters.
virtual bool process(std::unique_ptr< base::BdaBuffer >)
Definition: Step.h:83
virtual void addToMS(const std::string &msName)
virtual void finish()=0
Finish the processing of this step and subsequent steps.
void setInfo(const base::DPInfo &)
static constexpr dp3::common::Fields kWeightsField
Definition: Step.h:64
virtual dp3::common::Fields getProvidedFields() const =0
virtual bool process(std::unique_ptr< base::DPBuffer > buffer)
Definition: Step.h:76
std::shared_ptr< Step > ShPtr
Definition: Step.h:54
base::DPInfo & GetWritableInfoOut()
Definition: Step.h:156
static constexpr dp3::common::Fields kUvwField
Definition: Step.h:66
virtual dp3::common::Fields getRequiredFields() const =0
Get the fields required by the current step.
MsType
To check compatibility between steps before running.
Definition: Step.h:57
void setPrevStep(Step *prevStep)
Set the previous step.
Definition: Step.h:124
virtual void showTimings(std::ostream &, double duration) const
virtual bool accepts(MsType dt) const
Boolean if this step can process this type of data.
Definition: Step.h:142
const Step::ShPtr & getNextStep() const
Get the next step.
Definition: Step.h:136
const base::DPInfo & getInfoIn() const
Get access to the info of the input.
Definition: Step.h:107
virtual MsType outputs() const
Return which datatype this step outputs.
Definition: Step.h:139
virtual void setNextStep(Step::ShPtr nextStep)
Set the next step.
Definition: Step.h:130
static constexpr dp3::common::Fields kDataField
Definition: Step.h:60
static constexpr dp3::common::Fields kFlagsField
Definition: Step.h:62
virtual void showCounts(std::ostream &) const
const base::DPInfo & getInfoOut() const
Get access to the info of the output.
Definition: Step.h:110
static void SetThreadingIsInitialized()
Definition: Step.h:152
Step * getPrevStep() const
Get the previous step.
Definition: Step.h:127
This file has generic helper routines for testing steps.
Definition: AntennaConfig.h:53
A direction on the celestial sphere.
Definition: Direction.h:15