LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
RawDigit.cxx
Go to the documentation of this file.
1 
12 
13 // C/C++ standard libraries
14 #include <utility> // std::move()
15 
16 
17 namespace raw{
18 
19  //----------------------------------------------------------------------
21  : fADC(0)
22  , fChannel(InvalidChannelID)
23  , fSamples(0)
24  , fPedestal(0.)
25  , fSigma(0.)
26  , fCompression(kNone)
27  // , fFlags(DefaultFlags)
28  {}
29 
30 
31  //----------------------------------------------------------------------
33  ChannelID_t channel,
34  unsigned short samples,
35  ADCvector_t const& adclist,
36  Compress_t compression /* = kNone */ /*,
37  const Flags_t& flags / * = DefaultFlags * / */
38  )
39  : fADC(adclist)
40  , fChannel(channel)
41  , fSamples(samples)
42  , fPedestal(0.)
43  , fSigma(0.)
44  , fCompression(compression)
45  // , fFlags(flags)
46  {}
47 
48 
49  //----------------------------------------------------------------------
51  ChannelID_t channel,
52  unsigned short samples,
53  ADCvector_t&& adclist,
54  Compress_t compression /* = kNone */ /*,
55  const Flags_t& flags / * = DefaultFlags * / */
56  )
57  : fADC(std::move(adclist))
58  , fChannel(channel)
59  , fSamples(samples)
60  , fPedestal(0.)
61  , fSigma(0.)
62  , fCompression(compression)
63  // , fFlags(flags)
64  {}
65 
66 
67  //----------------------------------------------------------------------
68  void RawDigit::SetPedestal(float ped, float sigma /* = 1. */ )
69  {
70 
71  fPedestal = ped;
72  fSigma = sigma;
73 
74  } // RawDigit::SetPedestal()
75 
76 
77 } // namespace raw
79 
std::vector< short > fADC
ADC readout per tick, before pedestal subtraction.
Definition: RawDigit.h:182
enum raw::_compress Compress_t
float fSigma
sigma of the pedestal counts for this channel
Definition: RawDigit.h:188
std::vector< short > ADCvector_t
Type representing a (compressed) vector of ADC counts.
Definition: RawDigit.h:72
STL namespace.
Definition of basic raw digits.
Raw data description.
Definition: RawTypes.h:6
no compression
Definition: RawTypes.h:9
constexpr ChannelID_t InvalidChannelID
ID of an invalid channel.
Definition: RawTypes.h:31
Compress_t fCompression
compression scheme used for the ADC vector
Definition: RawDigit.h:190
RawDigit()
Default constructor: an empty raw digit.
Definition: RawDigit.cxx:20
void SetPedestal(float ped, float sigma=1.)
Set pedestal and its RMS (the latter is 0 by default)
Definition: RawDigit.cxx:68
float fPedestal
pedestal for this channel
Definition: RawDigit.h:187
ChannelID_t fChannel
channel number in the readout
Definition: RawDigit.h:184
unsigned int ChannelID_t
Type representing the ID of a readout channel.
Definition: RawTypes.h:27
unsigned short fSamples
number of ticks of the clock
Definition: RawDigit.h:185