StaticChannelStatus.h
Go to the documentation of this file.
1 /**
2  The static channel status component provides a simple way to set
3  channel status via configuration. It does not provide for dynamic
4  changes.
5  */
6 
7 #ifndef WIRECELLGEN_STATICCHANNELSTATUS
8 #define WIRECELLGEN_STATICCHANNELSTATUS
9 
12 #include "WireCellUtil/Units.h"
13 
14 #include <unordered_map>
15 
16 namespace WireCell {
17  namespace Gen {
19  public:
20  struct ChannelStatus {
21  double gain;
22  double shaping;
24  double s=2.0*units::us) : gain(g), shaping(s) {}
25  };
26  typedef std::unordered_map<int, ChannelStatus> channel_status_map_t;
27 
29  double nominal_shaping=2.0*units::us,
30  channel_status_map_t deviants = channel_status_map_t());
31  virtual ~StaticChannelStatus();
32 
33  // IChannelStatus interface
34  virtual double preamp_gain(int chid) const;
35  virtual double preamp_shaping(int chid) const;
36 
37  // IConfigurable interface
38  virtual void configure(const WireCell::Configuration& config);
40 
41  private:
43  channel_status_map_t m_deviants;
44  };
45  }
46 }
47 
48 #endif
virtual WireCell::Configuration default_configuration() const
Optional, override to return a hard-coded default configuration.
static const double mV
Definition: Units.h:180
static const double g
Definition: Units.h:145
static Config * config
Definition: config.cpp:1054
virtual double preamp_gain(int chid) const
StaticChannelStatus(double nominal_gain=14.0 *units::mV/units::fC, double nominal_shaping=2.0 *units::us, channel_status_map_t deviants=channel_status_map_t())
static const double fC
Definition: Units.h:113
Definition: Main.h:22
std::unordered_map< int, ChannelStatus > channel_status_map_t
const double nominal_shaping
virtual double preamp_shaping(int chid) const
Json::Value Configuration
Definition: Configuration.h:50
static const double us
Definition: Units.h:105
virtual void configure(const WireCell::Configuration &config)
Accept a configuration.
static QCString * s
Definition: config.cpp:1042
const double nominal_gain
ChannelStatus(double g=14.0 *units::mV/units::fC, double s=2.0 *units::us)