RdStationHilbertEnveloper.cc
Go to the documentation of this file.
2 
3 #include <cmath>
4 
5 #include <fwk/CentralConfig.h>
6 
7 #include <utl/config.h>
8 #include <utl/ErrorLogger.h>
9 #include <utl/Reader.h>
10 #include <utl/RectangleFilter.h>
11 #include <utl/FFTDataContainerAlgorithm.h>
12 
13 #include <evt/Event.h>
14 #include <revt/REvent.h>
15 #include <revt/Channel.h>
16 #include <revt/Station.h>
17 
18 
19 using namespace revt;
20 using namespace fwk;
21 using namespace utl;
22 using namespace std;
23 
25 
27  {
28  }
29 
30  RdStationHilbertEnveloper::~RdStationHilbertEnveloper()
31  {
32  }
33 
36  {
37 
38  INFO("RdStationHilbertEnveloper::Init()");
39 
40 
41  // Read in the configurations of the xml file
42  Branch topBranch =
43  CentralConfig::GetInstance()->GetTopBranch("RdStationHilbertEnveloper");
44  topBranch.GetChild("InfoLevel").GetData(fInfoLevel);
45 
46  return eSuccess;
47  }
48 
49 
51  RdStationHilbertEnveloper::Run(evt::Event& event)
52  {
53 
54  // Check if there are events at all
55  if(!event.HasREvent()) {
56  WARNING("No radio event found!");
57  return eContinueLoop;
58  }
59 
60  REvent& rEvent = event.GetREvent();
61  vector<double> testtrace;
62 
63  // loop through stations and for every station through every channel
64  for (REvent::StationIterator sIt = rEvent.StationsBegin();
65  sIt != rEvent.StationsEnd(); ++sIt) {
66  Station& station = *sIt;
67 
68  ostringstream info;
69  if (fInfoLevel >= eIntermediate)
70  info << "Apply Hilbert envelope on station " << station.GetId();
71 
72  FFTDataContainerAlgorithm::HilbertEnvelope(station.GetFFTDataContainer());
73 
74  }
75  return eSuccess;
76 
77  }
78 
80  RdStationHilbertEnveloper::Finish()
81  {
82 
83  INFO("RdStationHilbertEnveloper::Finish()");
84 
85  return eSuccess;
86  }
87 
88 
89  }
Branch GetTopBranch() const
Definition: Branch.cc:63
Interface class to access to the Radio part of an event.
Definition: REvent.h:42
#define INFO(message)
Macro for logging informational messages.
Definition: ErrorLogger.h:161
StationIterator StationsEnd()
Definition: REvent.h:130
StationIterator StationsBegin()
Definition: REvent.h:128
void Init()
Initialise the registry.
Branch GetChild(const std::string &childName) const
Get child of this Branch by child name.
Definition: Branch.cc:211
boost::filter_iterator< StationFilter, AllStationIterator > StationIterator
Iterator over all (non-exculded) stations.
Definition: REvent.h:125
bool HasREvent() const
Class representing a document branch.
Definition: Branch.h:107
class to hold data at the radio Station level.
#define WARNING(message)
Macro for logging warning messages.
Definition: ErrorLogger.h:163
void GetData(bool &b) const
Overloads of the GetData member template function.
Definition: Branch.cc:644
int GetId() const
Get the station Id.
ResultFlag
Flag returned by module methods to the RunController.
Definition: VModule.h:60
const StationFFTDataContainer & GetFFTDataContainer() const
retrieve Station FFTDataContainer (read access)

, generated on Tue Sep 26 2023.