All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
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< recob::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...
 
recob::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
 
TrackTrajectoryCreationBookKeeperoperator= (const TrackTrajectoryCreationBookKeeper &)=delete
 
TrackTrajectoryCreationBookKeeperoperator= (TrackTrajectoryCreationBookKeeper &&)=delete
 
void addPoint (const Point_t &point, const Vector_t &vect, art::Ptr< recob::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< recob::Hit > hit, PointFlags_t &&flag)
 

Private Attributes

bool hasMomenta_
 
std::vector< art::Ptr
< recob::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 33 of file TrackTrajectoryCreationBookKeeper.h.

Constructor & Destructor Documentation

trkmkr::TrackTrajectoryCreationBookKeeper::TrackTrajectoryCreationBookKeeper ( std::vector< art::Ptr< recob::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 36 of file TrackTrajectoryCreationBookKeeper.h.

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

Avoid copies of this object.

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

Member Function Documentation

void trkmkr::TrackTrajectoryCreationBookKeeper::addPoint ( const Point_t point,
const Vector_t vect,
art::Ptr< recob::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 52 of file TrackTrajectoryCreationBookKeeper.h.

52  {
53  positions.push_back(point);
54  momenta.push_back(vect);
55  hits->push_back(hit);
56  flags.push_back(flag);
57  }
then echo unknown compiler flag
process_name hit
Definition: cheaterreco.fcl:51
void trkmkr::TrackTrajectoryCreationBookKeeper::addPoint ( Point_t &&  point,
Vector_t &&  vect,
art::Ptr< recob::Hit hit,
PointFlags_t &&  flag 
)
inline

Definition at line 58 of file TrackTrajectoryCreationBookKeeper.h.

58  {
59  positions.push_back(std::move(point));
60  momenta.push_back(std::move(vect));
61  hits->push_back(hit);
62  flags.push_back(std::move(flag));
63  }
then echo unknown compiler flag
process_name hit
Definition: cheaterreco.fcl:51
recob::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 67 of file TrackTrajectoryCreationBookKeeper.h.

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

Member Data Documentation

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

Definition at line 76 of file TrackTrajectoryCreationBookKeeper.h.

bool trkmkr::TrackTrajectoryCreationBookKeeper::hasMomenta_
private

Definition at line 72 of file TrackTrajectoryCreationBookKeeper.h.

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

Definition at line 73 of file TrackTrajectoryCreationBookKeeper.h.

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

Definition at line 75 of file TrackTrajectoryCreationBookKeeper.h.

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

Definition at line 74 of file TrackTrajectoryCreationBookKeeper.h.


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