All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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  * Compression/uncompression utilities are declared in lardata/RawData/raw.h .
8  *
9  * ****************************************************************************/
10 
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.)
27  // , fFlags(DefaultFlags)
28  {}
29 
30 
31  //----------------------------------------------------------------------
33  ChannelID_t channel,
34  ULong64_t 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  ULong64_t 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
78 ////////////////////////////////////////////////////////////////////////
79 
double std(const std::vector< short > &wf, const double ped_mean, size_t start, size_t nsample)
Definition: UtilFunc.cxx:42
TString compression(pset.get< std::string >("CompressionType"))
enum raw::_compress Compress_t
float fSigma
sigma of the pedestal counts for this channel
Definition: RawDigit.h:189
std::vector< short > ADCvector_t
Type representing a (compressed) vector of ADC counts.
Definition: RawDigit.h:73
Definition of basic raw digits.
no compression
Definition: RawTypes.h:9
constexpr ChannelID_t InvalidChannelID
ID of an invalid channel.
Definition: RawTypes.h:32
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:188
unsigned int ChannelID_t
Type representing the ID of a readout channel.
Definition: RawTypes.h:28