RawDigit.cxx
Go to the documentation of this file.
1 /** ****************************************************************************
2  * @file RawDigit.cxx
3  * @brief Definition of basic raw digits
4  * @author brebel@fnal.gov
5  * @see RawDigit.h raw.h
6  *
7  *
8  * ****************************************************************************/
9 
10 #include <limits>
11 
13 
14 // C/C++ standard libraries
15 
16 namespace gar {
17  namespace raw{
18 
19  //----------------------------------------------------------------------
21  : fADC(0)
22  , fChannel(std::numeric_limits<unsigned int>::max())
23  , fSamples(0)
24  , fPedestal(0.)
25  , fSigma(0.)
26  , fCompression(gar::raw::kNone)
27  , fTime(0)
28  {}
29 
30 
31  //----------------------------------------------------------------------
33  ULong64_t samples,
34  RawDigit::ADCvector_t const& adclist,
35  gar::raw::Compress_t compress,
36  ULong64_t time)
37  : fADC(adclist)
38  , fChannel(channel)
39  , fSamples(samples)
40  , fPedestal(0.)
41  , fSigma(0.)
42  , fCompression(compress)
43  , fTime(time)
44  {}
45 
46 
47  //----------------------------------------------------------------------
49  ULong64_t samples,
50  RawDigit::ADCvector_t&& adclist,
51  gar::raw::Compress_t compress,
52  ULong64_t time)
53  : fADC(std::move(adclist))
54  , fChannel(channel)
55  , fSamples(samples)
56  , fPedestal(0.)
57  , fSigma(0.)
58  , fCompression(compress)
59  , fTime(time)
60  {}
61 
62 
63  } // namespace raw
64 } // gar
65 ////////////////////////////////////////////////////////////////////////
66 
ULong64_t fTime
timestamp
Definition: RawDigit.h:174
enum gar::raw::_compress Compress_t
STL namespace.
Raw data description.
uint8_t channel
Definition: CRTFragment.hh:201
float fPedestal
pedestal for this channel
Definition: RawDigit.h:171
uint32_t Channel_t
Definition: RawDigit.h:35
float fSigma
sigma of the pedestal counts for this channel
Definition: RawDigit.h:172
def move(depos, offset)
Definition: depos.py:107
static int max(int a, int b)
no compression
Definition: RawTypes.h:16
std::vector< short > ADCvector_t
Type representing a (compressed) vector of ADC counts.
Definition: RawDigit.h:71
General GArSoft Utilities.
gar::raw::Compress_t fCompression
compression scheme used for the ADC vector
Definition: RawDigit.h:173
Channel_t fChannel
channel number in the readout
Definition: RawDigit.h:168
ULong64_t fSamples
number of ticks of the clock
Definition: RawDigit.h:169
RawDigit()
Default constructor: an empty raw digit with zeros put in for paraneters and an invalid channel...
Definition: RawDigit.cxx:20
std::vector< short > fADC
ADC readout per tick, before pedestal subtraction.
Definition: RawDigit.h:166