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>
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 
32  void swap(PTrajectoryStateOnDet & ptsos,
33  recHitContainer & rh,
35  hits_.swap(rh);
36  std::swap(tsos_,ptsos);
37  std::swap(dir_,dir);
38  }
39 
40  void swap(TrajectorySeed & rh) {
41  hits_.swap(rh.hits_);
42  std::swap(tsos_,rh.tsos_);
43  std::swap(dir_,rh.dir_);
44  }
45 
47  hits_(o.hits_), tsos_(o.tsos_), dir_(o.dir_) {}
48 
50  TrajectorySeed tmp(o); swap(tmp);
51  return *this;
52  }
53 
54 
55 #if defined( __GXX_EXPERIMENTAL_CXX0X__)
57  hits_(std::move(o.hits_)), tsos_(std::move(o.tsos_)), dir_(std::move(o.dir_)) {}
58 
60  swap(o);
61  return *this;
62  }
63 
64 #endif
65 
66  range recHits() const {
67  return std::make_pair(hits_.begin(), hits_.end());
68  }
69  unsigned int nHits() const {return hits_.size();}
71  PTrajectoryStateOnDet const & startingState() const {return tsos_;}
72 
73  virtual TrajectorySeed * clone() const {return new TrajectorySeed( * this); }
74 
75 
76  private:
80 };
81 
82 inline void swap(TrajectorySeed & rh, TrajectorySeed & lh) {
83  rh.swap(lh);
84 }
85 
87 
88 #endif
PropagationDirection direction() const
void swap(ora::Record &rh, ora::Record &lh)
Definition: Record.h:74
virtual TrajectorySeed * clone() const
edm::OwnVector< TrackingRecHit > recHitContainer
size_type size() const
Definition: OwnVector.h:260
PropagationDirection dir_
PropagationDirection
bool int lh
Definition: SSEVec.h:37
iterator begin()
Definition: OwnVector.h:234
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:241
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:431