All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
OpWaveform.cxx
Go to the documentation of this file.
1 /** ****************************************************************************
2  * @file OpWaveform.cxx
3  * @brief Definition of calibrated photon detector waveform.
4  * @author tjyang@fnal.gov
5  * @see OpWaveform.h
6  *
7  * ****************************************************************************/
8 
10 
11 // C/C++ standard libraries
12 #include <utility> // std::move()
13 
14 namespace recob{
15 
16  //----------------------------------------------------------------------
18  : fTimeStamp(0)
19  , fChannel(raw::InvalidChannelID)
20  , fSignalROI()
21  {}
22 
23  //----------------------------------------------------------------------
25  raw::RDTimeStamp time,
26  raw::ChannelID_t channel,
27  RegionsOfInterest_t const& sigROIlist
28  )
29  : fTimeStamp(time)
30  , fChannel(channel)
31  , fSignalROI(sigROIlist)
32  {}
33 
34  //----------------------------------------------------------------------
36  raw::RDTimeStamp time,
37  raw::ChannelID_t channel,
38  RegionsOfInterest_t&& sigROIlist
39  )
40  : fTimeStamp(time)
41  , fChannel(channel)
42  , fSignalROI(std::move(sigROIlist))
43  {}
44 
45 
46  //----------------------------------------------------------------------
47  std::vector<float> OpWaveform::Signal() const {
48  return { fSignalROI.begin(), fSignalROI.end() };
49  } // OpWaveform::Signal()
50 
51 
52 }
53 ////////////////////////////////////////////////////////////////////////
54 
double std(const std::vector< short > &wf, const double ped_mean, size_t start, size_t nsample)
Definition: UtilFunc.cxx:42
OpWaveform()
Default constructor: a wire with no signal information.
Definition: OpWaveform.cxx:17
constexpr ChannelID_t InvalidChannelID
ID of an invalid channel.
Definition: RawTypes.h:32
Definition of calibrated photon detector waveform.
RegionsOfInterest_t fSignalROI
Signal on the channel as function of time tick.
Definition: OpWaveform.h:108
iterator begin()
Standard iterators interface.
unsigned int ChannelID_t
Type representing the ID of a readout channel.
Definition: RawTypes.h:28
std::vector< float > Signal() const
Return a zero-padded full length vector filled with RoI signal.
Definition: OpWaveform.cxx:47