LArSoft  v07_13_02
Liquid Argon Software toolkit - http://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 #include <iosfwd>
15 
17 namespace raw {
18 
19  class OpDetPulse {
20 
21  public:
22  OpDetPulse(); // Default constructor
23 
24  private:
25 
26  unsigned short fOpChannel;
27  // for c2: fSamples is not used
28  //unsigned short fSamples; ///< number of ticks of the clock
29  unsigned int fPMTFrame;
30  unsigned int fFirstSample;
31 
32  std::vector<short> fWaveform;
33 
34 
35  public:
36 
37  OpDetPulse(unsigned short OpChannel,
38  std::vector<short> Waveform,
39  unsigned int PMTFrame,
40  unsigned int FirstSample);
41 
42  OpDetPulse(unsigned short OpChannel);
43 
44  int Integral(unsigned short startbin=0,
45  unsigned short endbin=0);
46 
47  const std::vector<short>& Waveform() const;
48  std::vector<short>& Waveform() ;
49  unsigned short OpChannel() const;
50  unsigned short Samples() const;
51  unsigned int PMTFrame() const;
52  unsigned int FirstSample() const;
53 
54  void SetPMTFrame( unsigned int Frame );
55  void SetFirstSample( unsigned int FirstSample );
56 
57  };
58 }
59 
60 inline const std::vector<short>& raw::OpDetPulse::Waveform() const { return fWaveform; }
61 inline std::vector<short>& raw::OpDetPulse::Waveform() { return fWaveform; }
62 inline unsigned short raw::OpDetPulse::OpChannel() const { return fOpChannel; }
63 inline unsigned short raw::OpDetPulse::Samples() const { return fWaveform.size(); }
64 inline unsigned int raw::OpDetPulse::PMTFrame() const { return fPMTFrame; }
65 inline unsigned int raw::OpDetPulse::FirstSample() const { return fFirstSample; }
66 inline void raw::OpDetPulse::SetPMTFrame(unsigned int Frame) { fPMTFrame=Frame; }
68 
69 
70 
71 #endif // RAWDATA_OPDETPULSE_H
72 
unsigned short OpChannel() const
Definition: OpDetPulse.h:62
std::vector< short > fWaveform
Definition: OpDetPulse.h:32
Raw data description.
Definition: RawTypes.h:6
const std::vector< short > & Waveform() const
Definition: OpDetPulse.h:60
unsigned int fFirstSample
first sample number within pmt frame
Definition: OpDetPulse.h:30
unsigned int FirstSample() const
Definition: OpDetPulse.h:65
unsigned short Samples() const
Definition: OpDetPulse.h:63
unsigned int fPMTFrame
frame number where pulse begins
Definition: OpDetPulse.h:29
void SetPMTFrame(unsigned int Frame)
Definition: OpDetPulse.h:66
int Integral(unsigned short startbin=0, unsigned short endbin=0)
Definition: OpDetPulse.cxx:48
unsigned short fOpChannel
channel in the readout
Definition: OpDetPulse.h:26
void SetFirstSample(unsigned int FirstSample)
Definition: OpDetPulse.h:67
unsigned int PMTFrame() const
Definition: OpDetPulse.h:64