LArSoft
v07_13_02
Liquid Argon Software toolkit - http://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 53 of file WireCreator.h.
Alias for the type of regions of interest.
Definition at line 56 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 30 of file WireCreator.cxx.
References raw::RawDigit::Samples().
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 44 of file WireCreator.cxx.
References raw::RawDigit::Samples().
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 57 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 66 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 150 of file WireCreator.h.
References wire.
|
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 133 of file WireCreator.h.
References wire.
|
protected |
local instance of the wire being constructed
Definition at line 154 of file WireCreator.h.