DP3
tStepCommon.h
Go to the documentation of this file.
1 // Copyright (C) 2023 ASTRON (Netherlands Institute for Radio Astronomy)
2 // SPDX-License-Identifier: GPL-3.0-or-later
3 
5 
6 #ifndef DP3_STEPS_TEST_UNIT_TSTEPCOMMON_H_
7 #define DP3_STEPS_TEST_UNIT_TSTEPCOMMON_H_
8 
9 #include <memory>
10 #include <vector>
11 
12 #include "steps/Step.h"
13 #include "common/ParameterSet.h"
14 
15 namespace dp3 {
16 namespace steps {
17 namespace test {
18 
20 void Execute(const std::vector<std::shared_ptr<Step>>& steps);
21 
24  const std::vector<std::pair<std::string, std::string>>& parameters);
25 
30 inline std::string Show(const Step& step) {
31  std::stringstream output;
32  // Ensure the test doesn't depend on the system's locale settings.
33  output.imbue(std::locale::classic());
34  step.show(output);
35  return output.str();
36 }
37 
38 } // namespace test
39 } // namespace steps
40 } // namespace dp3
41 
42 #endif
Class to hold code for virtual base class for Flaggers in DP3.
Implements a map of Key-Value pairs.
Definition: ParameterSet.h:31
Abstract base class for a DP3 step.
Definition: Step.h:52
virtual void show(std::ostream &) const =0
Show the step parameters.
std::string Show(const Step &step)
Definition: tStepCommon.h:30
dp3::common::ParameterSet CreateParameterSet(const std::vector< std::pair< std::string, std::string >> &parameters)
void Execute(const std::vector< std::shared_ptr< Step >> &steps)
Connect a series of steps and execute them.
This file has generic helper routines for testing steps.
Definition: AntennaConfig.h:53