LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
OpDetPulse.h
Go to the documentation of this file.
1 //
3 // Waveform for one PMT
4 //
5 // Ben Jones and Christie Chiu, June 2012
6 // bjpjones@mit.edu, cschiu@mit.edu
7 //
9 
10 #ifndef RAWDATA_OPDETPULSE_H
11 #define RAWDATA_OPDETPULSE_H
12 
13 #include <vector>
14 
16 namespace raw {
17 
18  class OpDetPulse {
19 
20  public:
21  OpDetPulse(); // Default constructor
22 
23  private:
24  unsigned short fOpChannel;
25  // for c2: fSamples is not used
26  //unsigned short fSamples; ///< number of ticks of the clock
27  unsigned int fPMTFrame;
28  unsigned int fFirstSample;
29 
30  std::vector<short> fWaveform;
31 
32  public:
33  OpDetPulse(unsigned short OpChannel,
34  std::vector<short> Waveform,
35  unsigned int PMTFrame,
36  unsigned int FirstSample);
37 
38  OpDetPulse(unsigned short OpChannel);
39 
40  int Integral(unsigned short startbin = 0, unsigned short endbin = 0);
41 
42  const std::vector<short>& Waveform() const;
43  std::vector<short>& Waveform();
44  unsigned short OpChannel() const;
45  unsigned short Samples() const;
46  unsigned int PMTFrame() const;
47  unsigned int FirstSample() const;
48 
49  void SetPMTFrame(unsigned int Frame);
50  void SetFirstSample(unsigned int FirstSample);
51  };
52 }
53 
54 inline const std::vector<short>& raw::OpDetPulse::Waveform() const
55 {
56  return fWaveform;
57 }
58 inline std::vector<short>& raw::OpDetPulse::Waveform()
59 {
60  return fWaveform;
61 }
62 inline unsigned short raw::OpDetPulse::OpChannel() const
63 {
64  return fOpChannel;
65 }
66 inline unsigned short raw::OpDetPulse::Samples() const
67 {
68  return fWaveform.size();
69 }
70 inline unsigned int raw::OpDetPulse::PMTFrame() const
71 {
72  return fPMTFrame;
73 }
74 inline unsigned int raw::OpDetPulse::FirstSample() const
75 {
76  return fFirstSample;
77 }
78 inline void raw::OpDetPulse::SetPMTFrame(unsigned int Frame)
79 {
80  fPMTFrame = Frame;
81 }
83 {
85 }
86 
87 #endif // RAWDATA_OPDETPULSE_H
88 
unsigned short OpChannel() const
Definition: OpDetPulse.h:62
std::vector< short > fWaveform
Definition: OpDetPulse.h:30
Raw data description.
Definition: RawTypes.h:6
const std::vector< short > & Waveform() const
Definition: OpDetPulse.h:54
unsigned int fFirstSample
first sample number within pmt frame
Definition: OpDetPulse.h:28
unsigned int FirstSample() const
Definition: OpDetPulse.h:74
unsigned short Samples() const
Definition: OpDetPulse.h:66
unsigned int fPMTFrame
frame number where pulse begins
Definition: OpDetPulse.h:27
void SetPMTFrame(unsigned int Frame)
Definition: OpDetPulse.h:78
int Integral(unsigned short startbin=0, unsigned short endbin=0)
Definition: OpDetPulse.cxx:46
unsigned short fOpChannel
channel in the readout
Definition: OpDetPulse.h:24
void SetFirstSample(unsigned int FirstSample)
Definition: OpDetPulse.h:82
unsigned int PMTFrame() const
Definition: OpDetPulse.h:70