LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
Class managing the creation of a new recob::Wire object. More...
#include "WireCreator.h"
Public Types | |
using | RegionsOfInterest_t = Wire::RegionsOfInterest_t |
Alias for the type of regions of interest. More... | |
Public Member Functions | |
WireCreator (const RegionsOfInterest_t &sigROIlist, const raw::RawDigit &rawdigit) | |
Constructor: uses specified signal in regions of interest. More... | |
WireCreator (RegionsOfInterest_t &&sigROIlist, const raw::RawDigit &rawdigit) | |
Constructor: uses specified signal in regions of interest. More... | |
WireCreator (RegionsOfInterest_t const &sigROIlist, raw::ChannelID_t channel, geo::View_t view) | |
Constructor: uses specified signal in regions of interest. More... | |
WireCreator (RegionsOfInterest_t &&sigROIlist, raw::ChannelID_t channel, geo::View_t view) | |
Constructor: uses specified signal in regions of interest. More... | |
Wire && | move () |
Prepares the constructed wire to be moved away. More... | |
const Wire & | copy () const |
Returns the constructed wire. More... | |
Protected Attributes | |
Wire | wire |
local instance of the wire being constructed More... | |
Class managing the creation of a new recob::Wire object.
In order to be as simple as possible (Plain Old Data), data products like recob::Wire need to be stripped of most of their functions, including the ability to communicate whether a value we try to store is invalid (that would require a art::Exception – art – or at least a message on the screen – MessageFacility) and the ability to read things from event, services (e.g. geometry) etc.
A Creator is a class that creates a temporary data product, and at the end it yields it to the caller for storage. This last step should be by move construction, although a copy method is also provided.
An example of creating a Wire object:
// let RoIsignal be a recob::Wire::RegionsOfInterest_t already filled // with the signal regions, and rawdigit the raw::RawDigit of the // channel; RoIsignal will become empty recob::WireCreator wire(std::move(RoIsignal), rawdigit); wires.push_back(wire.move()); // wire content is not valid any more
This is a one-step creation object: the wire is constructed at the same time the WireCreator is, and no facility is offered to modify the constructed wire, or to create another one.
Definition at line 55 of file WireCreator.h.
Alias for the type of regions of interest.
Definition at line 58 of file WireCreator.h.
recob::WireCreator::WireCreator | ( | const RegionsOfInterest_t & | sigROIlist, |
const raw::RawDigit & | rawdigit | ||
) |
Constructor: uses specified signal in regions of interest.
sigROIlist | signal organized in regions of interest |
rawdigit | the 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 28 of file WireCreator.cxx.
References recob::Wire::fSignalROI, lar::sparse_vector< T >::resize(), raw::RawDigit::Samples(), and wire.
recob::WireCreator::WireCreator | ( | RegionsOfInterest_t && | sigROIlist, |
const raw::RawDigit & | rawdigit | ||
) |
Constructor: uses specified signal in regions of interest.
sigROIlist | signal organized in regions of interest |
rawdigit | the 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 39 of file WireCreator.cxx.
References recob::Wire::fSignalROI, lar::sparse_vector< T >::resize(), raw::RawDigit::Samples(), and wire.
recob::WireCreator::WireCreator | ( | RegionsOfInterest_t const & | sigROIlist, |
raw::ChannelID_t | channel, | ||
geo::View_t | view | ||
) |
Constructor: uses specified signal in regions of interest.
sigROIlist | signal organized in regions of interest |
channel | the ID of the channel |
view | the 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.
Definition at line 50 of file WireCreator.cxx.
recob::WireCreator::WireCreator | ( | RegionsOfInterest_t && | sigROIlist, |
raw::ChannelID_t | channel, | ||
geo::View_t | view | ||
) |
Constructor: uses specified signal in regions of interest.
sigROIlist | signal organized in regions of interest |
channel | the ID of the channel |
view | the 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 57 of file WireCreator.cxx.
|
inline |
Returns 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 WireCreator 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 138 of file WireCreator.h.
|
inline |
Prepares the constructed wire to be moved away.
Despite the name, no move happens in this function. Move takes place in the caller code as proper; for example:
// be wire a WireCreator 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 122 of file WireCreator.h.
|
protected |
local instance of the wire being constructed
Definition at line 141 of file WireCreator.h.
Referenced by WireCreator().