DP3
DummyStep.h
Go to the documentation of this file.
1 // Copyright (C) 2022 ASTRON (Netherlands Institute for Radio Astronomy)
2 // SPDX-License-Identifier: GPL-3.0-or-later
3 
4 #ifndef DP3_STEPS_DUMMYSTEP_H_
5 #define DP3_STEPS_DUMMYSTEP_H_
6 
7 #include "steps/Step.h"
8 
9 #include "common/ParameterSet.h"
10 #include "common/Timer.h"
11 
12 namespace dp3 {
13 namespace steps {
14 
17 class DummyStep : public Step {
18  public:
21  DummyStep(const common::ParameterSet&, const std::string& prefix);
22 
25  common::Fields getRequiredFields() const override {
26  return kWeightsField | kUvwField;
27  }
28 
31  common::Fields getProvidedFields() const override { return kWeightsField; }
32 
34  bool process(std::unique_ptr<base::DPBuffer>) override;
35 
37  bool process(std::unique_ptr<base::BdaBuffer>) override;
38 
40  void finish() override;
41 
43  void updateInfo(const base::DPInfo&) override;
44 
46  void show(std::ostream&) const override;
47 
49  void showTimings(std::ostream&, double duration) const override;
50 
51  private:
52  std::string name_;
53  common::NSTimer timer_;
54 };
55 
56 } // namespace steps
57 } // namespace dp3
58 
59 #endif
Class to hold code for virtual base class for Flaggers in DP3.
General info about DP3 data processing attributes like averaging.
Definition: DPInfo.h:35
Definition: Fields.h:16
Implements a map of Key-Value pairs.
Definition: ParameterSet.h:31
DP3 step class that does nothing. This class is an empty Step subclass to use as implementation templ...
Definition: DummyStep.h:17
void updateInfo(const base::DPInfo &) override
Update the general info.
void finish() override
Finish the processing of this step and subsequent steps.
common::Fields getProvidedFields() const override
Definition: DummyStep.h:31
common::Fields getRequiredFields() const override
Definition: DummyStep.h:25
DummyStep(const common::ParameterSet &, const std::string &prefix)
void show(std::ostream &) const override
Show the step parameters.
bool process(std::unique_ptr< base::BdaBuffer >) override
Process BDA data. The dummy step forwards the data to its next step.
bool process(std::unique_ptr< base::DPBuffer >) override
Process the data. The dummy step forwards the data to its next step.
void showTimings(std::ostream &, double duration) const override
Show the timings.
Abstract base class for a DP3 step.
Definition: Step.h:52
static constexpr dp3::common::Fields kWeightsField
Definition: Step.h:64
static constexpr dp3::common::Fields kUvwField
Definition: Step.h:66
This file has generic helper routines for testing steps.
Definition: AntennaConfig.h:53