NoiseSource.h
Go to the documentation of this file.
1 /** This frame source provides frames filled with noise.
2 
3  Each time it is called it produces a fixed readout length of
4  voltage-level noise which spans all channels.
5 
6  */
7 
8 #ifndef WIRECELLGEN_NOISESOURCE
9 #define WIRECELLGEN_NOISESOURCE
10 
13 #include "WireCellIface/IRandom.h"
16 #include "WireCellUtil/Waveform.h"
17 
18 #include <string>
19 
20 namespace WireCell {
21  namespace Gen {
22 
23  class NoiseSource : public IFrameSource, public IConfigurable {
24  public:
25  NoiseSource(const std::string& model = "",
26  const std::string& anode="AnodePlane",
27  const std::string& rng="Random");
28  // fixme: add constructor that set parameter defaults from c++ for unit tests
29  virtual ~NoiseSource();
30 
31  /// IFrameSource
32  virtual bool operator()(IFrame::pointer& frame);
33 
34  /// IConfigurable
35  virtual void configure(const WireCell::Configuration& config);
37 
38  private:
46  double m_rep_percent;
47  bool m_eos;
48 
49  };
50  }
51 }
52 
53 #endif
std::shared_ptr< const IFrame > pointer
Definition: IData.h:19
std::string string
Definition: nybbler.cc:12
virtual bool operator()(IFrame::pointer &frame)
IFrameSource.
virtual void configure(const WireCell::Configuration &config)
IConfigurable.
Definition: NoiseSource.cxx:61
IAnodePlane::pointer m_anode
Definition: NoiseSource.h:40
static Config * config
Definition: config.cpp:1054
IChannelSpectrum::pointer m_model
Definition: NoiseSource.h:41
std::shared_ptr< Interface > pointer
Definition: Interface.h:16
Definition: Main.h:22
virtual WireCell::Configuration default_configuration() const
Optional, override to return a hard-coded default configuration.
Definition: NoiseSource.cxx:44
IRandom::pointer m_rng
Definition: NoiseSource.h:39
Json::Value Configuration
Definition: Configuration.h:50
NoiseSource(const std::string &model="", const std::string &anode="AnodePlane", const std::string &rng="Random")
Definition: NoiseSource.cxx:19