LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
trkmkr::TrackTrajectoryCreationBookKeeper Class Reference

Helper class to aid the creation of a recob::TrackTrajectory, keeping data vectors in sync. More...

#include "TrackTrajectoryCreationBookKeeper.h"

Public Member Functions

 TrackTrajectoryCreationBookKeeper (std::vector< art::Ptr< Hit > > &outhits, bool hasMomenta)
 Constructor: needs reference to output hit vector, and hasMomenta bool (true if Vector_t are momenta, false if they are directions). More...
 
TrackTrajectory finalizeTrackTrajectory ()
 Get the finalized recob::TrackTrajectory object; internal data vectors are moved so no more points should be added. More...
 
 TrackTrajectoryCreationBookKeeper (const TrackTrajectoryCreationBookKeeper &)=delete
 Avoid copies of this object. More...
 
 TrackTrajectoryCreationBookKeeper (TrackTrajectoryCreationBookKeeper &&)=delete
 Avoid copies of this object. More...
 
TrackTrajectoryCreationBookKeeperoperator= (const TrackTrajectoryCreationBookKeeper &)=delete
 Avoid copies of this object. More...
 
TrackTrajectoryCreationBookKeeperoperator= (TrackTrajectoryCreationBookKeeper &&)=delete
 Avoid copies of this object. More...
 
void addPoint (const Point_t &point, const Vector_t &vect, art::Ptr< Hit > hit, const PointFlags_t &flag)
 Add a single point; different version of the functions are provided using const references or rvalue references. More...
 
void addPoint (Point_t &&point, Vector_t &&vect, art::Ptr< Hit > hit, PointFlags_t &&flag)
 Add a single point; different version of the functions are provided using const references or rvalue references. More...
 

Private Attributes

bool hasMomenta_
 
std::vector< art::Ptr< Hit > > * hits
 
std::vector< Point_tpositions
 
std::vector< Vector_tmomenta
 
std::vector< PointFlags_tflags
 

Detailed Description

Helper class to aid the creation of a recob::TrackTrajectory, keeping data vectors in sync.

Helper class to aid the creation of a recob::TrackTrajectory, keeping data vectors (Point_t, Vector_t, PointFlags_t, Hit) in sync. Elements of those vectors are added sequentially using the addPoint functions. Once all points have been added a call to the function finalizeTrackTrajectory, builds the track moving the content of the vectors.

Author
G. Cerati (FNAL, MicroBooNE)
Date
2017
Version
1.0

Definition at line 31 of file TrackTrajectoryCreationBookKeeper.h.

Constructor & Destructor Documentation

trkmkr::TrackTrajectoryCreationBookKeeper::TrackTrajectoryCreationBookKeeper ( std::vector< art::Ptr< Hit > > &  outhits,
bool  hasMomenta 
)
inline

Constructor: needs reference to output hit vector, and hasMomenta bool (true if Vector_t are momenta, false if they are directions).

Definition at line 34 of file TrackTrajectoryCreationBookKeeper.h.

References hits().

35  : hasMomenta_(hasMomenta), hits(&outhits)
36  {
37  hits->clear();
38  }
trkmkr::TrackTrajectoryCreationBookKeeper::TrackTrajectoryCreationBookKeeper ( const TrackTrajectoryCreationBookKeeper )
delete

Avoid copies of this object.

trkmkr::TrackTrajectoryCreationBookKeeper::TrackTrajectoryCreationBookKeeper ( TrackTrajectoryCreationBookKeeper &&  )
delete

Avoid copies of this object.

Member Function Documentation

void trkmkr::TrackTrajectoryCreationBookKeeper::addPoint ( const Point_t point,
const Vector_t vect,
art::Ptr< Hit hit,
const PointFlags_t flag 
)
inline

Add a single point; different version of the functions are provided using const references or rvalue references.

Definition at line 50 of file TrackTrajectoryCreationBookKeeper.h.

50  {
51  positions.push_back(point);
52  momenta.push_back(vect);
53  hits->push_back(hit);
54  flags.push_back(flag);
55  }
void trkmkr::TrackTrajectoryCreationBookKeeper::addPoint ( Point_t &&  point,
Vector_t &&  vect,
art::Ptr< Hit hit,
PointFlags_t &&  flag 
)
inline

Add a single point; different version of the functions are provided using const references or rvalue references.

Definition at line 56 of file TrackTrajectoryCreationBookKeeper.h.

References hits().

56  {
57  positions.push_back(std::move(point));
58  momenta.push_back(std::move(vect));
59  hits->push_back(hit);
60  flags.push_back(std::move(flag));
61  }
TrackTrajectory trkmkr::TrackTrajectoryCreationBookKeeper::finalizeTrackTrajectory ( )
inline

Get the finalized recob::TrackTrajectory object; internal data vectors are moved so no more points should be added.

Definition at line 65 of file TrackTrajectoryCreationBookKeeper.h.

TrackTrajectoryCreationBookKeeper& trkmkr::TrackTrajectoryCreationBookKeeper::operator= ( const TrackTrajectoryCreationBookKeeper )
delete

Avoid copies of this object.

TrackTrajectoryCreationBookKeeper& trkmkr::TrackTrajectoryCreationBookKeeper::operator= ( TrackTrajectoryCreationBookKeeper &&  )
delete

Avoid copies of this object.

Member Data Documentation

std::vector<PointFlags_t> trkmkr::TrackTrajectoryCreationBookKeeper::flags
private

Definition at line 74 of file TrackTrajectoryCreationBookKeeper.h.

bool trkmkr::TrackTrajectoryCreationBookKeeper::hasMomenta_
private

Definition at line 70 of file TrackTrajectoryCreationBookKeeper.h.

std::vector<art::Ptr<Hit> >* trkmkr::TrackTrajectoryCreationBookKeeper::hits
private

Definition at line 71 of file TrackTrajectoryCreationBookKeeper.h.

std::vector<Vector_t> trkmkr::TrackTrajectoryCreationBookKeeper::momenta
private

Definition at line 73 of file TrackTrajectoryCreationBookKeeper.h.

std::vector<Point_t> trkmkr::TrackTrajectoryCreationBookKeeper::positions
private

Definition at line 72 of file TrackTrajectoryCreationBookKeeper.h.


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