All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Protected Attributes | List of all members
recob::ChannelROICreator Class Reference

Class managing the creation of a new recob::Wire object. More...

#include <ChannelROICreator.h>

Public Types

using RegionsOfInterest_t = ChannelROI::RegionsOfInterest_t
 Alias for the type of regions of interest. More...
 

Public Member Functions

 ChannelROICreator (const RegionsOfInterest_t &sigROIlist, const raw::RawDigit &rawdigit)
 Constructor: uses specified signal in regions of interest. More...
 
 ChannelROICreator (RegionsOfInterest_t &&sigROIlist, const raw::RawDigit &rawdigit)
 Constructor: uses specified signal in regions of interest. More...
 
 ChannelROICreator (RegionsOfInterest_t const &sigROIlist, raw::ChannelID_t channel)
 Constructor: uses specified signal in regions of interest. More...
 
 ChannelROICreator (RegionsOfInterest_t &&sigROIlist, raw::ChannelID_t channel)
 Constructor: uses specified signal in regions of interest. More...
 
ChannelROI && move ()
 Prepares the constructed wire to be moved away. More...
 
const ChannelROIcopy () const
 Returns the constructed wire. More...
 

Protected Attributes

ChannelROI channelROI
 local instance of the wire being constructed More...
 

Detailed Description

Class managing the creation of a new recob::Wire object.

As Gianluca Petrillo points out, the same considerations described in recob::WireCreator apply here as well

Definition at line 31 of file ChannelROICreator.h.

Member Typedef Documentation

Alias for the type of regions of interest.

Definition at line 34 of file ChannelROICreator.h.

Constructor & Destructor Documentation

recob::ChannelROICreator::ChannelROICreator ( const RegionsOfInterest_t sigROIlist,
const raw::RawDigit rawdigit 
)

Constructor: uses specified signal in regions of interest.

Parameters
sigROIlistsignal organized in regions of interest
rawdigitthe raw digit this channel is associated to

The information used from the raw digit are the channel ID and the length in samples (TDC ticks) of the original readout window.

Definition at line 21 of file ChannelROICreator.cxx.

21  :
22  channelROI(
23  sigROIlist,
24  rawdigit.Channel()
25  )
26  {
27  // resize fSignalROI again:
28  // just in case the user hasn't cared to set sigROIlist size right
29  channelROI.fSignalROI.resize(rawdigit.Samples());
30  } // Wire::Wire(RegionsOfInterest_t&)
RegionsOfInterest_t fSignalROI
Signal on the channel as function of time tick.
Definition: ChannelROI.h:117
ChannelROI channelROI
local instance of the wire being constructed
ULong64_t Samples() const
Number of samples in the uncompressed ADC data.
Definition: RawDigit.h:213
void resize(size_type new_size)
Resizes the vector to the specified size, adding void.
ChannelID_t Channel() const
DAQ channel this raw data was read from.
Definition: RawDigit.h:212
recob::ChannelROICreator::ChannelROICreator ( RegionsOfInterest_t &&  sigROIlist,
const raw::RawDigit rawdigit 
)

Constructor: uses specified signal in regions of interest.

Parameters
sigROIlistsignal organized in regions of interest
rawdigitthe raw digit this channel is associated to

The information used from the raw digit are the channel ID and the length in samples (TDC ticks) of the original readout window.

Signal information is moved from sigROIlist, that becomes empty.

Definition at line 34 of file ChannelROICreator.cxx.

34  :
35  channelROI(
36  std::move(sigROIlist),
37  rawdigit.Channel()
38  )
39  {
40  // resize fSignalROI again:
41  // just in case the user hasn't cared to set sigROIlist size right
42  channelROI.fSignalROI.resize(rawdigit.Samples());
43  } // Wire::Wire(RegionsOfInterest_t&)
RegionsOfInterest_t fSignalROI
Signal on the channel as function of time tick.
Definition: ChannelROI.h:117
ChannelROI channelROI
local instance of the wire being constructed
ULong64_t Samples() const
Number of samples in the uncompressed ADC data.
Definition: RawDigit.h:213
void resize(size_type new_size)
Resizes the vector to the specified size, adding void.
ChannelID_t Channel() const
DAQ channel this raw data was read from.
Definition: RawDigit.h:212
recob::ChannelROICreator::ChannelROICreator ( RegionsOfInterest_t const &  sigROIlist,
raw::ChannelID_t  channel 
)

Constructor: uses specified signal in regions of interest.

Parameters
sigROIlistsignal organized in regions of interest
channelthe ID of the channel

The information used from the raw digit are the channel ID and the length in samples (TDC ticks) of the original readout window.

Definition at line 46 of file ChannelROICreator.cxx.

49  :
50  channelROI(sigROIlist, channel)
51  {}
ChannelROI channelROI
local instance of the wire being constructed
recob::ChannelROICreator::ChannelROICreator ( RegionsOfInterest_t &&  sigROIlist,
raw::ChannelID_t  channel 
)

Constructor: uses specified signal in regions of interest.

Parameters
sigROIlistsignal organized in regions of interest
channelthe ID of the channel
viewthe view the channel belongs to

The information used from the raw digit are the channel ID and the length in samples (TDC ticks) of the original readout window.

Signal information is moved from sigROIlist, that becomes empty.

Definition at line 54 of file ChannelROICreator.cxx.

57  :
58  channelROI(std::move(sigROIlist), channel)
59  {}
ChannelROI channelROI
local instance of the wire being constructed

Member Function Documentation

const ChannelROI& recob::ChannelROICreator::copy ( ) const
inline

Returns the constructed wire.

Returns
a constant reference to the constructed wire

Despite the name, no copy happens in this function. Copy takes place in the caller code as proper; for example:

// be wire a ChannelROICreator instance:
std::vector<recob::Wire> Wires;
wire.copy();                          // nothing happens
Wires.push_back(wire.copy());         // here a copy happens
recob::Wire single_wire(wire.copy()); // wire is copied again

Definition at line 125 of file ChannelROICreator.h.

125 { return channelROI; }
ChannelROI channelROI
local instance of the wire being constructed
ChannelROI&& recob::ChannelROICreator::move ( )
inline

Prepares the constructed wire to be moved away.

Returns
a right-value reference to the constructed wire

Despite the name, no move happens in this function. Move takes place in the caller code as proper; for example:

// be wire a ChannelROICreator instance:
std::vector<recob::Wire> Wires;
wire.move();                          // nothing happens
Wires.push_back(wire.move());         // here the copy happens
recob::Wire single_wire(wire.move()); // wrong! wire is empty now

Definition at line 108 of file ChannelROICreator.h.

108 { return std::move(channelROI); }
ChannelROI channelROI
local instance of the wire being constructed

Member Data Documentation

ChannelROI recob::ChannelROICreator::channelROI
protected

local instance of the wire being constructed

Definition at line 129 of file ChannelROICreator.h.


The documentation for this class was generated from the following files: