DP3
DP3.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 
4 #ifndef DP3_BASE_DP3_H_
5 #define DP3_BASE_DP3_H_
6 
7 #include "common/ParameterSet.h"
8 #include "steps/InputStep.h"
9 
10 namespace dp3 {
11 namespace base {
12 
13 void ShowUsage();
14 
16 void ExecuteFromCommandLine(const std::vector<std::string>& arguments);
17 
19 void ExecuteFromCommandLine(int argc, char* argv[]);
20 
23 void Execute(const std::string& parsetName,
24  const std::vector<std::string>& arguments = {});
25 
34 std::shared_ptr<steps::Step> MakeSingleStep(const std::string& type,
35  const common::ParameterSet& parset,
36  const std::string& prefix,
37  steps::Step::MsType input_type);
38 
42 std::shared_ptr<steps::InputStep> MakeMainSteps(
43  const common::ParameterSet& parset);
44 
51 std::shared_ptr<steps::Step> MakeStepsFromParset(
52  const common::ParameterSet& parset, const std::string& prefix,
53  const std::string& step_names_key, const std::string& input_ms_name,
54  bool terminateChain, steps::Step::MsType initial_step_output);
55 
61  std::shared_ptr<steps::Step> first_step);
62 
70  std::shared_ptr<steps::Step> first_step,
71  dp3::common::Fields provided_fields = dp3::common::Fields());
72 
75 size_t GetNThreads();
76 
79 void SetNThreads(size_t n_threads);
80 
81 } // namespace base
82 } // namespace dp3
83 
84 #endif // DP3_BASE_DP3_H_
Abstract base class for a Step generating input.
Definition: Fields.h:16
Implements a map of Key-Value pairs.
Definition: ParameterSet.h:31
MsType
To check compatibility between steps before running.
Definition: Step.h:57
dp3::common::Fields GetChainRequiredFields(std::shared_ptr< steps::Step > first_step)
dp3::common::Fields SetChainProvidedFields(std::shared_ptr< steps::Step > first_step, dp3::common::Fields provided_fields=dp3::common::Fields())
std::shared_ptr< steps::Step > MakeSingleStep(const std::string &type, const common::ParameterSet &parset, const std::string &prefix, steps::Step::MsType input_type)
std::shared_ptr< steps::Step > MakeStepsFromParset(const common::ParameterSet &parset, const std::string &prefix, const std::string &step_names_key, const std::string &input_ms_name, bool terminateChain, steps::Step::MsType initial_step_output)
std::shared_ptr< steps::InputStep > MakeMainSteps(const common::ParameterSet &parset)
void SetNThreads(size_t n_threads)
size_t GetNThreads()
void Execute(const std::string &parsetName, const std::vector< std::string > &arguments={})
void ShowUsage()
void ExecuteFromCommandLine(const std::vector< std::string > &arguments)
Command-line interface.
This file has generic helper routines for testing steps.
Definition: AntennaConfig.h:53