RawDigitAdder.h
Go to the documentation of this file.
1 /**
2  * \file RawDigitAdder.h
3  *
4  * \ingroup DataOverlay
5  *
6  * \brief Defintion for a templated base class to add two vectors together,
7  * and give an "added" waveform.
8  *
9  * @author wketchum
10  */
11 
12 /** \addtogroup DataOverlay
13 
14  @{*/
15 #ifndef OVERLAY_DATAOVERLAY_RAWDIGITADDER_H
16 #define OVERLAY_DATAOVERLAY_RAWDIGITADDER_H
17 
18 #include <vector>
19 #include <string>
20 
21 /**
22  \class RawDigitAdder
23  Add two vectors together. This is a base class
24  that just assumes things are linear, and that you add signed integers. Experiments can
25  have a class inherit from this one, and use that.
26 
27 */
28 
29 namespace mix {
30  class RawDigitAdder;
31 }
32 
34 
35 public:
36 
37  /// Default constructor
38  RawDigitAdder(bool t=true):
39  _throw(t){};
40 
41  void AddRawDigits( std::vector<short> const&,
42  std::vector<short> const&,
43  std::vector<short>&);
44  void AddRawDigits( std::vector<short> const&,
45  std::vector<short>&);
46  void AddRawDigits( std::vector< std::vector<short> > const&,
47  std::vector<short>&);
48 
51 
52  void SetPedestalInputs(float f1, float f2)
54 
55  virtual std::string Name() { return "RawDigitAdder_Base"; }
56 
57  /// Default destructor
58  virtual ~RawDigitAdder(){};
59 
60  protected:
61  bool _throw;
62  void FixOverflow(short&);
63 
64  private:
65 
66  virtual void AddRawDigit( short const&, short const&, short&);
67  void AddRawDigit( short const&, short&);
68 
69  void CheckVectorSize(std::vector<short> const&, std::vector<short> const&);
70 
71  float _ped1,_ped2;
72  void SetPedestalInput(float f, float& _scale);
73 
74 };
75 
76 #endif
77 /** @} */ // end of doxygen group
78 
void SetPedestalFirstInput(float f1)
Definition: RawDigitAdder.h:49
std::string string
Definition: nybbler.cc:12
struct vector vector
SynchrotronAndGN f2
void CheckVectorSize(std::vector< short > const &, std::vector< short > const &)
void SetPedestalSecondInput(float f2)
Definition: RawDigitAdder.h:50
EmPhysicsFactory f1
void AddRawDigits(std::vector< short > const &, std::vector< short > const &, std::vector< short > &)
void SetPedestalInputs(float f1, float f2)
Definition: RawDigitAdder.h:52
RawDigitAdder(bool t=true)
Default constructor.
Definition: RawDigitAdder.h:38
virtual void AddRawDigit(short const &, short const &, short &)
virtual ~RawDigitAdder()
Default destructor.
Definition: RawDigitAdder.h:58
void FixOverflow(short &)
virtual std::string Name()
Definition: RawDigitAdder.h:55
void SetPedestalInput(float f, float &_scale)