LArSoft  v09_90_00
Liquid Argon Software toolkit - https://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 namespace raw {
17 
18  //----------------------------------------------------------------------
20  : fADC(0)
21  , fChannel(InvalidChannelID)
22  , fSamples(0)
23  , fPedestal(0.)
24  , fSigma(0.)
25  , fCompression(kNone)
26  // , fFlags(DefaultFlags)
27  {}
28 
29  //----------------------------------------------------------------------
31  ULong64_t samples,
32  ADCvector_t const& adclist,
33  Compress_t compression /* = kNone */ /*,
34  const Flags_t& flags / * = DefaultFlags * / */
35  )
36  : fADC(adclist)
37  , fChannel(channel)
38  , fSamples(samples)
39  , fPedestal(0.)
40  , fSigma(0.)
41  , fCompression(compression)
42  // , fFlags(flags)
43  {}
44 
45  //----------------------------------------------------------------------
47  ULong64_t samples,
48  ADCvector_t&& adclist,
49  Compress_t compression /* = kNone */ /*,
50  const Flags_t& flags / * = DefaultFlags * / */
51  )
52  : fADC(std::move(adclist))
53  , fChannel(channel)
54  , fSamples(samples)
55  , fPedestal(0.)
56  , fSigma(0.)
57  , fCompression(compression)
58  // , fFlags(flags)
59  {}
60 
61  //----------------------------------------------------------------------
62  void RawDigit::SetPedestal(float ped, float sigma /* = 1. */)
63  {
64 
65  fPedestal = ped;
66  fSigma = sigma;
67 
68  } // RawDigit::SetPedestal()
69 
70 } // namespace raw
std::vector< short > fADC
ADC readout per tick, before pedestal subtraction.
Definition: RawDigit.h:180
enum raw::_compress Compress_t
float fSigma
sigma of the pedestal counts for this channel
Definition: RawDigit.h:186
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:188
RawDigit()
Default constructor: an empty raw digit.
Definition: RawDigit.cxx:19
ULong64_t fSamples
number of ticks of the clock
Definition: RawDigit.h:183
void SetPedestal(float ped, float sigma=1.)
Set pedestal and its RMS (the latter is 0 by default)
Definition: RawDigit.cxx:62
float fPedestal
pedestal for this channel
Definition: RawDigit.h:185
ChannelID_t fChannel
channel number in the readout
Definition: RawDigit.h:182
unsigned int ChannelID_t
Type representing the ID of a readout channel.
Definition: RawTypes.h:28