Cheetah - SKA - PSS - Prototype Time Domain Search Pipeline
BeamConfig.cpp
1 /*
2  * The MIT License (MIT)
3  *
4  * Copyright (c) 2016 The SKA organisation
5  *
6  * Permission is hereby granted, free of charge, to any person obtaining a copy
7  * of this software and associated documentation files (the "Software"), to deal
8  * in the Software without restriction, including without limitation the rights
9  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10  * copies of the Software, and to permit persons to whom the Software is
11  * furnished to do so, subject to the following conditions:
12  *
13  * The above copyright notice and this permission notice shall be included in all
14  * copies or substantial portions of the Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22  * SOFTWARE.
23  */
24 #include "cheetah/pipeline/BeamConfig.h"
25 #include <iostream>
26 
27 namespace ska {
28 namespace cheetah {
29 namespace pipeline {
30 
31 template<typename NumericalT>
32 BeamConfig<NumericalT>::BeamConfig(std::string const& tag)
33  : BaseT(tag)
34  , _active(true)
35 {
36  // setup data source options
37  add(_thread_config);
38  add(_data_src_config);
39  add(_data_config);
40 
41  _data_src_config.add(_sigproc_config);
42  _data_src_config.add(_psrdada_config);
43  _data_src_config.add(_rcpt_low_config);
44  _data_src_config.add(_rcpt_config);
45 }
46 
47 template<typename NumericalT>
48 BeamConfig<NumericalT>::~BeamConfig()
49 {
50 }
51 
52 template<typename NumericalT>
54 {
55  return _data_config;
56 }
57 
58 template<typename NumericalT>
60 {
61  return _sigproc_config;
62 }
63 
64 template<typename NumericalT>
66 {
67  return _psrdada_config;
68 }
69 
70 template<typename NumericalT>
72 {
73  return _rcpt_low_config;
74 }
75 
76 template<typename NumericalT>
78 {
79  return _rcpt_config;
80 }
81 
82 template<typename NumericalT>
83 panda::ThreadConfig const& BeamConfig<NumericalT>::thread_config() const
84 {
85  return _thread_config;
86 }
87 
88 template<typename NumericalT>
89 void BeamConfig<NumericalT>::thread_config(panda::ThreadConfig const& thread_config)
90 {
91  _thread_config = thread_config;
92 }
93 
94 template<typename NumericalT>
95 void BeamConfig<NumericalT>::add_options(OptionsDescriptionEasyInit& add_options)
96 {
97  add_options
98  ("active", boost::program_options::bool_switch()->default_value(_active)->notifier([&](bool val) { _active = val; }), "enable this beam");
99 }
100 
101 template<typename NumericalT>
103 {
104  return _active;
105 }
106 
107 template<typename NumericalT>
109 {
110  _active = active;
111 }
112 
113 } // namespace pipeline
114 } // namespace cheetah
115 } // namespace ska
SigProcDadaStream configuration parameters.
Definition: Config.h:90
configurable parameters for the rcpt
Definition: Config.h:42
SigProc configuration parameters.
Definition: Config.h:39
Some limits and constants for FLDO.
Definition: Brdz.h:35
Parse configuration parameters for a single beam in the pipeline instance of cheetah.
Definition: BeamConfig.h:48
configurable parameters for the rcpt
Definition: Config.h:42