CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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>
11 
19  public:
21  typedef recHitContainer::const_iterator const_iterator;
22  typedef std::pair<const_iterator,const_iterator> range;
23 
24 
26  virtual ~TrajectorySeed(){}
27 
29  recHitContainer const & rh,
31  hits_(rh), tsos_(ptsos), dir_(dir) {}
32 
33 #if defined( __GXX_EXPERIMENTAL_CXX0X__)
35  recHitContainer && rh,
37  hits_(std::move(rh)), tsos_(ptsos), dir_(dir) {}
38 #endif
39 
40 
41  void swap(PTrajectoryStateOnDet & ptsos,
42  recHitContainer & rh,
44  hits_.swap(rh);
45  std::swap(tsos_,ptsos);
47  }
48 
50  hits_.swap(rh.hits_);
51  std::swap(tsos_,rh.tsos_);
52  std::swap(dir_,rh.dir_);
53  }
54 
56  hits_(o.hits_), tsos_(o.tsos_), dir_(o.dir_) {}
57 
59  TrajectorySeed tmp(o); swap(tmp);
60  return *this;
61  }
62 
63 
64 #if defined( __GXX_EXPERIMENTAL_CXX0X__)
66  hits_(std::move(o.hits_)), tsos_(std::move(o.tsos_)), dir_(std::move(o.dir_)) {}
67 
69  swap(o);
70  return *this;
71  }
72 
73 #endif
74 
75  range recHits() const {
76  return std::make_pair(hits_.begin(), hits_.end());
77  }
78  unsigned int nHits() const {return hits_.size();}
80  PTrajectoryStateOnDet const & startingState() const {return tsos_;}
81 
82  virtual TrajectorySeed * clone() const {return new TrajectorySeed( * this); }
83 
84 
85  private:
89 };
90 
91 inline void swap(TrajectorySeed & rh, TrajectorySeed & lh) noexcept {
92  rh.swap(lh);
93 }
94 
96 
97 #endif
PropagationDirection direction() const
void swap(ora::Record &rh, ora::Record &lh)
Definition: Record.h:70
virtual TrajectorySeed * clone() const
edm::OwnVector< TrackingRecHit > recHitContainer
size_type size() const
Definition: OwnVector.h:248
#define noexcept
PropagationDirection dir_
PropagationDirection
bool int lh
Definition: SIMDVec.h:19
iterator begin()
Definition: OwnVector.h:228
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
virtual ~TrajectorySeed()
iterator end()
Definition: OwnVector.h:233
PTrajectoryStateOnDet const & startingState() const
void swap(PTrajectoryStateOnDet &ptsos, recHitContainer &rh, PropagationDirection &dir)
TrajectorySeed & operator=(TrajectorySeed const &o)
TrajectorySeed(TrajectorySeed const &o)
range recHits() const
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
unsigned int nHits() const
PTrajectoryStateOnDet tsos_
TrajectorySeed BasicTrajectorySeed
edm::OwnVector< TrackingRecHit > hits_
dbl *** dir
Definition: mlp_gen.cc:35
void swap(OwnVector< T, P > &other)
Definition: OwnVector.h:401