Cheetah - SKA - PSS - Prototype Time Domain Search Pipeline
RfimSinglePulseImpl.h
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 #ifndef SKA_CHEETAH_PIPELINE_RFIMSINGLEPULSEIMPL_H
25 #define SKA_CHEETAH_PIPELINE_RFIMSINGLEPULSEIMPL_H
26 
27 #include "cheetah/pipeline/detail/SinglePulseImpl.h"
28 #include "cheetah/pipeline/PipelineHandler.h"
29 #include "cheetah/pipeline/RfiDetectionPipeline.h"
30 #include "cheetah/rfim/PolicyInfo.h"
31 #include "cheetah/rfim/Rfim.h"
32 
33 namespace ska {
34 namespace cheetah {
35 namespace pipeline {
36 
37 template<typename NumericalT>
38 class CheetahConfig;
39 
40 template<typename NumericalT>
41 class BeamConfig;
42 
48 template<typename NumericalT, template<typename> class RfimPolicyTemplate>
49 class RfimSinglePulseImpl : public SinglePulseImpl<NumericalT>
50 {
51  public:
54  typedef typename BaseT::DmHandler DmHandler;
55  typedef RfimPolicyTemplate<TimeFrequencyType> RfimPolicy;
56  typedef typename rfim::PolicyInfo<RfimPolicy>::ReturnType RfimReturnType;
57 
58  public:
59  RfimSinglePulseImpl(CheetahConfig<NumericalT> const& config, BeamConfig<NumericalT> const& beam_config, DmHandler const& dm_handler);
62 
63  void operator()(TimeFrequencyType&) override;
64 
65  private:
66  class RfimHandler {
67  public:
68  RfimHandler(RfimSinglePulseImpl&);
69  void operator()(RfimReturnType) const;
70 
71  private:
72  RfimSinglePulseImpl& _pipeline;
73  };
74 
76 
77  private:
78  RfimType _rfim;
79 };
80 
81 
82 } // namespace pipeline
83 } // namespace cheetah
84 } // namespace ska
85 #include "RfimSinglePulseImpl.cpp"
86 
87 #endif // SKA_CHEETAH_PIPELINE_RFIMSINGLEPULSEIMPL_H
std::conditional< std::is_same< void, AdapterDataReturnType >::value, DataArgumentType, AdapterDataReturnType >::type ReturnType
the data type the policy will return
Definition: PolicyInfo.h:67
void operator()(TimeFrequencyType &) override
called each time data becomes available
Some limits and constants for FLDO.
Definition: Brdz.h:35
A Single Pulse Search Pipeline With RFI Mitigation.
Parse configuration parameters for a single beam in the pipeline instance of cheetah.
Definition: BeamConfig.h:48
Base class for Cheetah Pipeline Handlers.
Definition: Pipeline.h:37
A Single Pulse Search Pipeline without rfim.