CMS 3D CMS Logo

TrajectorySeed.h
Go to the documentation of this file.
1 #ifndef DATAFORMATS_TRAJECTORYSEED_TRAJECTORYSEED_h
2 #define DATAFORMATS_TRAJECTORYSEED_TRAJECTORYSEED_h
3 
8 #include <utility>
9 #include <algorithm>
10 
18  public:
20  typedef recHitContainer::const_iterator const_iterator;
21  typedef std::pair<const_iterator,const_iterator> range;
22 
23 
25  virtual ~TrajectorySeed(){}
26 
28  recHitContainer const & rh,
30  hits_(rh), tsos_(ptsos), dir_(dir) {}
31 
33  recHitContainer && rh,
35  hits_(std::move(rh)), tsos_(ptsos), dir_(dir) {}
36 
37 
38  void swap(PTrajectoryStateOnDet & ptsos,
39  recHitContainer & rh,
41  hits_.swap(rh);
42  std::swap(tsos_,ptsos);
44  }
45 
47  hits_.swap(rh.hits_);
48  std::swap(tsos_,rh.tsos_);
49  std::swap(dir_,rh.dir_);
50  }
51 
53  hits_(o.hits_), tsos_(o.tsos_), dir_(o.dir_) {}
54 
56  TrajectorySeed tmp(o); swap(tmp);
57  return *this;
58  }
59 
60 
63 
65  swap(o);
66  return *this;
67  }
68 
69 
70  range recHits() const {
71  return std::make_pair(hits_.begin(), hits_.end());
72  }
73  unsigned int nHits() const {return hits_.size();}
75  PTrajectoryStateOnDet const & startingState() const {return tsos_;}
76 
77  virtual TrajectorySeed * clone() const {return new TrajectorySeed( * this); }
78 
79 
80  private:
84 };
85 
86 inline void swap(TrajectorySeed & rh, TrajectorySeed & lh) noexcept {
87  rh.swap(lh);
88 }
89 
91 
92 #endif
PropagationDirection direction() const
virtual TrajectorySeed * clone() const
edm::OwnVector< TrackingRecHit > recHitContainer
size_type size() const
Definition: OwnVector.h:264
TrajectorySeed & operator=(TrajectorySeed &&o)
PropagationDirection dir_
PropagationDirection
bool int lh
Definition: SIMDVec.h:21
iterator begin()
Definition: OwnVector.h:244
TrajectorySeed(PTrajectoryStateOnDet const &ptsos, recHitContainer const &rh, PropagationDirection dir)
recHitContainer::const_iterator const_iterator
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
void swap(TrajectorySeed &rh)
std::pair< const_iterator, const_iterator > range
TrajectorySeed(PTrajectoryStateOnDet const &ptsos, recHitContainer &&rh, PropagationDirection dir)
virtual ~TrajectorySeed()
TrajectorySeed(TrajectorySeed &&o)
#define noexcept
iterator end()
Definition: OwnVector.h:249
PTrajectoryStateOnDet const & startingState() const
void swap(PTrajectoryStateOnDet &ptsos, recHitContainer &rh, PropagationDirection &dir)
TrajectorySeed & operator=(TrajectorySeed const &o)
TrajectorySeed(TrajectorySeed const &o)
TrajectorySeed BasicTrajectorySeed
range recHits() const
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
unsigned int nHits() const
PTrajectoryStateOnDet tsos_
edm::OwnVector< TrackingRecHit > hits_
dbl *** dir
Definition: mlp_gen.cc:35
void swap(OwnVector< T, P > &other)
Definition: OwnVector.h:475
def move(src, dest)
Definition: eostools.py:511