3 #include <fwk/CentralConfig.h>
5 #include <utl/config.h>
6 #include <utl/ErrorLogger.h>
7 #include <utl/Reader.h>
8 #include <utl/RectangleFilter.h>
10 #include <evt/Event.h>
11 #include <revt/REvent.h>
12 #include <revt/Channel.h>
13 #include <revt/Station.h>
27 CentralConfig::GetInstance()->
GetTopBranch(
"RdChannelBandpassFilter");
28 topBranch.
GetChild(
"LowerCutoffFrequency").
GetData(fLowerCutoffFrequency);
29 topBranch.
GetChild(
"UpperCutoffFrequency").
GetData(fUpperCutoffFrequency);
32 fFilterTypeString = topBranch.
GetChild(
"FilterType").
Get<
string>();
33 if (fFilterTypeString ==
"Rectangle") {
34 fFilterType = Rectangle;
35 fFilter =
new RectangleFilter(fLowerCutoffFrequency, fUpperCutoffFrequency, fDelay);
42 info <<
"\n Channel Bandpass Filter is set up as " << fFilterTypeString
43 <<
" filter spanning " << fLowerCutoffFrequency/
megahertz <<
" MHz to "
44 << fUpperCutoffFrequency/
megahertz <<
" MHz with delay of "
45 << fDelay/
ns <<
" ns.";
57 WARNING(
"No radio event found!");
61 REvent& rEvent =
event.GetREvent();
64 for (
auto& station : rEvent.StationsRange()) {
65 for (
auto& channel : station.ChannelsRange()) {
67 if (!channel.IsActive())
73 complex<double> currentTransmissivity;
75 currentTransmissivity = fFilter->TransmissivityAtFrequency(channel.GetFrequencyOfBin(i));
76 spectrum[i] *= currentTransmissivity;
85 RdChannelBandpassFilter::Finish()
Branch GetTopBranch() const
Interface class to access to the Radio part of an event.
#define INFO(message)
Macro for logging informational messages.
void Init()
Initialise the registry.
Branch GetChild(const std::string &childName) const
Get child of this Branch by child name.
Class representing a document branch.
std::vector< std::complex< double > >::size_type SizeType
An idealised rectangle filter.
constexpr double megahertz
#define WARNING(message)
Macro for logging warning messages.
void GetData(bool &b) const
Overloads of the GetData member template function.
ResultFlag
Flag returned by module methods to the RunController.