3 #include <fwk/CentralConfig.h>
4 #include <fwk/RunController.h>
6 #include <utl/ErrorLogger.h>
7 #include <utl/Reader.h>
8 #include <utl/config.h>
9 #include <utl/FFTDataContainerAlgorithm.h>
10 #include <utl/AugerUnits.h>
12 #include <evt/Event.h>
13 #include <revt/REvent.h>
14 #include <revt/Station.h>
15 #include <revt/Channel.h>
17 #include <det/Detector.h>
18 #include <rdet/RDetector.h>
19 #include <rdet/Channel.h>
37 fOverrideChannelSampleRate =
38 topBranch.
GetChild(
"OverrideChannelSampleRate").
Get<
string>() ==
"yes";
40 topBranch.
GetChild(
"OverrideResampleBinning").
GetData(fOverrideResampleBinning);
43 if (fOverrideChannelSampleRate) {
44 info <<
"\n\tRdChannelResampler uses an OverrideChannelSampleRate with an OverrideResampleBinning of "
45 << fOverrideResampleBinning /
nanosecond <<
" ns.\n";
47 info <<
"\n\tRdChannelResampler uses sampling rate provided by the detector.\n";
60 WARNING(
"No radio event found!");
70 for (
auto& station : rEvent.StationsRange()) {
71 for (
auto& channel : station.ChannelsRange()) {
77 if (fOverrideChannelSampleRate) {
78 channelBinning = fOverrideResampleBinning;
81 info <<
"Resampling channel " << channel.GetId() <<
" of station "
82 << channel.GetStationId() <<
" from a binning of "
83 << channel.GetChannelTimeSeries().GetBinning()<<
" to "
84 << channelBinning <<
".";
87 FFTDataContainerAlgorithm::ResampleTimeSeries(channel.GetFFTDataContainer(), channelBinning);
96 RdChannelResampler::Finish()
Interface class to access to the Radio part of an event.
void Init()
Initialise the registry.
Detector description interface for Channel-related data.
Branch GetChild(const std::string &childName) const
Get child of this Branch by child name.
Class representing a document branch.
constexpr double nanosecond
Top of the hierarchy of the detector description interface.
#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.
static CentralConfig * GetInstance()
Use this the first time you get an instance of central configuration.
const rdet::RDetector & GetRDetector() const
double GetSamplingFrequency() const
Get sampling Frequency of ADC (unit?)
const Station & GetStation(const int stationId) const
Get station by Station Id.
utl::Branch GetTopBranch(const std::string &id)
Get top branch for moduleConfigLink with given id (XML files)