All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MultiChannelNoiseDB.h
Go to the documentation of this file.
1 #ifndef LARWIRECELL_COMPONENTS_MULTICHANNELNOISEDB
2 #define LARWIRECELL_COMPONENTS_MULTICHANNELNOISEDB
3 
4 #include "WireCellIface/IChannelNoiseDatabase.h"
5 #include "WireCellIface/IConfigurable.h"
7 
8 namespace wcls {
9 
10  class MultiChannelNoiseDB : public WireCell::IChannelNoiseDatabase,
11  public IArtEventVisitor,
12  public WireCell::IConfigurable
13  {
14  public:
16  virtual ~MultiChannelNoiseDB();
17 
18  /// IArtEventVisitor.
19  //
20  // Note: we don't actually poke at the event but use this
21  // entry to refresh info from services in case they change
22  // event-to-event.
23  virtual void visit(art::Event & event);
24 
25  /// IConfigurable.
26  virtual WireCell::Configuration default_configuration() const;
27  virtual void configure(const WireCell::Configuration& cfg);
28 
29  // IChannelNoiseDatabase
30 
31  // Big Fat Pimpl!
32  virtual double sample_time() const {
33  return m_pimpl->sample_time();
34  }
35  virtual double nominal_baseline(int channel) const {
36  return m_pimpl->nominal_baseline(channel);
37  }
38  virtual double gain_correction(int channel) const {
39  return m_pimpl->gain_correction(channel);
40  }
41  virtual double response_offset(int channel) const {
42  return m_pimpl->response_offset(channel);
43  }
44  virtual double min_rms_cut(int channel) const {
45  return m_pimpl->min_rms_cut(channel);
46  }
47  virtual double max_rms_cut(int channel) const {
48  return m_pimpl->max_rms_cut(channel);
49  }
50  virtual int pad_window_front(int channel) const {
51  return m_pimpl->pad_window_front(channel);
52  }
53  virtual int pad_window_back(int channel) const {
54  return m_pimpl->pad_window_back(channel);
55  }
56  virtual float coherent_nf_decon_limit(int channel) const {
57  return m_pimpl->coherent_nf_decon_limit(channel);
58  }
59  virtual float coherent_nf_decon_lf_cutoff(int channel) const {
60  return m_pimpl->coherent_nf_decon_lf_cutoff(channel);
61  }
62  virtual float coherent_nf_adc_limit(int channel) const {
63  return m_pimpl->coherent_nf_adc_limit(channel);
64  }
65  virtual float coherent_nf_decon_limit1(int channel) const {
66  return m_pimpl->coherent_nf_decon_limit1(channel);
67  }
68  virtual float coherent_nf_protection_factor(int channel) const {
69  return m_pimpl->coherent_nf_protection_factor(channel);
70  }
71  virtual float coherent_nf_min_adc_limit(int channel) const {
72  return m_pimpl->coherent_nf_min_adc_limit(channel);
73  }
74  virtual float coherent_nf_roi_min_max_ratio(int channel) const {
75  return m_pimpl->coherent_nf_roi_min_max_ratio(channel);
76  }
77  virtual const filter_t& rcrc(int channel) const {
78  return m_pimpl->rcrc(channel);
79  }
80  virtual const filter_t& config(int channel) const {
81  return m_pimpl->config(channel);
82  }
83  virtual const filter_t& noise(int channel) const {
84  return m_pimpl->noise(channel);
85  }
86  virtual const filter_t& response(int channel) const {
87  return m_pimpl->response(channel);
88  }
89  virtual std::vector<channel_group_t> coherent_channels() const {
90  return m_pimpl->coherent_channels();
91  }
92  virtual channel_group_t bad_channels() const {
93  return m_pimpl->bad_channels();
94  }
95  virtual channel_group_t miscfg_channels() const {
96  return m_pimpl->miscfg_channels();
97  }
98 
99  private:
100 
101  // little helper struct
102  struct SubDB {
103  std::function<bool(art::Event& event)> check;
104  WireCell::IChannelNoiseDatabase::pointer chndb;
105  IArtEventVisitor::pointer visitor;
106  SubDB(std::function<bool(art::Event& event)> f,
107  WireCell::IChannelNoiseDatabase::pointer d,
108  IArtEventVisitor::pointer v) : check(f), chndb(d), visitor(v) {}
109  };
110  typedef std::vector<SubDB> rulelist_t;
112  WireCell::IChannelNoiseDatabase::pointer m_pimpl;
113  IArtEventVisitor::pointer m_pimpl_visitor;
114 
115  };
116 
117 
118 } // wcls
119 
120 #endif
121 
122 // Local Variables:
123 // mode: c++
124 // c-basic-offset: 4
125 // End:
WireCell::IChannelNoiseDatabase::pointer m_pimpl
IArtEventVisitor::pointer visitor
virtual double min_rms_cut(int channel) const
virtual WireCell::Configuration default_configuration() const
IConfigurable.
IArtEventVisitor::pointer m_pimpl_visitor
virtual double response_offset(int channel) const
std::function< bool(art::Event &event)> check
virtual float coherent_nf_decon_limit1(int channel) const
virtual channel_group_t miscfg_channels() const
virtual double gain_correction(int channel) const
virtual const filter_t & rcrc(int channel) const
WireCell::IChannelNoiseDatabase::pointer chndb
SubDB(std::function< bool(art::Event &event)> f, WireCell::IChannelNoiseDatabase::pointer d, IArtEventVisitor::pointer v)
virtual void configure(const WireCell::Configuration &cfg)
virtual float coherent_nf_min_adc_limit(int channel) const
virtual float coherent_nf_roi_min_max_ratio(int channel) const
virtual double max_rms_cut(int channel) const
virtual double nominal_baseline(int channel) const
virtual channel_group_t bad_channels() const
virtual int pad_window_front(int channel) const
std::vector< SubDB > rulelist_t
virtual int pad_window_back(int channel) const
virtual float coherent_nf_decon_lf_cutoff(int channel) const
virtual const filter_t & response(int channel) const
virtual const filter_t & noise(int channel) const
virtual std::vector< channel_group_t > coherent_channels() const
virtual float coherent_nf_adc_limit(int channel) const
virtual void visit(art::Event &event)
IArtEventVisitor.
virtual const filter_t & config(int channel) const
virtual float coherent_nf_decon_limit(int channel) const
virtual float coherent_nf_protection_factor(int channel) const
virtual double sample_time() const