RdChannelSelector.h
Go to the documentation of this file.
1 #ifndef _RdChannelSelector_RdChannelSelector_h_
2 #define _RdChannelSelector_RdChannelSelector_h_
3 
4 #include <fwk/VModule.h>
5 
6 #include <revt/Station.h>
7 #include <revt/Channel.h>
8 
9 #include <rdet/RDetector.h>
10 #include <rdet/Channel.h>
11 
12 // with cpp17 we can use std::optional
13 #include <boost/optional.hpp>
14 
15 
16 namespace RdChannelSelector {
17 
29 
30  public:
31  fwk::VModule::ResultFlag Init() override;
32  fwk::VModule::ResultFlag Run(evt::Event& event) override;
34 
35  private:
37 
38  boost::optional<revt::Channel&> GetLowGainChannel(revt::Station& station,
39  const rdet::RDetector& rDetector, const rdet::Channel& detChannel, const double tolerance);
40 
41  bool IsClose(const double a, const double b, const double tolerance);
42 
43  REGISTER_MODULE("RdChannelSelector", RdChannelSelector);
44  };
45 
46 }
47 
48 
49 #endif
50 
set saturated channels as inactive if another channel with same orientation is present. saturation status on the station level is not touched in this module but set by RdAntennaChannelToStationConverter depending on the saturation status of the finally used channels
fwk::VModule::ResultFlag Run(evt::Event &event) override
Run: invoked once per event.
boost::optional< revt::Channel & > GetLowGainChannel(revt::Station &station, const rdet::RDetector &rDetector, const rdet::Channel &detChannel, const double tolerance)
fwk::VModule::ResultFlag Init() override
Initialize: invoked at beginning of run (NOT beginning of event)
Detector description interface for Channel-related data.
Detector description interface for RDetector-related data.
Definition: RDetector.h:46
class to hold data at the radio Station level.
Module interface.
Definition: VModule.h:53
ResultFlag
Flag returned by module methods to the RunController.
Definition: VModule.h:60
REGISTER_MODULE("RdChannelSelector", RdChannelSelector)
fwk::VModule::ResultFlag Finish() override
Finish: invoked at end of the run (NOT end of the event)
bool IsClose(const double a, const double b, const double tolerance)

, generated on Tue Sep 26 2023.