3 #include <fwk/CentralConfig.h>
5 #include <utl/ErrorLogger.h>
6 #include <utl/Reader.h>
7 #include <utl/config.h>
10 #include <revt/REvent.h>
11 #include <revt/Header.h>
12 #include <revt/Station.h>
19 using std::ostringstream;
30 INFO(
"RdStationDebugWriter::Init()");
34 topBranch.
GetChild(
"AsciiSpectrumNameBase").
GetData(fAsciiSpectrumNameBase);
46 ERROR (
"Event has no radio event. Use RdStationAssociator i.e.!");
49 REvent& rEvent =
event.GetREvent();
63 for (
const auto& station : rEvent.StationsRange()) {
66 const auto& spectrum = station.GetStationFrequencySpectrum();
69 info <<
"Spectrum reaches from " << station.GetFrequencyOfBin(0) /
megahertz
70 <<
" MHz to " << station.GetFrequencyOfBin(spectrum.GetSize() - 1) /
megahertz
71 <<
" MHz with a binning of " << spectrum.GetBinning() /
megahertz <<
" MHz.";
75 ostringstream filenamespec;
76 filenamespec << fAsciiSpectrumNameBase <<
"_" << fLastEventID
77 <<
"_s" << station.GetId()
78 <<
"_Step-" << fStepCounter <<
".dat";
81 outfilespec.open(filenamespec.str().c_str(),
ios::out);
84 for (
auto i = 0LU; i < spectrum.GetSize(); ++i){
85 outfilespec << station.GetFrequencyOfBin(i) /
megahertz
94 const auto& timeSeries = station.GetStationTimeSeries();
97 info <<
"Trace consists of " << timeSeries.GetSize() <<
" bins with a binning of "
98 << timeSeries.GetBinning()/
nanosecond <<
" ns.";
102 ostringstream filenametrc;
103 filenametrc << fAsciiTraceNameBase <<
"_" << fLastEventID
104 <<
"_s" << station.GetId()
105 <<
"_Step-" << fStepCounter <<
".dat";
108 outfiletrc.open(filenametrc.str().c_str(),
ios::out);
111 for (
auto i = 0LU; i < timeSeries.GetSize(); ++i){
112 outfiletrc << timeSeries.GetBinning() *
static_cast<double>(i) /
nanosecond
126 RdStationDebugWriter::Finish()
Interface class to access to the Radio part of an event.
#define INFO(message)
Macro for logging informational messages.
void Init()
Initialise the registry.
vector< t2list > out
output of the algorithm: a list of clusters
Branch GetChild(const std::string &childName) const
Get child of this Branch by child name.
Class representing a document branch.
constexpr double nanosecond
double abs(const SVector< n, T > &v)
Header & GetHeader()
access to REvent Header
constexpr double megahertz
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.
#define ERROR(message)
Macro for logging error messages.
utl::Branch GetTopBranch(const std::string &id)
Get top branch for moduleConfigLink with given id (XML files)